Commit cd53d7ae authored by Matt Wise's avatar Matt Wise
Browse files

Use RESOURCE_PREFIX instead of ENVIRONMENT for dynamodb in integration tests...

Use RESOURCE_PREFIX instead of ENVIRONMENT for dynamodb in integration tests as ENVIRONMENT is reserved
parent a33eb0d1
......@@ -46,3 +46,5 @@ buildNumber.properties
### macOS ###
# General
.DS_Store
dist/
\ No newline at end of file
......@@ -14,6 +14,12 @@ variables:
IBM_BUILD_SUBDIR: provider/workflow-ibm
IBM_INT_TEST_SUBDIR: testing/workflow-test-ibm
AWS_BUILD_SUBDIR: provider/workflow-aws/build-aws
AWS_TEST_SUBDIR: testing/workflow-test-aws
AWS_SERVICE: ingestion-workflow
AWS_ENVIRONMENT: dev
include:
- project: "osdu/platform/ci-cd-pipelines"
ref: "master"
......@@ -42,6 +48,12 @@ include:
- project: "osdu/platform/ci-cd-pipelines"
ref: "master"
file: "cloud-providers/ibm.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/aws.yml"
osdu-gcp-test:
allow_failure: false
......@@ -83,6 +83,7 @@ The following software have components provided under the terms of this license:
- JSONassert (from https://github.com/skyscreamer/JSONassert)
- Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://github.com/google/google-http-java-client.git/google-http-client-jackson2)
- Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary)
- Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary)
- Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310)
- Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310)
- Jackson-annotations (from http://github.com/FasterXML/jackson)
......
......@@ -63,4 +63,4 @@ DOMAIN=<YOUR_DOMAIN>
WORKFLOW_HOST=<YOUR_API_URL>/api/workflow/v1/
DYNAMO_DB_REGION=<YOUR_REGION>
DYNAMO_DB_ENDPOINT=<YOUR_ENDPOINT>
ENVIRONMENT=<YOUR_ENVIRONMENT>
RESOURCE_PREFIX=<YOUR_ENVIRONMENT>
......@@ -58,3 +58,4 @@ AWS_COGNITO_AUTH_PARAMS_PASSWORD=<YOUR_AUTHORIZED_USER_PASSWORD>
DEFAULT_DATA_PARTITION_ID_TENANT1=<default-tenant>
WORKFLOW_HOST=http://localhost:8080
FINISHED_WORKFLOW_ID=finished-workflow-id
RESOURCE_PREFIX=<YOUR_ENVIRONMENT>
# Copyright 2020 Amazon Web Services
# Copyright 2020 Amazon Web Services
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
......@@ -32,11 +32,11 @@ export AWS_COGNITO_AUTH_PARAMS_PASSWORD=$ADMIN_PASSWORD
export AWS_COGNITO_AUTH_PARAMS_USER=$ADMIN_USER
export AWS_COGNITO_AUTH_PARAMS_USER_NO_ACCESS=$USER_NO_ACCESS
# core code assumes no slash at the end but CF forces slash at end
export WORKFLOW_HOST=${WORKFLOW_URL%?}
export WORKFLOW_HOST=${WORKFLOW_URL}
export DOMAIN=example.com
export DYNAMO_DB_REGION=us-east-1
export DYNAMO_DB_ENDPOINT=https://dynamodb.us-east-1.amazonaws.com
export ENVIRONMENT=$RESOURCE_PREFIX
export RESOURCE_PREFIX=$RESOURCE_PREFIX
export INT_TEST_DAG_NAME=my_first_dag
export DEFAULT_DATA_PARTITION_ID_TENANT1=int-test-workflow
......
......@@ -18,7 +18,7 @@ import org.opengroup.osdu.core.aws.dynamodb.DynamoDBQueryHelper;
public class DynamoSetupUtil {
private final static String ENVIRONMENT = "ENVIRONMENT";
private final static String RESOURCE_PREFIX = "RESOURCE_PREFIX";
private final static String DYNAMO_DB_REGION = "DYNAMO_DB_REGION";
private final static String DYNAMO_DB_ENDPOINT = "DYNAMO_DB_ENDPOINT";
private final static String ADMIN_USER = "ADMIN_USER";
......@@ -31,7 +31,7 @@ public class DynamoSetupUtil {
DynamoDBQueryHelper queryHelper;
public String insertWorkflowStatus() throws Exception {
String tablePrefix = String.format("%s%s", System.getenv(ENVIRONMENT), "-");
String tablePrefix = String.format("%s%s", System.getenv(RESOURCE_PREFIX), "-");
String dynamoDbRegion = System.getenv(DYNAMO_DB_REGION);
String dynamoDbEndpoint = System.getenv(DYNAMO_DB_ENDPOINT);
queryHelper = new DynamoDBQueryHelper(dynamoDbEndpoint, dynamoDbRegion, tablePrefix);
......@@ -52,7 +52,7 @@ public class DynamoSetupUtil {
}
public String insertIngestionStrategy() throws Exception {
String tablePrefix = String.format("%s%s", System.getenv(ENVIRONMENT), "-");
String tablePrefix = String.format("%s%s", System.getenv(RESOURCE_PREFIX), "-");
String dynamoDbRegion = System.getenv(DYNAMO_DB_REGION);
String dynamoDbEndpoint = System.getenv(DYNAMO_DB_ENDPOINT);
queryHelper = new DynamoDBQueryHelper(dynamoDbEndpoint, dynamoDbRegion, tablePrefix);
......
......@@ -18,7 +18,7 @@ import org.opengroup.osdu.core.aws.dynamodb.DynamoDBQueryHelper;
public class WorkflowStatusUtil {
private final static String ENVIRONMENT = "ENVIRONMENT";
private final static String RESOURCE_PREFIX = "RESOURCE_PREFIX";
private final static String DYNAMO_DB_REGION = "DYNAMO_DB_REGION";
private final static String DYNAMO_DB_ENDPOINT = "DYNAMO_DB_ENDPOINT";
......@@ -29,7 +29,7 @@ public class WorkflowStatusUtil {
DynamoDBQueryHelper queryHelper;
public String insertWorkflowStatus() throws Exception {
String tablePrefix = String.format("%s%s", System.getenv(ENVIRONMENT), "-");
String tablePrefix = String.format("%s%s", System.getenv(RESOURCE_PREFIX), "-");
String dynamoDbRegion = System.getenv(DYNAMO_DB_REGION);
String dynamoDbEndpoint = System.getenv(DYNAMO_DB_ENDPOINT);
queryHelper = new DynamoDBQueryHelper(dynamoDbEndpoint, dynamoDbRegion, tablePrefix);
......
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