Skip to content
Snippets Groups Projects
Unverified Commit 60cb0226 authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

ci: simplify CI job file

parent bfc37747
No related branches found
No related tags found
No related merge requests found
Pipeline #187638 failed
......@@ -15,6 +15,11 @@ stages:
- apk add --no-cache docker
- docker info
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
dependencies: []
.push-only-job: &push-only-job
<<: *docker_template
stage: deploy
script:
- IMAGE="${CI_JOB_NAME#deploy:}"
- IMAGE_NAME="${CI_REGISTRY_IMAGE}/${IMAGE}:latest"
......@@ -22,26 +27,9 @@ stages:
- echo "Building image '${IMAGE}' as '${IMAGE_NAME}'"
- docker build -t "$IMAGE_NAME" .
- docker push "$IMAGE_NAME"
dependencies: []
.push-only-job: &push-only-job
<<: *docker_template
stage: deploy
 
.create-local-copy: &copy-job
stage: deploy
cache: {}
dependencies: []
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: docker
services:
- name: gitlab.fit.cvut.cz:5000/algorithms-library-toolkit/infrastructure/ci-docker-images/docker:dind
alias: docker
before_script:
- apk add --no-cache docker
- docker info
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- IMAGE="${CI_JOB_NAME#copy:}"
- docker pull "${IMAGE}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment