File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,15 @@ pipeline {
6363        AWS_SECRET_ACCESS_KEY  =  credentials(' aws-secret-key'  )
6464        AWS_DEFAULT_REGION  =  ' eu-west-2' 
6565        ROLE_ARN  =  credentials(' home-server-role-arn'  )
66+         HS_ACCOUNT_ID  =  credentials(' home-server-aws-account-id'  )
6667      }
6768      steps {
6869        script {
6970          sh ''' 
7071            ./build/aws/assume-role.sh; 
71-             aws ecr get-login-password | docker login -u AWS --password-stdin "https://$(aws sts get-caller-identity --query 'Account' --output text) .dkr.ecr.eu-west-2 .amazonaws.com" 
72-             docker tag cjww-development/gatekeeper:${TAG_NAME} $(aws sts get-caller-identity --query 'Account' --output text) .dkr.ecr.eu-west-2 .amazonaws.com/gatekeeper:${TAG_NAME} 
73-             docker push $(aws sts get-caller-identity --query 'Account' --output text) .dkr.ecr.eu-west-2 .amazonaws.com/gatekeeper:${TAG_NAME} 
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} 
7475          '''  
7576        }
7677      }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments