From 3a3d1227558a2c405456e3ddab451675e7bbd552 Mon Sep 17 00:00:00 2001 From: jfriedli Date: Wed, 28 Aug 2019 08:33:28 -0700 Subject: Resolve "Create a docker image" --- .gitlab-ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to '.gitlab-ci.yml') 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 @@ image: debian:testing stages: + - build - linting - test +variables: + CONTAINER_TEST_IMAGE: registry.0xacab.org/jvoisin/mat2-web:$CI_BUILD_REF_NAME + CONTAINER_RELEASE_IMAGE: registry.0xacab.org/jvoisin/mat2-web:latest + pyflakes: stage: linting script: @@ -28,3 +33,15 @@ tests:debian: - pip3 install -r requirements.txt - python3-coverage run --branch --include main.py -m unittest discover -s test - python3-coverage report -m + +build-docker: + stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.production --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG + only: + - tags + - master \ No newline at end of file -- cgit v1.3