Commit e13b47ae authored by Riabokon Stanislav(EPAM)[GCP]'s avatar Riabokon Stanislav(EPAM)[GCP] Committed by Dmitriy Rudko
Browse files

https://jiraeu.epam.com/browse/GONRG-478

Changed a version of os-core-common to 0.3.5
parent aa666876
......@@ -2,6 +2,25 @@ variables:
IBM_BUILD_SUBDIR: provider/file-ibm
#IBM_INT_TEST_SUBDIR: testing/file-test-ibm
OSDU_GCP_BUILD_SUBDIR: provider/file-gcp-datastore
# OSDU_GCP_INT_TEST_SUBDIR: testing/file-test-core
OSDU_GCP_SERVICE: file
OSDU_GCP_BUCKET: nice-etching-277309-file
OSDU_GCP_NAMESPACE: osdu-namespace
OSDU_GCP_VPC_CONNECTOR: osdu-connector
OSDU_GCP_RECORDS_ROOT_URL: https://os-storage-dot-nice-etching-277309.uc.r.appspot.com/api/storage/v2
OSDU_GCP_VENDOR: gcp-datastore
OSDU_GCP_USER_ID: common-user
OSDU_GCP_APPLICATION_NAME: os-file
OSDU_GCP_SERVICE_ACCOUNT: osdu-gcp-sa@nice-etching-277309.iam.gserviceaccount.com
OSDU_GCP_ENV_VARS: OSDU_ENTITLEMENTS_URL=$OSDU_GCP_ENTITLEMENTS_URL,FILE_LOCATION_BUCKET_NAME=$OSDU_GCP_BUCKET,SPRING_CLOUD_GCP_DATASTORE_NAMESPACE=$OSDU_GCP_NAMESPACE,FILE_LOCATION_USER_ID=$OSDU_GCP_USER_ID,GCP_RECORDS_ROOT_URL=$OSDU_GCP_RECORDS_ROOT_URL --vpc-connector=$OSDU_GCP_VPC_CONNECTOR
OSDU_GCP_ENVIRONMENT: dev
OSDU_GCP_PROJECT: nice-etching-277309
OSDU_GCP_TENANT_NAME: osdu
OSDU_GCP_DEPLOY_ENV: empty
OSDU_GCP_PORT: 8080
include:
- project: 'osdu/platform/ci-cd-pipelines'
ref: 'master'
......@@ -10,19 +29,23 @@ include:
- project: 'osdu/platform/ci-cd-pipelines'
ref: 'master'
file: 'build/maven.yml'
# - project: 'osdu/platform/ci-cd-pipelines'
# ref: 'master'
# file: 'scanners/gitlab-ultimate.yml'
#
# - project: 'osdu/platform/ci-cd-pipelines'
# ref: 'master'
# file: 'scanners/fossa.yml'
#
# - project: 'osdu/platform/ci-cd-pipelines'
# ref: 'master'
# file: 'publishing/pages.yml'
- project: "osdu/platform/ci-cd-pipelines"
ref: 'master'
file: "cloud-providers/ibm.yml"
- project: 'osdu/platform/ci-cd-pipelines'
ref: 'master'
file: 'scanners/gitlab-ultimate.yml'
- project: 'osdu/platform/ci-cd-pipelines'
ref: 'master'
file: 'scanners/fossa.yml'
- project: 'osdu/platform/ci-cd-pipelines'
ref: 'master'
file: 'publishing/pages.yml'
- project: "osdu/platform/ci-cd-pipelines"
ref: 'osdu-gcp-cloudrun'
file: 'cloud-providers/osdu-gcp-cloudrun.yml'
......@@ -7,7 +7,13 @@
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gitlab-server>community-maven-via-job-token</gitlab-server>
<repo.releases.id>community-maven-via-job-token</repo.releases.id>
<publish.snapshots.id>community-maven-via-job-token</publish.snapshots.id>
<publish.releases.id>community-maven-via-job-token</publish.releases.id>
<repo.releases.url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</repo.releases.url>
<publish.snapshots.url>https://community.opengroup.org/api/v4/projects/90/packages/maven</publish.snapshots.url>
<publish.releases.url>https://community.opengroup.org/api/v4/projects/90/packages/maven</publish.releases.url>
</properties>
</profile>
......@@ -22,7 +28,13 @@
</property>
</activation>
<properties>
<gitlab-server>community-maven-via-private-token</gitlab-server>
<repo.releases.id>community-maven-via-private-token</repo.releases.id>
<publish.snapshots.id>community-maven-via-private-token</publish.snapshots.id>
<publish.releases.id>community-maven-via-private-token</publish.releases.id>
<repo.releases.url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</repo.releases.url>
<publish.snapshots.url>https://community.opengroup.org/api/v4/projects/90/packages/maven</publish.snapshots.url>
<publish.releases.url>https://community.opengroup.org/api/v4/projects/90/packages/maven</publish.releases.url>
</properties>
</profile>
</profiles>
......
# Use the official maven/java 8 image to create a build artifact.
# http://hub.docker.com/_/maven
FROM maven:3-jdk-8-alpine AS builder
# Copy local code to container image.
## Create all the needed folders
WORKDIR /app
COPY pom.xml .
COPY .m2/ .m2/
COPY file-core/ file-core/
COPY provider/ provider/
# Build a release artifact for the child project
RUN mvn -T2 package -DskipTests -B -s .m2/settings.xml
# Use the official AdoptOpenJDK for a base image.
# https://hub.docker.com/_/openjdk
FROM openjdk:8-slim
WORKDIR /app
ARG PROVIDER_NAME
ENV PROVIDER_NAME $PROVIDER_NAME
# Copy the jar to the production image from the builder stage.
COPY --from=builder /app/provider/file-${PROVIDER_NAME}/target/file-${PROVIDER_NAME}-*.jar file-${PROVIDER_NAME}.jar
# Run the web service on container startup.
CMD java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${PORT} -jar /app/file-${PROVIDER_NAME}.jar
......@@ -56,24 +56,6 @@
</dependency>
</dependencies>
<repositories>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</repository>
<snapshotRepository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
......
config.stopbubbling=true
lombok.fielddefaults.defaultprivate=true
lombok.addLombokGeneratedAnnotation = true
lombok.copyableAnnotations += javax.inject.Named
......@@ -32,12 +32,12 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>os-file</name>
<name>file</name>
<description>File service</description>
<modules>
<module>testing/file-test-core</module> <!-- Common Testing Dependencies-->
<module>file-core</module>
<module>testing/file-test-core</module>
<!-- <module>provider/file-aws</module> FIX: Missing dependencies -->
<module>provider/file-gcp</module>
<module>provider/file-ibm</module>
......@@ -52,7 +52,7 @@
<javax.inject.version>1</javax.inject.version>
<org.mapstruct.version>1.3.1.Final</org.mapstruct.version>
<maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>
<os-core-common.version>0.0.13-gcp</os-core-common.version>
<os-core-common.version>0.3.5</os-core-common.version>
<lombok.version>1.18.0</lombok.version>
</properties>
......@@ -270,21 +270,21 @@
</build>
<repositories>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</url>
</repository>
</repositories>
<repository>
<id>${repo.releases.id}</id>
<url>${repo.releases.url}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</repository>
<snapshotRepository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</snapshotRepository>
</distributionManagement>
<distributionManagement>
<repository>
<id>${publish.releases.id}</id>
<url>${publish.releases.url}</url>
</repository>
<snapshotRepository>
<id>${publish.snapshots.id}</id>
<url>${publish.snapshots.url}</url>
</snapshotRepository>
</distributionManagement>
</project>
......@@ -4,7 +4,10 @@ FROM openjdk:8-slim
WORKDIR /app
ARG PROVIDER_NAME
ENV PROVIDER_NAME $PROVIDER_NAME
ARG PORT
ENV PORT $PORT
# Copy the jar to the production image from the builder stage.
COPY provider/file-${PROVIDER_NAME}/target/file-${PROVIDER_NAME}-*.jar file-${PROVIDER_NAME}.jar
# Run the web service on container startup.
CMD java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${PORT} -jar /app/file-${PROVIDER_NAME}.jar
# Copyright 2019 Google LLC
# 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
# 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,
......@@ -13,42 +15,17 @@
# limitations under the License.
steps:
- name: 'gcr.io/$PROJECT_ID/restore_cache'
args: [
'--bucket=gs://${_CACHE_BUCKET}',
'--key=maven-$(find -name pom.xml -exec cksum {} \; | cksum | cut -d " " -f1)',
'--key_fallback=maven-'
]
- name: 'maven:3-jdk-8-alpine'
entrypoint: 'mvn'
env:
- 'MAVEN_REPO_USER=$_MAVEN_REPO_USER'
- 'MAVEN_REPO_PASS=$_MAVEN_REPO_PASS'
- 'ARTIFACTORY_LIBS_RELEASE_URL=$_ARTIFACTORY_LIBS_RELEASE_URL'
- 'ARTIFACTORY_LIBS_SNAPSHOT_URL=$_ARTIFACTORY_LIBS_SNAPSHOT_URL'
# parallel builds (-T2) hang for some reason
args: [
'package', '-s', '.m2/settings.xml', '--batch-mode', '--errors', '--fail-at-end',
'--show-version', '-DinstallAtEnd=true', '-DdeployAtEnd=true', '-DskipTests',
'-Dmaven.repo.local=/workspace/.m2/repository',
'-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN',
'-Djava.awt.headless=true', '-Dhttps.protocols=TLSv1.2'
]
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--build-arg', 'PROVIDER_NAME=${_PROVIDER_NAME}',
'--build-arg', 'PORT=${_PORT}',
'-t', 'gcr.io/$PROJECT_ID/os-file/file-${_PROVIDER_NAME}:${_SHORT_SHA}',
'-t', 'gcr.io/$PROJECT_ID/os-file/file-${_PROVIDER_NAME}:latest',
'-f', 'Dockerfile.cloudbuild',
'-f', 'provider/file-${_PROVIDER_NAME}/cloudbuild/Dockerfile.cloudbuild',
'.'
]
- name: 'gcr.io/$PROJECT_ID/save_cache'
args: [
'--bucket=gs://${_CACHE_BUCKET}',
'--key=maven-$(find -name pom.xml -exec cksum {} \; | cksum | cut -d " " -f1)',
'--path=.m2/repository',
'--no-clobber'
]
images:
- 'gcr.io/$PROJECT_ID/os-file/file-${_PROVIDER_NAME}'
......@@ -59,24 +59,6 @@
</dependency>
</dependencies>
<repositories>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</repository>
<snapshotRepository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
......
......@@ -25,3 +25,8 @@ spring.cloud.gcp.datastore.namespace=odes-namespace
file.location.bucket-name= odes-os-file-temp
file.location.user-id= common-user
gcp.records.url=localhost
# TODO: ENV style variables should not be used in Spring. This should be refactored.
RECORDS_ROOT_URL=${gcp.records.url}
......@@ -59,24 +59,6 @@
</dependency>
</dependencies>
<repositories>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</repository>
<snapshotRepository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
......
......@@ -17,3 +17,8 @@
# TODO: remove it after defined tenant info and auth
file.location.bucket-name= odes-os-file-temp
file.location.user-id= common-user
gcp.records.url=localhost
# TODO: ENV style variables should not be used in Spring. This should be refactored.
RECORDS_ROOT_URL=${gcp.records.url}
<?xml version="1.0" encoding="UTF-8" ?>
<!-- ~ ~ 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 ~ ~ https://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
<!-- ~ ~ 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 ~ ~ https://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. -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
......@@ -70,7 +70,7 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-jsr223</artifactId>
......@@ -79,25 +79,6 @@
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/44/packages/maven</url>
</repository>
<snapshotRepository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/44/packages/maven</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
......
......@@ -26,6 +26,13 @@
<name>file-test-core</name>
<description>Core test project for the file service</description>
<parent>
<groupId>org.opengroup.osdu</groupId>
<artifactId>os-file-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
......@@ -55,22 +62,4 @@
<artifactId>junit-jupiter</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</repository>
<snapshotRepository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/90/packages/maven</url>
</snapshotRepository>
</distributionManagement>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2020 Google LLC
~
~ 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
~
~ https://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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.opengroup.osdu</groupId>
<artifactId>os-file-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>file-test</name>
<description>Integration tests for File service</description>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<modules>
<module>file-test-core</module>
</modules>
<repositories>
<repository>
<id>${repo.releases.id}</id>
<url>${repo.releases.url}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>${publish.releases.id}</id>
<url>${publish.releases.url}</url>
</repository>
<snapshotRepository>
<id>${publish.snapshots.id}</id>
<url>${publish.snapshots.url}</url>
</snapshotRepository>
</distributionManagement>
</project>
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