| # gitlab ci pipeline to build corpuscomposition docker container |
| # automatically triggered on tag pushes or run manually |
| # |
| # Download container from artifacts and import it |
| # e.g. with |
| # unxz -c < corpuscomposition-master-fffe0d98.xz | docker load |
| # |
| image: docker:latest |
| |
| services: |
| - docker:dind |
| |
| build: |
| 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/corpuscomposition:$VID . |
| - docker save korap/corpuscomposition:$VID | xz -T0 -M16G -9 > corpuscomposition-$VID.xz |
| artifacts: |
| paths: |
| - corpuscomposition-$VID.xz |
| |