blob: 77120cbf6c8dde3a21cd599612f9317ecd08d171 [file] [log] [blame]
Marc Kupietzf6bb6cb2023-11-18 17:17:50 +01001# gitlab ci pipeline to build corpuscomposition docker container
2# automatically triggered on tag pushes or run manually
3#
4# Download container from artifacts and import it
5# e.g. with
6# unxz -c < corpuscomposition-master-fffe0d98.xz | docker load
7#
8image: docker:latest
Marc Kupietz6ac65072023-11-17 20:31:39 +01009
Marc Kupietzf6bb6cb2023-11-18 17:17:50 +010010services:
11 - docker:dind
Marc Kupietz6ac65072023-11-17 20:31:39 +010012
Marc Kupietzf6bb6cb2023-11-18 17:17:50 +010013build:
14 rules:
15 - if: $CI_COMMIT_TAG =~ /.+/
16 variables:
17 VID: $CI_COMMIT_TAG
18 - when: manual
19 variables:
20 VID: $CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
Marc Kupietz6ac65072023-11-17 20:31:39 +010021 stage: build
Marc Kupietz6ac65072023-11-17 20:31:39 +010022 before_script:
Marc Kupietzf6bb6cb2023-11-18 17:17:50 +010023 - apk update
24 - apk add --no-cache git
Marc Kupietz6ac65072023-11-17 20:31:39 +010025 script:
Marc Kupietzf6bb6cb2023-11-18 17:17:50 +010026 - docker build -f Dockerfile -t korap/corpuscomposition:$VID .
27 - docker save korap/corpuscomposition:$VID | xz -T0 -M16G -9 > corpuscomposition-$VID.xz
28 artifacts:
29 paths:
30 - corpuscomposition-$VID.xz
31