Skip to content

Commit b7b543e

Browse files
committed
Refactored HS account creds
1 parent 05e203d commit b7b543e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Jenkinsfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,17 @@ pipeline {
5959
buildingTag()
6060
}
6161
environment {
62-
AWS_ACCESS_KEY_ID = credentials('aws-access-key')
63-
AWS_SECRET_ACCESS_KEY = credentials('aws-secret-key')
62+
AWS_ACCESS_KEY_ID = credentials('home-server-aws-access-key')
63+
AWS_SECRET_ACCESS_KEY = credentials('home-server-aws-secret-key')
6464
AWS_DEFAULT_REGION = 'eu-west-2'
65-
ROLE_ARN = credentials('home-server-role-arn')
6665
HS_ACCOUNT_ID = credentials('home-server-aws-account-id')
6766
}
6867
steps {
6968
script {
7069
sh '''
71-
./build/aws/assume-role.sh;
72-
aws ecr get-login-password | docker login -u AWS --password-stdin "https://${HS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
73-
docker tag cjww-development/gatekeeper:${TAG_NAME} ${HS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/gatekeeper:${TAG_NAME}
74-
docker push ${HS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/gatekeeper:${TAG_NAME}
70+
aws ecr get-login-password | docker login -u AWS --password-stdin "https://${HS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com";
71+
docker tag cjww-development/gatekeeper:${TAG_NAME} ${HS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/gatekeeper:${TAG_NAME};
72+
docker push ${HS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/gatekeeper:${TAG_NAME};
7573
'''
7674
}
7775
}

0 commit comments

Comments
 (0)