Commit 620a64f5 authored by Spencer Sutton's avatar Spencer Sutton
Browse files

Merge branch 'dev' of codecommit://os-ingestion-workflow into aws-update

parents aa52a2b7 d45ee509
Pipeline #61230 passed with stages
in 54 minutes and 15 seconds
......@@ -21,6 +21,11 @@ env:
secrets-manager:
DOCKER_USERNAME: /osdu/devops/docker_credentials:username
DOCKER_PASSWORD: /osdu/devops/docker_credentials:password
SONAR_USERNAME: /osdu/devops/sonar_credentials:username
SONAR_PASSWORD: /osdu/devops/sonar_credentials:password
parameter-store:
SONAR_URL: /osdu/devops/sonar_url
phases:
install:
......@@ -59,7 +64,7 @@ phases:
- printenv
- echo "Building primary service assemblies..."
- mvn -B test install -pl workflow-core,provider/workflow-aws -Ddeployment.environment=prod
- mvn -B test install sonar:sonar -pl .,workflow-core,provider/workflow-aws -Ddeployment.environment=prod -Dsonar.login=${SONAR_USERNAME} -Dsonar.password=${SONAR_PASSWORD} -Dsonar.branch.name=${BRANCH_NAME}
# Suspended until further notice
# - echo "Copying assemblies to dist..."
......@@ -84,6 +89,9 @@ phases:
python provider/workflow-aws/build-aws/build-info.py --branch ${CODEBUILD_SOURCE_VERSION} --commit ${CODEBUILD_RESOLVED_SOURCE_VERSION} \
--buildid ${CODEBUILD_BUILD_ID} --buildnumber ${CODEBUILD_BUILD_NUMBER} --reponame ${REPO_NAME} --outdir ${OUTPUT_DIR} \
--artifact ${ECR_IMAGE}
post_build:
commands:
- cp provider/workflow-aws/target/dependency-check-report.html ${OUTPUT_DIR}
reports:
SurefireReports: # CodeBuild will create a report group called "SurefireReports".
files: #Store all of the files
......
......@@ -54,6 +54,17 @@ limitations under the License.
<azure.devops.token>no-default</azure.devops.token>
</properties>
</profile>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>
${env.SONAR_URL}
</sonar.host.url>
</properties>
</profile>
</profiles>
<servers>
......
......@@ -30,6 +30,22 @@
<name>workflow-aws</name>
<description>AWS implementation of Workflow service APIs</description>
<properties>
<aws.version>1.11.1018</aws.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>${aws.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opengroup.osdu</groupId>
......@@ -55,6 +71,13 @@
<version>2.11.2</version>
</dependency>
<!-- AWS managed packages -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>${aws.version}</version>
</dependency>
<!-- Internal packages -->
<dependency>
<groupId>org.opengroup.osdu.core.aws</groupId>
......@@ -158,6 +181,18 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>6.2.2</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
......@@ -79,14 +79,16 @@ public class AwsWorkflowMetadataRepository implements IWorkflowMetadataRepositor
WorkflowMetadataDoc doc = WorkflowMetadataDoc.create(workflowMetadata, dataPartitionId);
try {
// try {
queryHelper.save(doc);
}
catch(Exception e) {
throw new AppException(HttpStatus.INTERNAL_SERVER_ERROR.value(),
HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase(),
"Failed to save workflowMetadata to db");
}
// }
// catch(Exception e) {
// System.out.println(">>>>>>>>>>>>>")
// System.out.println
// throw new AppException(HttpStatus.INTERNAL_SERVER_ERROR.value(),
// HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase(),
// "Failed to save workflowMetadata to db");
// }
return doc.convertToWorkflowMetadata(); //eliminate fields that might exist that aren't stored
......
......@@ -50,17 +50,18 @@ public class WorkflowMetadataDoc {
@DynamoDBAttribute(attributeName = "createdBy")
private String createdBy;
@DynamoDBAttribute(attributeName = "creationTimestamp")
@DynamoDBAttribute(attributeName = "creationTimestamp")
private Long creationTimestamp;
@DynamoDBAttribute(attributeName = "version")
private Long version;
@DynamoDBAttribute(attributeName = "isDeployedThroughWorkflowService")
private Boolean isDeployedThroughWorkflowService;
@DynamoDBAttribute(attributeName = "registrationInstructions")
private Map<String,Object> registrationInstructions;
// This breaks workflow service, throws dynamo mapping exception
// @DynamoDBAttribute(attributeName = "registrationInstructions")
// private Map<String,Object> registrationInstructions;
public static WorkflowMetadataDoc create(WorkflowMetadata workflowMetadata, String dataPartitionId) {
......@@ -73,7 +74,6 @@ public class WorkflowMetadataDoc {
.creationTimestamp(workflowMetadata.getCreationTimestamp())
.version(workflowMetadata.getCreationTimestamp())
.isDeployedThroughWorkflowService(false) //we dont support deployment right now
.registrationInstructions(workflowMetadata.getRegistrationInstructions())
.build();
return doc;
......@@ -89,7 +89,6 @@ public class WorkflowMetadataDoc {
.creationTimestamp(creationTimestamp)
.version(version)
.isDeployedThroughWorkflowService(isDeployedThroughWorkflowService)
.registrationInstructions(registrationInstructions)
.build();
return metadata;
......
......@@ -24,7 +24,7 @@ server.port=${APPLICATION_PORT:8080}
aws.resource.prefix=${ENVIRONMENT}
aws.environment=${ENVIRONMENT}
PARTITION_API=${ENTITLEMENTS_BASE_URL}/api/partition/v1
PARTITION_API=${PARTITION_BASE_URL}/api/partition/v1
aws.dynamodb.workflowMetadataTable.ssm.relativePath=${WORKFLOW_METADATA_SSM_RELATIVE_PATH:ingestion-workflow/workflowMetadataTable}
aws.dynamodb.workflowRunTable.ssm.relativePath=${WORKFLOW_RUN_SSM_RELATIVE_PATH:ingestion-workflow/workflowRunTable}
......@@ -52,4 +52,4 @@ server.ssl.key-alias=${SSL_KEY_ALIAS:osduonaws}
server.ssl.key-password=${SSL_KEY_PASSWORD:}
server.ssl.key-store-password=${SSL_KEY_STORE_PASSWORD:}
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration
\ No newline at end of file
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration
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