Skip to content
Snippets Groups Projects
Verified Commit e12dc66b authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

build docker image

parent c4cf2332
No related branches found
No related tags found
No related merge requests found
Pipeline #302196 failed
...@@ -11,6 +11,7 @@ variables: ...@@ -11,6 +11,7 @@ variables:
MAVEN_DEPLOY_OPTS: "--settings=$MAVEN_SETTINGS_PATH" MAVEN_DEPLOY_OPTS: "--settings=$MAVEN_SETTINGS_PATH"
# File for storing the POM project.version # File for storing the POM project.version
VARIABLES_FILE: ./variables.txt VARIABLES_FILE: ./variables.txt
CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
################### ###################
### TEMPLATES ### ### TEMPLATES ###
...@@ -31,6 +32,10 @@ variables: ...@@ -31,6 +32,10 @@ variables:
- 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy' - 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
- fi - fi
.kaniko-setup_template: &kaniko-setup
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
stages: stages:
- build_version - build_version
- deploy_java - deploy_java
...@@ -79,6 +84,19 @@ build_and_deploy: ...@@ -79,6 +84,19 @@ build_and_deploy:
name: WEBAPP_DEB_PACKAGES name: WEBAPP_DEB_PACKAGES
paths: paths:
- ./target/*.deb - ./target/*.deb
build_container:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
stage: build
before_script:
- *kaniko-setup
script:
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CONTAINER_IMAGE
# Deploy DEB files to APTLY repository. # Deploy DEB files to APTLY repository.
# All four DEB files are deployed with SNAPSHOT version (branch: develop)! # All four DEB files are deployed with SNAPSHOT version (branch: develop)!
......
FROM maven:3-jdk-8 as builder
COPY . /build
WORKDIR /build
RUN mvn package -Dmaven.test.skip=true -P \!textgrid.deb
FROM tomcat:8-jdk8-openjdk-slim-bullseye
# latex for PDF generation (TODO: test if PDF generation is really working, otherwise safe that space)
RUN apt-get update -y && apt-get upgrade -y && apt-get install --no-install-recommends -y \
#texlive-xetex \
texlive-latex-base \
texlive-latex-extra \
texlive-plain-generic \
# save some space
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/target/aggregator-*.war /usr/local/tomcat/webapps/aggregator.war
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment