Commit 93d2040d authored by Aliaksandr Ramanovich (EPAM)'s avatar Aliaksandr Ramanovich (EPAM)
Browse files

Add cloudbuild files. Enable osdu-gcp part in gitlab-ci.yml

parent ce0aded2
......@@ -23,6 +23,11 @@ variables:
AWS_ENVIRONMENT: dev
AWS_MAVEN_TEST_COMMAND_OVERRIDE: verify
OSDU_GCP_SERVICE: schema
OSDU_GCP_VENDOR: gcp
OSDU_GCP_APPLICATION_NAME: os-schema
OSDU_GCP_ENV_VARS: AUTHORIZE_API=$OSDU_GCP_ENTITLEMENTS_URL,AUTHORIZE_API_KEY=$OSDU_GCP_AUTHORIZE_API_KEY,LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_WEB=DEBUG,DEFAULT_ACCOUNT_ID=$TENANT --vpc-connector=$OSDU_GCP_VPC_CONNECTOR
include:
- project: "osdu/platform/ci-cd-pipelines"
......
# Use the official AdoptOpenJDK for a base image.
# https://hub.docker.com/_/openjdk
FROM openjdk:8-slim
WORKDIR /app
ARG PORT
ENV PORT $PORT
# Copy the jar to the production image from the builder stage.
COPY provider/schema-gcp/target/os-schema-gcp-*-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
# Copyright 2020 Google LLC
# Copyright 2017-2019, Schlumberger
# Copyright 2020 EPAM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--build-arg', 'PORT=${_PORT}',
'-t', 'gcr.io/$PROJECT_ID/os-schema/schema:${_SHORT_SHA}',
'-t', 'gcr.io/$PROJECT_ID/os-schema/schema:latest',
'-f', 'cicd-config/cloudbuild/Dockerfile.cloudbuild.schema',
'.'
]
images:
- 'gcr.io/$PROJECT_ID/os-schema/schema'
Supports Markdown
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