Commit ee5e5003 authored by Adrien Dorsaz's avatar Adrien Dorsaz
Browse files

gitlab-ci: reorganization

parent da5a3520
Pipeline #298 failed with stages
in 22 minutes and 40 seconds
###
### Pipeline(s) definition (stages and "only" keys)
###
stages: stages:
- build - build
- check - check
...@@ -6,43 +10,41 @@ stages: ...@@ -6,43 +10,41 @@ stages:
.build: .build:
stage: build stage: build
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
only: only:
- merge_requests - merge_requests
- master - master
.check: .check:
stage: check stage: check
image: acme-dns-tiny:buster-slim
only: only:
- merge_requests - merge_requests
- master - master
.unit_test: .unit_test:
stage: unit_test stage: unit_test
script:
- python3-coverage run --append --source ./ -m unittest -v
tests.unit_test_acme_dns_tiny
only: only:
- merge_requests - merge_requests
- master - master
.lets_encrypt_staging: .lets_encrypt_staging:
stage: lets_encrypt_staging stage: lets_encrypt_staging
script:
- 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
only: only:
- merge_requests - merge_requests
- master - master
jessie-slim: ###
### Stage: build
###
.build-common:
extends: .build extends: .build
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
jessie-slim:
extends: .build-common
script: script:
- docker build - docker build
--progress plain --progress plain
...@@ -50,7 +52,7 @@ jessie-slim: ...@@ -50,7 +52,7 @@ jessie-slim:
-f "docker/jessie/Dockerfile" . -f "docker/jessie/Dockerfile" .
stretch-slim: stretch-slim:
extends: .build extends: .build-common
script: script:
- docker build - docker build
--progress plain --progress plain
...@@ -58,20 +60,28 @@ stretch-slim: ...@@ -58,20 +60,28 @@ stretch-slim:
-f "docker/stretch/Dockerfile" . -f "docker/stretch/Dockerfile" .
buster-slim: buster-slim:
extends: .build extends: .build-common
script: script:
- docker build - docker build
--progress plain --progress plain
-t "acme-dns-tiny:buster-slim" -t "acme-dns-tiny:buster-slim"
-f "docker/buster/Dockerfile" . -f "docker/buster/Dockerfile" .
compile: ###
### Stage: check
###
.check-common:
extends: .check extends: .check
image: acme-dns-tiny:buster-slim
compile:
extends: .check-common
script: script:
- python3 -m py_compile acme_dns_tiny.py tools/*.py tests/*.py - python3 -m py_compile acme_dns_tiny.py tools/*.py tests/*.py
lint: lint:
extends: .check extends: .check-common
script: script:
- pylint3 --max-line-length=99 acme_dns_tiny.py - pylint3 --max-line-length=99 acme_dns_tiny.py
- pylint3 --max-line-length=99 tools/acme_account_deactivate.py - pylint3 --max-line-length=99 tools/acme_account_deactivate.py
...@@ -83,36 +93,58 @@ lint: ...@@ -83,36 +93,58 @@ lint:
- pylint3 --max-line-length=99 tests/staging_test_acme_account_rollover.py - pylint3 --max-line-length=99 tests/staging_test_acme_account_rollover.py
pep8: pep8:
extends: .check extends: .check-common
script: script:
- pycodestyle --max-line-length=99 --ignore=E401,W503 --exclude=tests . - pycodestyle --max-line-length=99 --ignore=E401,W503 --exclude=tests .
- pycodestyle --max-line-length=99 --ignore=E722 tests - pycodestyle --max-line-length=99 --ignore=E722 tests
jessie-ut: ###
### Stage: unit_test
###
.unit_test-common:
extends: .unit_test extends: .unit_test
script:
- python3-coverage run --append --source ./ -m unittest -v
tests.unit_test_acme_dns_tiny
jessie-ut:
extends: .unit_test-common
image: acme-dns-tiny:jessie-slim image: acme-dns-tiny:jessie-slim
stretch-ut: stretch-ut:
extends: .unit_test extends: .unit_test-common
image: acme-dns-tiny:stretch-slim image: acme-dns-tiny:stretch-slim
buster-ut: buster-ut:
extends: .unit_test extends: .unit_test-common
image: acme-dns-tiny:buster-slim image: acme-dns-tiny:buster-slim
artifacts: artifacts:
paths: paths:
- .coverage - .coverage
jessie-le-staging: ###
### Stage: lets_encrypt_staging
###
.lets_encrypt_staging-common:
extends: .lets_encrypt_staging extends: .lets_encrypt_staging
script:
- 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
jessie-le-staging:
extends: .lets_encrypt_staging-common
image: acme-dns-tiny:jessie-slim image: acme-dns-tiny:jessie-slim
stretch-le-staging: stretch-le-staging:
extends: .lets_encrypt_staging extends: .lets_encrypt_staging-common
image: acme-dns-tiny:stretch-slim image: acme-dns-tiny:stretch-slim
buster-le-staging: buster-le-staging:
extends: .lets_encrypt_staging extends: .lets_encrypt_staging-common
image: acme-dns-tiny:buster-slim image: acme-dns-tiny:buster-slim
after_script: after_script:
- python3-coverage report - python3-coverage report
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment