.gitlab-ci.yml 824 Bytes
Newer Older
ale's avatar
ale committed
1 2 3 4 5 6 7 8 9 10 11 12

stages:
  - test
  - build_src
  - build_pkg
  - upload

# Do not run tests on master, they are executed by the
# Debian package builder.
test:
  stage: test
  image: "ai/test:go"
ale's avatar
ale committed
13
  script:
ale's avatar
ale committed
14
    - "./install_restic_for_tests.sh"
ale's avatar
ale committed
15
    - "apt-get install -y liblz4-tool"
ale's avatar
ale committed
16
    - "go-test-runner ."
ale's avatar
ale committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
  except:
    - master

build:src:
  stage: build_src
  image: "ai/build:stretch"
  script: "build-dsc"
  artifacts:
    paths:
      - build-deb/
  only:
    - master

build:pkg:
  stage: build_pkg
  image: "ai/build:stretch"
ale's avatar
ale committed
33
  script:
ale's avatar
ale committed
34
    - "./install_restic_for_tests.sh"
35
    - "build-deb"
ale's avatar
ale committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
  dependencies:
    - build:src
  artifacts:
    paths:
      - output-deb/
  only:
    - master

upload:pkg:
  stage: upload
  image: "ai/pkg:base"
  script: "upload-packages -r ai3"
  dependencies:
    - build:pkg
  only:
    - master