diff options
| author | jfriedli | 2019-08-28 08:33:28 -0700 |
|---|---|---|
| committer | jvoisin | 2019-08-28 08:33:28 -0700 |
| commit | 3a3d1227558a2c405456e3ddab451675e7bbd552 (patch) | |
| tree | 4d59c165e4bcfdac629d6271f2905cd8cbb9c344 /.gitlab-ci.yml | |
| parent | 08ce6aed7662ecf5586d6782ef6449c2ec564ed9 (diff) | |
Resolve "Create a docker image"
Diffstat (limited to '.gitlab-ci.yml')
| -rw-r--r-- | .gitlab-ci.yml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c2b39e..481d32a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml | |||
| @@ -1,9 +1,14 @@ | |||
| 1 | image: debian:testing | 1 | image: debian:testing |
| 2 | 2 | ||
| 3 | stages: | 3 | stages: |
| 4 | - build | ||
| 4 | - linting | 5 | - linting |
| 5 | - test | 6 | - test |
| 6 | 7 | ||
| 8 | variables: | ||
| 9 | CONTAINER_TEST_IMAGE: registry.0xacab.org/jvoisin/mat2-web:$CI_BUILD_REF_NAME | ||
| 10 | CONTAINER_RELEASE_IMAGE: registry.0xacab.org/jvoisin/mat2-web:latest | ||
| 11 | |||
| 7 | pyflakes: | 12 | pyflakes: |
| 8 | stage: linting | 13 | stage: linting |
| 9 | script: | 14 | script: |
| @@ -28,3 +33,15 @@ tests:debian: | |||
| 28 | - pip3 install -r requirements.txt | 33 | - pip3 install -r requirements.txt |
| 29 | - python3-coverage run --branch --include main.py -m unittest discover -s test | 34 | - python3-coverage run --branch --include main.py -m unittest discover -s test |
| 30 | - python3-coverage report -m | 35 | - python3-coverage report -m |
| 36 | |||
| 37 | build-docker: | ||
| 38 | stage: build | ||
| 39 | image: | ||
| 40 | name: gcr.io/kaniko-project/executor:debug | ||
| 41 | entrypoint: [""] | ||
| 42 | script: | ||
| 43 | - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json | ||
| 44 | - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.production --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG | ||
| 45 | only: | ||
| 46 | - tags | ||
| 47 | - master \ No newline at end of file | ||
