Commit 81852ee7 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach

Update .gitlab-ci.yml

parent 1aecf453
Pipeline #17418 failed with stages
in 2 minutes and 25 seconds
......@@ -10,81 +10,16 @@ variables:
SBT_OPTS: "-Dsbt.global.base=sbt-cache/sbtboot -Dsbt.boot.directory=sbt-cache/boot -Dsbt.ivy.home=sbt-cache/ivy"
DOCKER_TLS_CERTDIR: ""
include:
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'docker-image/docker-image.yml'
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'sbt-build/sbt-build.yml'
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- "sbt-cache/ivy/cache"
- "sbt-cache/boot"
- "sbt-cache/sbtboot"
- "sbt-cache/target"
test:
stage: test
tags: [mbr]
before_script:
- apt-get update && apt-get install -y ffmpeg imagemagick
- wget https://kakadusoftware.com/wp-content/uploads/2020/06/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip
- unzip KDU805_Demo_Apps_for_Linux-x86-64_200602.zip && cd KDU805_Demo_Apps_for_Linux-x86-64_200602/ && mv kdu_compress libkdu_v80R.so ../ && cd ..
- export PATH=$PATH:`pwd`
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
script:
- sbt test
assembly:
stage: build
tags: [mbr]
script:
- sbt assembly
artifacts:
paths:
- target/scala-2.12/app.jar
expire_in: 60 min
.build-image:
stage: publish
image: docker:stable
services:
- docker:dind
script:
- wget https://kakadusoftware.com/wp-content/uploads/2020/06/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip
- unzip KDU805_Demo_Apps_for_Linux-x86-64_200602.zip && cd KDU805_Demo_Apps_for_Linux-x86-64_200602/ && mv kdu_compress libkdu_v80R.so ../ && cd ..
- docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" "$REGISTRY"
- docker build --pull -t "$IMAGE_TAG" .
- docker push "$IMAGE_TAG"
- docker logout
cache:
paths: []
tagged-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
only:
- tags
master-branch-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
only:
- master
feature-branch-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
except:
- master
- tags
- "sbt-cache/target"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment