Skip to content
Snippets Groups Projects
Commit 47de615a authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

New ci/cd

parent df04676a
Branches
Tags
No related merge requests found
image: maven:3.8.3-openjdk-17
services:
- docker:20.10.12-dind
stages:
- build-dmn-generator
- build-application-jar
- build-application-docker
- build-docker-image
- push-docker-image
cache:
key: ${CI_COMMIT_REF_SLUG}
......@@ -55,4 +59,55 @@ build-api-jar:
artifacts:
name: "Maven artifacts from $CI_PROJECT_NAME / API on $CI_COMMIT_REF_SLUG"
paths:
- "dmnverifierapi/target/*"
\ No newline at end of file
- "dmnverifierapi/target/*"
build-frontend-docker:
image: docker:20.10.12-dind
stage: build-docker-image
tags:
- docker-privileged
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
dependencies:
- build-dmn-generator
script:
- cd dmnverifierfrontend
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE:latest || true
- >
docker build
-f src/main/docker/Dockerfile.jvm
--pull
--build-arg http_proxy=$http_proxy
--build-arg https_proxy=$https_proxy
--build-arg no_proxy=$no_proxy
--cache-from $CI_REGISTRY_IMAGE:latest
--label "de.uni-koblenz.process-science.image.title=$CI_PROJECT_TITLE"
--label "de.uni-koblenz.process-science.image.url=$CI_PROJECT_URL"
--label "de.uni-koblenz.process-science.image.created=$CI_JOB_STARTED_AT"
--label "de.uni-koblenz.process-science.image.revision=$CI_COMMIT_SHA"
--label "de.uni-koblenz.process-science.image.version=$CI_COMMIT_REF_NAME"
--tag dmnverifier/frontend:$CI_COMMIT_SHA
.
- docker push dmnverifier/frontend:$CI_COMMIT_SHA
push-image-latest:
stage: push-docker-image
tags:
- docker-privileged
variables:
GIT_STRATEGY: none
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
dependencies:
- build-frontend-docker
only:
- main
script:
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- docker pull dmnverifier/frontend:$CI_COMMIT_SHA
- docker tag dmnverifier/frontend:$CI_COMMIT_SHA dmnverifier/frontend:latest
- docker push dmnverifier/frontend:latest
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment