blob: 02fa71cb4c90c4fab922cf143c52cd6e30db833a [file] [log] [blame]
# gitlab ci pipeline to build kustvakt docker container
# automatically triggered on tag pushs or run manually
#
# Download latest container from artifacts and import it:
#
# curl -Ls 'https://gitlab.ids-mannheim.de/KorAP/kustvakt/-/jobs/artifacts/master/raw/kustvakt.tar.xz?job=build-docker' | docker load
image: docker:latest
services:
- docker:dind
build-docker:
rules:
- if: $CI_COMMIT_TAG =~ /.+/
variables:
VID: $CI_COMMIT_TAG
- when: manual
variables:
VID: $CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
stage: build
before_script:
- apk update
- apk add --no-cache git
script:
- docker build -f Dockerfile -t korap/kustvakt:$VID .
- docker save korap/kustvakt:$VID | xz -T0 -M16G -9 > kustvakt.tar.xz
artifacts:
paths:
- kustvakt.tar.xz