Skip to content
Snippets Groups Projects
Commit 8bdf69d3 authored by Barclay Walsh's avatar Barclay Walsh
Browse files

Updating to hopefully fix the ECR repo errors due to AWS Account ID.

parent 0a070193
No related branches found
No related tags found
1 merge request!6Trusted ibm
......@@ -677,4 +677,4 @@ Outputs:
Description: The ARN of the role used by the application's CodePipeline.
Value: !GetAtt PipelineRole.Arn
Export:
Name: !Sub ${Environment}-${CodeCommitRepositoryName}-PipelineRoleArn
\ No newline at end of file
Name: !Sub ${Environment}-${CodeCommitRepositoryName}-PipelineRoleArn
......@@ -36,6 +36,7 @@ phases:
commands:
- echo Logging in to Amazon ECR...
- $(aws ecr get-login --no-include-email --region $DEPLOYMENT_REGION)
- echo $AWS_ACCOUNT_ID
- REPOSITORY_URI=$AWS_ACCOUNT_ID.dkr.ecr.$DEPLOYMENT_REGION.amazonaws.com/$IMAGE_REPO_NAME # build and store the ECR repo URI
- IMAGE_TAG=build-$(echo $CODEBUILD_BUILD_ID | awk -F":" '{print $2}') # generate a version tag from the commit hash for the Docker image
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7) # get the commit hash
......@@ -57,11 +58,12 @@ phases:
- export CACHE_CLUSTER_SCHEMA_PORT=$(aws cloudformation list-exports --query "Exports[?Name=='$ENVIRONMENT-$SCHEMA_CACHE_NAME-RedisEndpointPort'].[Value]" --output text --region $AWS_REGION)
- export CACHE_CLUSTER_INDEX_ENDPOINT=$(aws cloudformation list-exports --query "Exports[?Name=='$ENVIRONMENT-$INDEX_CACHE_NAME-RedisEndpointAddress'].[Value]" --output text --region $AWS_REGION)
- export CACHE_CLUSTER_INDEX_PORT=$(aws cloudformation list-exports --query "Exports[?Name=='$ENVIRONMENT-$INDEX_CACHE_NAME-RedisEndpointPort'].[Value]" --output text --region $AWS_REGION)
- export S3_DATA_BUCKET=$(aws cloudformation list-exports --query "Exports[?Name=='$ENVIRONMENT-S3BucketDataStorage'].[Value]" --output text --region $AWS_REGION)
- export SNS_TOPIC_NAME=$(aws cloudformation list-exports --query "Exports[?Name=='$ENVIRONMENT-OSDUSearchSNSTopic'].[Value]" --output text --region $AWS_REGION)
- echo ...finished setting environment variables!
- echo All environment variables
- printenv
- mvn clean test -pl indexer-core,provider/indexer-aws -Ddeployment.environment=$ENVIRONMENT -Ddeployment.repositorybucket=$S3_MAVEN_REPOSITORY -Daws.accessKeyId=$AWS_SECRET_KEY -Daws.secretKey=$AWS_ACCESS_KEY_ID -Dazure.devops.token=$VSTS_FEED_TOKEN -DCACHE_CLUSTER_SCHEMA_ENDPOINT=$CACHE_CLUSTER_SCHEMA_ENDPOINT -DCACHE_CLUSTER_SCHEMA_PORT=$CACHE_CLUSTER_SCHEMA_PORT -DCACHE_CLUSTER_GROUP_ENDPOINT=$CACHE_CLUSTER_SCHEMA_ENDPOINT -DCACHE_CLUSTER_SCHEMA_PORT=$CACHE_CLUSTER_SCHEMA_PORT -DCACHE_CLUSTER_INDEX_ENDPOINT=$CACHE_CLUSTER_INDEX_ENDPOINT -DCACHE_CLUSTER_INDEX_PORT=$CACHE_CLUSTER_INDEX_PORT -DSNS_TOPIC_NAME=$SNS_TOPIC_NAME -DAWS_ACCOUNT_ID=$AWS_ACCOUNT_ID -DAWS_REGION=$AWS_REGION
- mvn clean test -pl indexer-core,provider/indexer-aws -Ddeployment.environment=$ENVIRONMENT -Ddeployment.repositorybucket=$S3_MAVEN_REPOSITORY -Daws.accessKeyId=$AWS_SECRET_KEY -Daws.secretKey=$AWS_ACCESS_KEY_ID -Dazure.devops.token=$VSTS_FEED_TOKEN -DCACHE_CLUSTER_SCHEMA_ENDPOINT=$CACHE_CLUSTER_SCHEMA_ENDPOINT -DCACHE_CLUSTER_SCHEMA_PORT=$CACHE_CLUSTER_SCHEMA_PORT -DCACHE_CLUSTER_GROUP_ENDPOINT=$CACHE_CLUSTER_SCHEMA_ENDPOINT -DCACHE_CLUSTER_SCHEMA_PORT=$CACHE_CLUSTER_SCHEMA_PORT -DCACHE_CLUSTER_INDEX_ENDPOINT=$CACHE_CLUSTER_INDEX_ENDPOINT -DCACHE_CLUSTER_INDEX_PORT=$CACHE_CLUSTER_INDEX_PORT -DS3_DATA_BUCKET=$S3_DATA_BUCKET -DSNS_TOPIC_NAME=$SNS_TOPIC_NAME -DAWS_ACCOUNT_ID=$AWS_ACCOUNT_ID -DAWS_REGION=$AWS_REGION
- echo ...os-indexer Java build completed on `date`.
- echo os-indexer beginning packaging to jar...
- mvn clean deploy -pl indexer-core,provider/indexer-aws -Ddeployment.environment=$ENVIRONMENT -Ddeployment.repositorybucket=$S3_MAVEN_REPOSITORY -Daws.accessKeyId=$AWS_ACCESS_KEY_ID_MAVEN -Daws.secretKey=$AWS_SECRET_ACCESS_KEY_MAVEN -Dazure.devops.token=$VSTS_FEED_TOKEN
......
......@@ -16,16 +16,16 @@ aws.dynamodb.region=${AWS_REGION}
aws.dynamodb.endpoint=dynamodb.${AWS_REGION}.amazonaws.com
## AWS S3 configuration
aws.s3.records.bucket-name=dev-osdu-data
aws.s3.region=${AWS_REGION}
aws.s3.endpoint=s3.${AWS_REGION}.amazonaws.com
aws.s3.records.bucket-name=${ENVIRONMENT}-${S3_DATA_BUCKET}
aws.s3.max-record-threads=2000
aws.s3.enable-https=true
aws.s3.region=us-east-1
aws.s3.endpoint=s3.us-east-1.amazonaws.com
## AWS SNS configuration
aws.sns.region=us-east-1
aws.sns.arn=arn:aws:sns:us-east-1:888733619319:dev-osdu-indexer-messages
aws.sns.topic-name=dev-osdu-indexer-messages
aws.sns.region=${AWS_REGION}
aws.sns.arn=arn:aws:sns:${AWS_REGION}:${AWS_ACCOUNT_ID}:${ENVIRONMENT}-${SNS_TOPIC_NAME}
aws.sns.topic-name=${ENVIRONMENT}-${SNS_TOPIC_NAME}
## AWS SQS Configuration
aws.sqs.queue=dev-osdu-indexer-queue
......
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