Skip to content
Snippets Groups Projects
Commit 0187c6c8 authored by Roang's avatar Roang
Browse files

Update test image build

Use the release image as the base image for the test image build. This
will decrease the build time as only the exposure and env need to be
set.
parent c5f9db45
No related branches found
No related tags found
No related merge requests found
......@@ -240,7 +240,7 @@ django-tests:
coverage_format: cobertura
path: .tools/coverage/coverage.xml
build_test:
build_nginx:
stage: build
extends:
- .build
......@@ -253,9 +253,10 @@ build_test:
$KANIKO_ARGS
$KANIKO_CACHE_ARGS
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE/ci/hub:ci-$CI_PIPELINE_ID-test
--target nginx
--destination $CI_REGISTRY_IMAGE/ci/nginx:ci-$CI_PIPELINE_ID
build_nginx:
build_release:
stage: build
extends:
- .build
......@@ -268,24 +269,27 @@ build_nginx:
$KANIKO_ARGS
$KANIKO_CACHE_ARGS
--dockerfile $CI_PROJECT_DIR/Dockerfile
--target nginx
--destination $CI_REGISTRY_IMAGE/ci/nginx:ci-$CI_PIPELINE_ID
--target webworker
--destination $CI_REGISTRY_IMAGE/ci/hub:ci-$CI_PIPELINE_ID
build_release:
build_test:
stage: build
extends:
- .build
needs:
- generate_css
- migration_check
- django-tests
- build_release
script:
- |
cat > Dockerfile_Test <<EOF
FROM $CI_REGISTRY_IMAGE/ci/hub:ci-$CI_PIPELINE_ID
ENV BIND_HTTP=1
EXPOSE 8000
EOF
- /kaniko/executor
--destination $CI_REGISTRY_IMAGE/ci/hub:ci-$CI_PIPELINE_ID-test
$KANIKO_ARGS
$KANIKO_CACHE_ARGS
--dockerfile $CI_PROJECT_DIR/Dockerfile
--target webworker
--destination $CI_REGISTRY_IMAGE/ci/hub:ci-$CI_PIPELINE_ID
--dockerfile Dockerfile_Test
.test_image:
extends:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment