Unverified Commit 83e52cc4 authored by Féry Mathieu (Mathius)'s avatar Féry Mathieu (Mathius)
Browse files

feat(ci): Add building of -dev images for benchmark

parent c32076a1
Pipeline #34236 passed with stages
in 10 minutes and 6 seconds
variables:
IMAGE_TAG: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}
IMAGE_TAG_DEV: ${IMAGE_TAG}-dev
GRP_CURRENT_SERVICE: $GCP_SERVICE-${CI_COMMIT_REF_SLUG}
GCR_IMAGE: $GCR_SERVER/$GCP_ID/$GRP_CURRENT_SERVICE
......@@ -115,14 +116,19 @@ build:jar:
environment:
name: $CI_COMMIT_REF_SLUG
build:docker:
.base:docker: &baseDocker
image: docker:latest
stage: build
services:
- docker:dind
needs:
- build:jar
build:docker:
<<: *baseDocker
needs:
- build:jar
- build:getDomainName
services:
- docker:dind
script:
- echo $GCP_KEY_PROD >> service-account-file.json
- apk add zip
......@@ -136,6 +142,23 @@ build:docker:
- docker build -t ${IMAGE_TAG} .
- docker push ${IMAGE_TAG}
build:docker-dev:
<<: *baseDocker
script:
- apk add zip
- mkdir -p BOOT-INF/classes
- echo "oauth.providers=" >> BOOT-INF/classes/oauthKeys.properties
- zip target/*-spring-boot.jar BOOT-INF/classes/oauthKeys.properties
- export DOMAIN=$(cat domain.txt)
- touch BOOT-INF/classes/server.properties
- zip target/*-spring-boot.jar BOOT-INF/classes/server.properties
- echo "datastore.emulated=true" >> BOOT-INF/classes/datastore.properties
- echo "datastore.emulated.GUI=false" >> BOOT-INF/classes/datastore.properties
- zip target/*-spring-boot.jar BOOT-INF/classes/datastore.properties
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker build -t ${IMAGE_TAG_DEV} -f Dockerfile-dev .
- docker push ${IMAGE_TAG_DEV}
.base:deploy: &baseDeploy
<<: *baseGCP
stage: deploy
......
FROM google/cloud-sdk
RUN apt-get install openjdk-11-jdk
ARG JAR_FILE=target/*-spring-boot.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
\ 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