Skip to content
Snippets Groups Projects
Commit 1e6d7f12 authored by Matt Wise's avatar Matt Wise
Browse files

Merge branch 'aws-eks' into 'master'

Deploy to EKS

See merge request !147
parents 76e7c749 cacc764b
No related branches found
No related tags found
1 merge request!147Deploy to EKS
Pipeline #61506 failed
......@@ -3,6 +3,8 @@ variables:
AWS_TEST_SUBDIR: testing/legal-test-aws
AWS_SERVICE: legal
AWS_ENVIRONMENT: dev
AWS_DEPLOY_TARGET: EKS
AWS_EKS_DEPLOYMENT_NAME: os-legal
GCP_BUILD_SUBDIR: provider/legal-gcp
GCP_INT_TEST_SUBDIR: testing/legal-test-gcp
......@@ -40,7 +42,7 @@ include:
file: "scanners/gitlab-ultimate.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/aws.yml"
file: "cloud-providers/aws.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/ibm.yml"
......
......@@ -29,20 +29,6 @@ The following software have components provided under the terms of this license:
- AMQP 1.0 JMS Spring Boot Starter (from https://repo1.maven.org/maven2/org/amqphub/spring/amqp-10-jms-spring-boot-starter)
- ASM based accessors helper used by json-smart (from )
- ASM based accessors helper used by json-smart (from )
- AWS Event Stream (from https://github.com/awslabs/aws-eventstream-java)
- AWS Java SDK :: AWS Core (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK :: Annotations (from https://repo1.maven.org/maven2/software/amazon/awssdk/annotations)
- AWS Java SDK :: Auth (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK :: Core :: Protocols :: AWS Json Protocol (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK :: Core :: Protocols :: Protocol Core (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK :: HTTP Client Interface (from https://repo1.maven.org/maven2/software/amazon/awssdk/http-client-spi)
- AWS Java SDK :: HTTP Clients :: Apache (from https://repo1.maven.org/maven2/software/amazon/awssdk/apache-client)
- AWS Java SDK :: HTTP Clients :: Netty Non-Blocking I/O (from https://repo1.maven.org/maven2/software/amazon/awssdk/netty-nio-client)
- AWS Java SDK :: Profiles (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK :: Regions (from https://repo1.maven.org/maven2/software/amazon/awssdk/regions)
- AWS Java SDK :: SDK Core (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK :: Services :: AWS Simple Systems Management (SSM) (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK :: Utilities (from https://repo1.maven.org/maven2/software/amazon/awssdk/utils)
- AWS Java SDK for AWS Amplify (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK for AWS App Mesh (from https://aws.amazon.com/sdkforjava)
- AWS Java SDK for AWS AppSync (from https://aws.amazon.com/sdkforjava)
......@@ -479,8 +465,6 @@ The following software have components provided under the terms of this license:
- Mojo's Maven plugin for Cobertura (from http://mojo.codehaus.org/cobertura-maven-plugin/)
- MongoDB Driver (from http://www.mongodb.org)
- MongoDB Java Driver Core (from http://www.mongodb.org)
- Netty Reactive Streams HTTP support (from https://repo1.maven.org/maven2/com/typesafe/netty/netty-reactive-streams-http)
- Netty Reactive Streams Implementation (from https://repo1.maven.org/maven2/com/typesafe/netty/netty-reactive-streams)
- Netty/Buffer (from https://repo1.maven.org/maven2/io/netty/netty-buffer)
- Netty/Codec (from https://repo1.maven.org/maven2/io/netty/netty-codec)
- Netty/Codec/DNS (from https://repo1.maven.org/maven2/io/netty/netty-codec-dns)
......@@ -1050,7 +1034,6 @@ public-domain
========================================================================
The following software have components provided under the terms of this license:
- AWS Java SDK :: SDK Core (from https://aws.amazon.com/sdkforjava)
- AWS SDK for Java - Models (from https://aws.amazon.com/sdkforjava)
- Apache Groovy (from https://groovy-lang.org)
- Apache Groovy (from https://groovy-lang.org)
......
......@@ -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:
......@@ -60,7 +65,7 @@ phases:
- printenv
- echo "Building primary service assemblies..."
- mvn -ntp -B test install -pl legal-core,provider/legal-aws -Ddeployment.environment=prod
- mvn -ntp -B test install sonar:sonar -pl .,legal-core,provider/legal-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..."
......@@ -85,6 +90,9 @@ phases:
python provider/legal-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/legal-aws/target/dependency-check-report.html ${OUTPUT_DIR}
reports:
SurefireReports: # CodeBuild will create a report group called "SurefireReports".
files: #Store all of the files
......
......@@ -53,6 +53,17 @@
<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>
......
......@@ -37,7 +37,7 @@
<dependency>
<groupId>org.opengroup.osdu.core.aws</groupId>
<artifactId>os-core-lib-aws</artifactId>
<version>0.10.0</version>
<version>0.11.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
......@@ -160,6 +160,18 @@
<threadCount>1</threadCount>
</configuration>
</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>
......
......@@ -14,8 +14,6 @@
package org.opengroup.osdu.legal.aws.countries;
import org.opengroup.osdu.core.aws.ssm.ParameterStorePropertySource;
import org.opengroup.osdu.core.aws.ssm.SSMConfig;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.core.common.model.tenant.TenantInfo;
import org.opengroup.osdu.legal.provider.interfaces.IStorageReader;
......
......@@ -18,10 +18,9 @@ package org.opengroup.osdu.legal.aws.jobs;
import com.amazonaws.services.sns.model.MessageAttributeValue;
import com.amazonaws.services.sns.model.PublishRequest;
import com.amazonaws.services.sns.AmazonSNS;
import org.opengroup.osdu.core.aws.ssm.ParameterStorePropertySource;
import org.opengroup.osdu.core.aws.ssm.SSMConfig;
import org.opengroup.osdu.core.aws.ssm.K8sLocalParameterProvider;
import org.opengroup.osdu.core.aws.ssm.K8sParameterNotFoundException;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.core.aws.sns.AmazonSNSConfig;
import org.opengroup.osdu.core.aws.sns.PublishRequestBuilder;
import org.opengroup.osdu.core.common.model.legal.StatusChangedTag;
......@@ -44,17 +43,14 @@ public class LegalTagPublisherImpl implements ILegalTagPublisher {
private AmazonSNS snsClient;
@Value("${aws.legal.sns.topic.arn}")
String legalTopicSnsArn;
private ParameterStorePropertySource ssm;
@PostConstruct
public void init(){
public void init() throws K8sParameterNotFoundException {
AmazonSNSConfig snsConfig = new AmazonSNSConfig(amazonSNSRegion);
snsClient = snsConfig.AmazonSNS();
SSMConfig ssmConfig = new SSMConfig();
ssm = ssmConfig.amazonSSM();
amazonSNSTopic = ssm.getProperty(legalTopicSnsArn).toString();
K8sLocalParameterProvider provider = new K8sLocalParameterProvider();
amazonSNSTopic = provider.getParameterAsString("legal-sns-topic-arn");
}
@Override
......
......@@ -26,7 +26,6 @@ aws.sns.region=${AWS_REGION}
aws.ssm=${SSM_ENABLED}
aws.ssm.prefix=/osdu/${ENVIRONMENT}
aws.legal.sns.topic.arn=${aws.ssm.prefix}/legal/legal-sns-topic-arn
aws.s3.configbucket.ssm.relativePath=${CONFIG_BUCKET_SSM_RELATIVE_PATH:legal/s3DataBucket}
aws.s3.configfilename.ssm.relativePath=${CONFIG_FILE_SSM_RELATIVE_PATH:legal/s3ConfigFileName}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment