Commit e2f64f68 authored by Abhishek Kumar (SLB)'s avatar Abhishek Kumar (SLB)
Browse files

Merge remote-tracking branch 'origin/master' into 100-osdu-dd-m12-delivery

parents 52c377a6 26406754
Pipeline #117891 failed with stages
in 1 minute and 44 seconds
......@@ -333,6 +333,7 @@ The following software have components provided under the terms of this license:
- Cloud Key Management Service (KMS) API (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-cloudkms)
- Cloud Key Management Service (KMS) API v1-rev20220407-1.32.1 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-cloudkms)
- Cloud Storage JSON API (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage)
- Cloud Storage JSON API v1-rev20220604-1.32.1 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage)
- Cloud Storage JSON API v1-rev20220608-1.32.1 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage)
- CloudWatch Metrics for AWS Java SDK (from https://aws.amazon.com/sdkforjava)
- Converter: Jackson (from https://github.com/square/retrofit, https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-jackson)
......
......@@ -14,7 +14,7 @@
# - OPENID_PROVIDER_URL
# - OPENID_PROVIDER_CLIENT_ID
# - OPENID_PROVIDER_CLIENT_SECRET
#
#
set -e
......@@ -37,11 +37,11 @@ bootstrap_schema_gettoken_gcp() {
BEARER_TOKEN=$(gcloud auth print-identity-token --audiences="${AUDIENCES}")
export BEARER_TOKEN
# FIXME CleanUP script needed only for TF installation
# echo "Clean-up for Datastore schemas"
# python3 ./scripts/GcpDatastoreCleanUp.py
# FIXME find a better solution about datastore cleaning completion
# sleep 5
}
......@@ -85,6 +85,7 @@ else
fi
# Precheck entitlements
bootstrap_schema_prechek_env
# Deploy shared schemas
......
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: "{{ .Values.conf.app_name }}-bootstrap"
name: "{{ .Values.conf.app_name }}-bootstrap"
namespace: "{{ .Release.Namespace }}"
spec:
replicas: 1
selector:
matchLabels:
app: "{{ .Values.conf.app_name }}-bootstrap"
template:
metadata:
labels:
app: "{{ .Values.conf.app_name }}-bootstrap"
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec:
containers:
- name: "{{ .Values.conf.app_name }}-bootstrap"
image: "{{ .Values.data.bootstrap_image }}"
readinessProbe:
exec:
command:
- cat
- /tmp/bootstrap_ready
imagePullPolicy: "{{ .Values.data.imagePullPolicy }}"
envFrom:
- configMapRef:
name: "{{ .Values.conf.configmap }}-bootstrap"
{{- if .Values.conf.on_prem_enabled }}
- secretRef:
name: "{{ .Values.conf.bootstrap_secret_name }}"
{{- end }}
resources:
limits:
cpu: "{{ .Values.data.bootstrap_limits_cpu}}"
memory: "{{ .Values.data.bootstrap_limits_memory }}"
serviceAccountName: "{{ .Values.data.bootstrapServiceAccountName }}"
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: "{{ .Values.conf.app_name }}-bootstrap"
name: "{{ .Values.conf.app_name }}-bootstrap"
namespace: "{{ .Release.Namespace }}"
spec:
replicas: 1
selector:
matchLabels:
app: "{{ .Values.conf.app_name }}-bootstrap"
template:
metadata:
labels:
app: "{{ .Values.conf.app_name }}-bootstrap"
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec:
containers:
- name: "{{ .Values.conf.app_name }}-bootstrap"
image: "{{ .Values.data.bootstrap_image }}"
readinessProbe:
exec:
command:
- cat
- /tmp/bootstrap_ready
imagePullPolicy: "{{ .Values.data.imagePullPolicy }}"
envFrom:
- configMapRef:
name: "{{ .Values.conf.configmap }}-bootstrap"
{{- if .Values.conf.on_prem_enabled }}
- secretRef:
name: "{{ .Values.conf.bootstrap_secret_name }}"
{{- end }}
resources:
limits:
cpu: "{{ .Values.data.bootstrap_limits_cpu}}"
memory: "{{ .Values.data.bootstrap_limits_memory }}"
serviceAccountName: "{{ .Values.data.bootstrapServiceAccountName }}"
variables:
OSDU_GCP_ENABLE_BOOTSTRAP: "true"
OSDU_GCP_SERVICE: schema
OSDU_GCP_VENDOR: gcp
OSDU_GCP_HELM_CONFIG_SERVICE: schema-config
OSDU_GCP_HELM_DEPLOYMENT_SERVICE: schema-deploy
OSDU_GCP_HELM_TIMEOUT: "--timeout 15m"
OSDU_GCP_HELM_CONFIG_SERVICE_VARS: >
--set data.log_level=INFO
--set data.google_audiences=$GOOGLE_AUDIENCE
--set data.shared_tenant_name=$OSDU_GCP_TENANT
--set data.data_partition_id=$DATA_PARTITION_ID
OSDU_GCP_HELM_CONFIG_SERVICE_VARS_DEV2: >
--set data.log_level=INFO
--set data.google_audiences=$GOOGLE_AUDIENCE
--set data.shared_tenant_name=$OSDU_GCP_TENANT
--set data.data_partition_id=$DATA_PARTITION_ID
OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS: >
--set data.image=$CI_REGISTRY_IMAGE/osdu-gcp-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.serviceAccountName=$OSDU_GCP_SERVICE-k8s
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.bootstrapServiceAccountName=datafier-workload-identity-gke
$OSDU_GCP_HELM_TIMEOUT
osdu-gcp-containerize-bootstrap-gitlab:
variables:
BUILD_PATH: devops/$OSDU_GCP_VENDOR/bootstrap-osdu-module/Dockerfile
osdu-gcp-containerize-bootstrap-gcr:
variables:
BUILD_PATH: devops/$OSDU_GCP_VENDOR/bootstrap-osdu-module/Dockerfile
# REFACTOR to common pipeline
osdu-gcp-deploy-deployment:
needs:
- osdu-gcp-containerize-gitlab
- osdu-gcp-deploy-configmap
- osdu-gcp-containerize-bootstrap-gitlab
after_script:
- echo ----- Verify Bootstrap -----
- kubectl rollout status deployment.v1.apps/$OSDU_GCP_SERVICE-bootstrap -n $OSDU_GCP_HELM_NAMESPACE --timeout=900s
- POD=$(kubectl get pod --sort-by=.metadata.creationTimestamp -n $OSDU_GCP_HELM_NAMESPACE | grep $OSDU_GCP_SERVICE-bootstrap | tail -1 | awk '{print $1}')
- STATUS=$(kubectl wait -n $OSDU_GCP_HELM_NAMESPACE --for=condition=Ready pod/$POD --timeout=300s)
- echo $STATUS
- if [[ "$STATUS" != *"met"* ]]; then echo "POD didn't start correctly" ; exit 1 ; fi
osdu-gcp-dev2-deploy-deployment:
needs:
- osdu-gcp-containerize-gitlab
- osdu-gcp-dev2-deploy-configmap
- osdu-gcp-containerize-bootstrap-gitlab
osdu-gcp-anthos-deploy-deployment:
needs:
- osdu-gcp-containerize-gitlab
- osdu-gcp-containerize-bootstrap-gitlab
- osdu-gcp-anthos-deploy-configmap
osdu-gcp-test:
script:
- $MAVEN_BUILD . test-results.log verify -q -f testing/schema-test-core/pom.xml
artifacts:
when: always
paths:
- test-results.log
- testing/schema-test-core/target/*/TEST-*.xml
reports:
junit:
- testing/schema-test-core/target/*/TEST-*.xml
# FIXME for DEV2
osdu-gcp-dev2-test:
script:
- $MAVEN_BUILD . test-results.log verify -q -f testing/schema-test-core/pom.xml
artifacts:
when: always
paths:
- test-results.log
- testing/schema-test-core/target/*/TEST-*.xml
reports:
junit:
- testing/schema-test-core/target/*/TEST-*.xml
osdu-gcp-anthos-test:
script:
- $MAVEN_BUILD . test-results.log verify -q -f testing/schema-test-core/pom.xml
artifacts:
when: always
paths:
- test-results.log
- testing/schema-test-core/target/*/TEST-*.xml
reports:
junit:
- testing/schema-test-core/target/*/TEST-*.xml
variables:
BUILD_BOOTSTRAP_PATH: "devops/$OSDU_GCP_VENDOR/bootstrap-osdu-module/Dockerfile"
OSDU_GCP_ENABLE_BOOTSTRAP: "true"
OSDU_GCP_SERVICE: schema
OSDU_GCP_VENDOR: gcp
OSDU_GCP_HELM_TIMEOUT: "--timeout 15m"
osdu-gcp-test:
variables:
OSDU_GCP_TEST_SUBDIR: testing/schema-test-core
script:
- $MAVEN_BUILD . test-results.log verify -q -f $OSDU_GCP_TEST_SUBDIR/pom.xml
osdu-gcp-dev2-test:
variables:
OSDU_GCP_TEST_SUBDIR: testing/schema-test-core
script:
- $MAVEN_BUILD . test-results.log verify -q -f $OSDU_GCP_TEST_SUBDIR/pom.xml
osdu-gcp-anthos-test:
variables:
OSDU_GCP_TEST_SUBDIR: testing/schema-test-core
script:
- $MAVEN_BUILD . test-results.log verify -q -f $OSDU_GCP_TEST_SUBDIR/pom.xml
......@@ -28,6 +28,8 @@
<properties>
<aws.version>1.11.1018</aws.version>
<jackson-databind.version>2.13.2.2</jackson-databind.version>
<jackson.version>2.13.2</jackson.version>
</properties>
<dependencyManagement>
......@@ -81,6 +83,22 @@
<version>0.14.0-rc2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
......
......@@ -59,7 +59,7 @@
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-gcp</artifactId>
<version>0.15.0-rc3</version>
<version>0.15.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback.contrib</groupId>
......
......@@ -12,7 +12,7 @@
<properties>
<start-class>org.opengroup.osdu.schema.provider.ibm.app.SchemaIBMApplication</start-class>
<os-core-lib-ibm.version>0.15.0-rc2</os-core-lib-ibm.version>
<os-core-lib-ibm.version>0.15.2</os-core-lib-ibm.version>
</properties>
<dependencyManagement>
......
......@@ -13,6 +13,8 @@
<properties>
<springfox-version>2.7.0</springfox-version>
<jackson-databind.version>2.13.2.2</jackson-databind.version>
<jackson.version>2.13.2</jackson.version>
</properties>
<dependencyManagement>
......@@ -100,6 +102,17 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
......@@ -155,11 +168,6 @@
<artifactId>javax.json</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.2.2</version>
</dependency>
</dependencies>
<build>
......@@ -205,7 +213,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.0.0-M7</version>
<configuration>
<includes>
<include>*Test.java</include>
......@@ -215,6 +223,13 @@
<reuseForks>true</reuseForks>
<argLine>@{argLine} -Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M7</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
......
......@@ -273,7 +273,6 @@ public class SchemaServiceTest {
public void testCreateSchema_SharedSchema()
throws JsonProcessingException, ApplicationException, BadRequestException, NotFoundException {
String dataPartitionId = "common";
String schemaId = "os:wks:well:1.1.1";
SchemaRequest schReqInt = getMockSchemaObject_published_InternalScope();
SchemaRequest schReqPub = getMockSchemaObject_published();
......@@ -297,7 +296,7 @@ public class SchemaServiceTest {
Mockito.when(schemaInfoStore.createSchemaInfo(schReqPub)).thenReturn(schInfoPub);
Mockito.when(schemaStore.getSchema(anyString(), anyString())).thenReturn(schReqPub.getSchema().toString());
Mockito.when(schemaUtil.findSchemaToCompare(schReqPub.getSchemaInfo(), true)).thenReturn(schemaInfoArr);
Mockito.when(schemaUtil.findSchemaToCompare(schReqPub.getSchemaInfo(), false)).thenReturn(schemaInfoArr);
Mockito.when(schemaVersionValidatorFactory.getVersionValidator(Matchers.any(SchemaValidationType.class)))
.thenReturn(mock(VersionValidator.class));
assertEquals(SchemaStatus.PUBLISHED, schemaService.createSchema(schReqPub).getStatus());
......
......@@ -10,12 +10,14 @@
<artifactId>schema-test-core</artifactId>
<properties>
<os-core-lib-ibm.version>0.15.0-rc3</os-core-lib-ibm.version>
<os-core-lib-ibm.version>0.15.2</os-core-lib-ibm.version>
<os-core-lib-azure.version>0.6.1</os-core-lib-azure.version>
<os-core-lib-aws.version>0.13.0</os-core-lib-aws.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson-databind.version>2.13.2.2</jackson-databind.version>
<jackson.version>2.13.2</jackson.version>
</properties>
<dependencies>
......@@ -64,6 +66,22 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
......
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