-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
35 lines (31 loc) · 1.28 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# gitlab ci pipeline to build kalamar 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/Kalamar/-/jobs/artifacts/master/raw/kalamar.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/kalamar:$VID-large --target kalamar .
# - wget https://github.com/slimtoolkit/slim/releases/latest/download/dist_linux.tar.gz
# - tar zxf dist_linux.tar.gz
# - export PATH=$(pwd)/dist_linux:$PATH
- docker run --rm -v /var/run/docker.sock:/var/run/docker.sock dslim/slim build --http-probe=true --exec="perl Makefile.PL && make test && unzip -v" --include-workdir=true --include-path=/usr/local/share/perl5/site_perl/KorAP/ --tag korap/kalamar:$VID --tag korap/kalamar:latest korap/kalamar:$VID-large
- docker save korap/kalamar:$VID | xz -T0 -M16G -9 > kalamar.tar.xz
artifacts:
paths:
- kalamar.tar.xz