.gitlab-ci.yml 1.46 KB
Newer Older
root's avatar
root committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Template para empacotamento utilizando o Gitlab-ci.

stages:
    - build
    - test
    - deploy

build:
  stage: build
  artifacts:
    paths:
      - build/
  tags:
    - debian-packaging
  script:
    - apt-get update && apt-get install -y build-essential devscripts dh-make dh-systemd quilt
    - ./.build.sh

test:
  stage: test
  tags:
    - ubuntu
    - regular
  script:
25
26
27
28
    - apt-get update && apt-get install -y wget
    - echo "deb http://repo.c3sl.ufpr.br/le6/ unstable main" > /etc/apt/sources.list.d/le6.list
    - wget -O- http://repo.c3sl.ufpr.br/le6/le.c3sl.ufpr.br.key | apt-key add -
    - echo "Installation test:"
29
30
    - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y udev
    - DEBIAN_FRONTEND=noninteractive apt-get -y install $(pwd)/build/*.deb language-pack-gnome-pt language-pack-pt-base
31
    - echo "Removal test:"
32
    - pkg_name=$(head -n 1 package/debian/changelog | cut -d' ' -f1)
33
    - DEBIAN_FRONTEND=noninteractive apt -y remove $pkg_name
root's avatar
root committed
34
35
36
  dependencies:
    - build

37
38
39
40
41
42
43
44
45
46
47
deploy_for_unstable:
  stage: deploy
  only:
      - develop
  tags:
    - debian-packaging
  script:
    - ./.deploy.sh
  dependencies:
    - build

root's avatar
root committed
48
49
deploy_for_testing:
  stage: deploy
50
  when: manual
root's avatar
root committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
  only:
      - master
  tags:
    - debian-packaging
  script:
    - ./.deploy.sh
  dependencies:
    - build

deploy_for_stable:
  stage: deploy
  when: manual
  only:
      - master
  tags:
    - debian-packaging
  script:
    - ./.deploy.sh
  dependencies:
    - build