.gitlab-ci.yml 1.57 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
## Template para empacotamento utilizando o Gitlab-ci.

stages:
    - lint
    - build
    - test
    - deploy

lint_shell:
  stage: lint
  tags:
    - debian-packaging
  script:
14
    - apt update && apt install wget
15 16
    - wget https://storage.googleapis.com/shellcheck/shellcheck-stable.linux.x86_64.tar.xz
    - tar xf shellcheck-stable.linux.x86_64.tar.xz
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
    - ./.linter_shell.sh

build:
  stage: build
  artifacts:
    paths:
      - build/
  tags:
    - debian-packaging
  script:
    - ./.build.sh

test:
  stage: test
  tags:
    - ubuntu
    - regular
  script:
    - apt-get update && apt-get install -y wget
36
    - echo "deb http://repo.c3sl.ufpr.br/le6/ testing main" > /etc/apt/sources.list.d/le6.list
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
    - wget -O- http://repo.c3sl.ufpr.br/le6/le.c3sl.ufpr.br.key | apt-key add -
    - echo "Installation test:"
    - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install $(pwd)/build/*.deb language-pack-gnome-pt language-pack-pt-base
    - echo "Removal test:"
    - pkg_name=$(head -n 1 package/debian/changelog | cut -d' ' -f1)
    - DEBIAN_FRONTEND=noninteractive apt -y remove $pkg_name
  dependencies:
    - build

deploy_for_unstable:
  stage: deploy
  only:
      - develop
  tags:
    - debian-packaging
  script:
    - ./.deploy.sh
  dependencies:
    - build

deploy_for_testing:
  stage: deploy
  only:
60
      - /^rc-.*$/
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
  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