.gitlab-ci.yml 2.33 KB
Newer Older
1
stages:
2
  - build
3
  - check
4
  - unit_test
5 6
  - lets_encrypt_staging

7 8 9 10 11 12
.build:
  stage: build
  image: docker.io/library/docker
  only:
    - merge_requests
    - master
13

14 15
.check:
  stage: check
16
  image: acme-dns-tiny:buster-slim
17 18 19 20
  only:
    - merge_requests
    - master

21 22 23 24 25
.unit_test:
  stage: unit_test
  artifacts:
    paths:
      - .coverage
26 27 28
  only:
    - merge_requests
    - master
29

30 31 32
.lets_encrypt_staging:
  stage: lets_encrypt_staging
  script:
33 34 35 36 37 38 39
    - python3-coverage run --append --source ./ -m unittest -v
      tests.staging_test_acme_dns_tiny
      tests.staging_test_acme_account_rollover
      tests.staging_test_acme_account_deactivate
  artifacts:
    paths:
      - .coverage
40 41 42 43
  only:
    - merge_requests
    - master

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
jessie-slim:
  extends: .build
  script:
  - docker build -t "acme-dns-tiny:jessie-slim"
                 -f "docker/jessie/Dockerfile" .

stretch-slim:
  extends: .build
  script:
  - docker build -t "acme-dns-tiny:stretch-slim"
                 -f "docker/stretch/Dockerfile" .

buster-slim:
  extends: .build
  script:
  - docker build -t "acme-dns-tiny:buster-slim"
                 -f "docker/buster/Dockerfile" .

62 63 64 65 66 67 68 69 70 71 72 73
compile:
  extends: .check
  script:
    - python3 -m py_compile acme_dns_tiny.py tools/*.py tests/*.py

lint:
  extends: .check
  script:
    - pylint3 acme_dns_tiny.py
    - pylint3 tools/acme_account_deactivate.py
    - pylint3 tools/acme_account_rollover.py
    - pylint3 tests/config_factory.py
74 75 76 77
    - pylint3 tests/staging_test_acme_dns_tiny.py
    - pylint3 tests/unit_test_acme_dns_tiny.py
    - pylint3 tests/staging_test_acme_account_deactivate.py
    - pylint3 tests/staging_test_acme_account_rollover.py
78

79
jessie-ut:
80
  extends: .unit_test
81
  image: acme-dns-tiny:jessie-slim
82

83
stretch-ut:
84
  extends: .unit_test
85
  image: acme-dns-tiny:stretch-slim
86

87
buster-ut:
88
  extends: .unit_test
89
  image: acme-dns-tiny:buster-slim
90

91
jessie-le-staging:
92
  extends: .lets_encrypt_staging
93
  image: acme-dns-tiny:jessie-slim
94

95
stretch-le-staging:
96
  extends: .lets_encrypt_staging
97
  image: acme-dns-tiny:stretch-slim
98

99
buster-le-staging:
100
  extends: .lets_encrypt_staging
101
  image: acme-dns-tiny:buster-slim
102 103 104 105 106 107
  after_script:
    - python3-coverage report
      --include=acme_dns_tiny.py
      --include=tools/acme_account_rollover.py
      --include=tools/acme_account_deactivate.py
    - python3-coverage html
108 109 110
  artifacts:
    paths:
     - htmlcov