Commit 3e0bfe16 authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'OSDU-GCP_parametrize_containerization' into 'master'

OSDU-GCP: parametrize containerization stage

See merge request !65
parents 3174b568 fbaecc36
Pipeline #20364 failed with stages
in 70 minutes and 25 seconds
......@@ -2,11 +2,9 @@
# https://hub.docker.com/_/openjdk
FROM openjdk:8-slim
WORKDIR /app
ARG PORT
ENV PORT $PORT
ARG PROVIDER_NAME
ENV PROVIDER_NAME $PROVIDER_NAME
# Copy the jar to the production image from the builder stage.
COPY provider/schema-gcp/target/os-schema-gcp-*-spring-boot.jar schema.jar
COPY provider/schema-${PROVIDER_NAME}/target/os-schema-${PROVIDER_NAME}-*-spring-boot.jar schema.jar
# Run the web service on container startup.
CMD java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${PORT} -jar /app/schema.jar
......@@ -18,13 +18,14 @@ steps:
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--build-arg', 'PROVIDER_NAME=${_PROVIDER_NAME}',
'--build-arg', 'PORT=${_PORT}',
'-t', 'gcr.io/$PROJECT_ID/os-schema/schema-gcp:${_SHORT_SHA}',
'-t', 'gcr.io/$PROJECT_ID/os-schema/schema-gcp:latest',
'-f', 'provider/schema-gcp/cloudbuild/Dockerfile.cloudbuild',
'-t', 'gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GCP_SERVICE}-${_PROVIDER_NAME}:${_SHORT_SHA}',
'-t', 'gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GCP_SERVICE}-${_PROVIDER_NAME}:latest',
'-f', 'provider/${_GCP_SERVICE}-${_PROVIDER_NAME}/cloudbuild/Dockerfile.cloudbuild',
'.'
]
images:
- 'gcr.io/$PROJECT_ID/os-schema/schema-gcp'
- 'gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GCP_SERVICE}-${_PROVIDER_NAME}'
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