From 0824cbde3761e7954fd0d7d17dcc820b253d45c2 Mon Sep 17 00:00:00 2001
From: Sutton <suttonsp@147dda3a90de.ant.amazon.com>
Date: Wed, 3 Feb 2021 09:55:08 -0600
Subject: [PATCH] Fixing key expiration error

---
 provider/legal-aws/build-aws/buildspec.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/provider/legal-aws/build-aws/buildspec.yaml b/provider/legal-aws/build-aws/buildspec.yaml
index 657c4e279..d30515130 100644
--- a/provider/legal-aws/build-aws/buildspec.yaml
+++ b/provider/legal-aws/build-aws/buildspec.yaml
@@ -27,6 +27,9 @@ phases:
     runtime-versions:
       java: corretto8
     commands:
+      # fix error noted here: https://github.com/yarnpkg/yarn/issues/7866
+      - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
+      
       - if [ $(echo $CODEBUILD_SOURCE_VERSION | grep -c  ^refs/heads.*) -eq 1 ]; then echo "Branch name found"; else echo "This build only supports branch builds" && exit 1; fi
       - apt-get update -y -qq > /dev/null
       - apt-get install -y maven -qq > /dev/null
@@ -42,8 +45,6 @@ phases:
     commands:
       - echo "Logging in to Amazon ECR..."
       - $(aws ecr get-login --no-include-email --region $AWS_REGION) # authenticate with ECR via the AWS CLI
-      # fix error noted here: https://github.com/yarnpkg/yarn/issues/7866
-      - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
   build:
     commands:
       - export REPO_NAME=${PWD##*/}
-- 
GitLab