Skip to content

Commit 8d0f7e3

Browse files
committed
Updating buildspec.yml to use Google credentials JSON file
1 parent 549392a commit 8d0f7e3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

buildspec.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
version: 0.2
22

33
env:
4+
shell: bash
45
git-credential-helper: yes
56
parameter-store:
67
DOCKER_HUB_USER: '/devops/shared/DOCKER_HUB_USER'
@@ -19,17 +20,19 @@ phases:
1920
- sentry-cli --version
2021
pre_build:
2122
commands:
23+
- eval $(./aws-env --recursive)
2224
- export APP_BUILD_VERSION=${CODEBUILD_RESOLVED_SOURCE_VERSION}__$(date -u '+%Y-%m-%dT%T+00:00')
2325
- export PKG_VERSION=$(node -p "require('./package.json').version")
2426
- export SENTRY_VERSION=${ENV}-${PKG_VERSION}_BUILD_${CODEBUILD_RESOLVED_SOURCE_VERSION}
2527
- echo $APP_BUILD_VERSION > ./src/.version
2628
- cat ./src/.version
2729
- aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $DOCKER_REPOSITORY_URI
2830
- IMAGE_TAG=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
31+
2932
build:
3033
commands:
31-
#- chmod +x ./codebuild-git-wrapper.sh
32-
#- ./codebuild-git-wrapper.sh "$REPO_URL" "$REPO_BRANCH"
34+
- aws s3 cp s3://gameshq-build-pipeline-artifact-bucket/gameshq/google_credentials_games_api_staging.json ./google_credentials_games_api_staging.json
35+
- aws s3 cp s3://gameshq-build-pipeline-artifact-bucket/gameshq/google_credentials_games_api_prod.json ./google_credentials_games_api_prod.json
3336
- echo $DOCKER_HUB_PASSWORD | docker login --username $DOCKER_HUB_USER --password-stdin
3437
- docker build -t $DOCKER_REPOSITORY_URI:latest .
3538
- docker tag $DOCKER_REPOSITORY_URI:latest $DOCKER_REPOSITORY_URI:$IMAGE_TAG

0 commit comments

Comments
 (0)