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

ci: replace docker with buildah

parent c942e90f
No related branches found
No related tags found
No related merge requests found
Pipeline #265169 passed
......@@ -3,41 +3,25 @@ image: $CI_REGISTRY/ict/alpine-docker-images/ci:3.17
stages:
- deploy
 
.docker: &docker_template
cache: {} # disable
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
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
dependencies: []
.push-only-job: &push-only-job
<<: *docker_template
stage: deploy
image: $CI_REGISTRY/ict/images/buildah:v1
script:
- IMAGE="${CI_JOB_NAME#deploy:}"
- IMAGE_NAME="${CI_REGISTRY_IMAGE}/${IMAGE}:latest"
- cd "$IMAGE"
- echo "Building image '${IMAGE}' as '${IMAGE_NAME}'"
- docker build -t "$IMAGE_NAME" .
- docker push "$IMAGE_NAME"
- buildah build --squash -t "${IMAGE_NAME}" .
- buildah push "${IMAGE_NAME}"
 
.create-local-copy: &copy-job
<<: *docker_template
stage: deploy
image: $CI_REGISTRY/ict/images/buildah:v1
script:
- IMAGE="${CI_JOB_NAME#copy:}"
- docker pull "${IMAGE}"
- docker tag "${IMAGE}" "${CI_REGISTRY_IMAGE}/${IMAGE}"
- docker push "${CI_REGISTRY_IMAGE}/${IMAGE}"
- buildah pull "${IMAGE}"
- buildah tag "${IMAGE}" "${CI_REGISTRY_IMAGE}/${IMAGE}"
- buildah push "${CI_REGISTRY_IMAGE}/${IMAGE}"
 
deploy:alt-builder:
<<: *push-only-job
......
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