Skip to content

Commit

Permalink
fix: cicd pipeline permissions (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
maghirardelli authored Oct 12, 2022
1 parent 863cb06 commit 3e9d28a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions main/cicd/cicd-pipeline/config/infra/cloudformation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ Resources:
- cloudformation:GetTemplate
- cloudformation:ListStackResources
- cloudformation:DescribeStackEvents
- cloudformation:ExecuteChangeSet
- cloudformation:DescribeChangeSet
- cloudformation:CreateChangeSet
- cloudformation:DeleteChangeSet
Resource:
- !Sub 'arn:aws:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${self:custom.settings.namespace}-*'
- !Sub 'arn:aws:cloudformation:us-east-1:${AWS::AccountId}:stack/${self:custom.settings.envName}-va-${self:custom.settings.solutionName}-*'
Expand Down Expand Up @@ -658,7 +662,7 @@ Resources:
Image: aws/codebuild/amazonlinux2-x86_64-standard:2.0
EnvironmentVariables:
- Name: DEPLOYMENT_BUCKET
Value: ${self:provider.deploymentBucket}
Value: ${self:provider.deploymentBucket.name}
- Name: ENV_NAME
Value: ${self:custom.settings.stgEnvName}
ServiceRole: !GetAtt AppDeployerRole.Arn
Expand Down Expand Up @@ -687,7 +691,7 @@ Resources:
Image: aws/codebuild/amazonlinux2-x86_64-standard:2.0
EnvironmentVariables:
- Name: DEPLOYMENT_BUCKET
Value: ${self:provider.deploymentBucket}
Value: ${self:provider.deploymentBucket.name}
- Name: ENV_NAME
Value: ${self:custom.settings.envName}
ServiceRole: !GetAtt AppDeployerRole.Arn
Expand All @@ -714,7 +718,7 @@ Resources:
Image: aws/codebuild/amazonlinux2-x86_64-standard:2.0
EnvironmentVariables:
- Name: DEPLOYMENT_BUCKET
Value: ${self:provider.deploymentBucket}
Value: ${self:provider.deploymentBucket.name}
- Name: ENV_NAME
Value: ${self:custom.settings.stgEnvName}
ServiceRole: !GetAtt AppDeployerRole.Arn
Expand All @@ -741,7 +745,7 @@ Resources:
Image: aws/codebuild/amazonlinux2-x86_64-standard:2.0
EnvironmentVariables:
- Name: DEPLOYMENT_BUCKET
Value: ${self:provider.deploymentBucket}
Value: ${self:provider.deploymentBucket.name}
- Name: ENV_NAME
Value: ${self:custom.settings.envName}
ServiceRole: !GetAtt AppDeployerRole.Arn
Expand Down Expand Up @@ -769,7 +773,7 @@ Resources:
Image: aws/codebuild/amazonlinux2-x86_64-standard:2.0
EnvironmentVariables:
- Name: DEPLOYMENT_BUCKET
Value: ${self:provider.deploymentBucket}
Value: ${self:provider.deploymentBucket.name}
- Name: ENV_NAME
Value: ${self:custom.settings.envName}
ServiceRole: !GetAtt AppDeployerRole.Arn
Expand Down
4 changes: 2 additions & 2 deletions main/cicd/cicd-pipeline/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ custom:
Name: ${self:custom.settings.envName}-${self:service}
hooks:
'aws:deploy:finalize:cleanup':
- scripts/upload-env-config-if-not-versioned.sh ${self:provider.profile} ${self:provider.deploymentBucket} ${self:custom.settings.stgEnvName} ${self:custom.settings.envName}
- scripts/upload-test-config-if-not-versioned.sh ${self:provider.profile} ${self:provider.deploymentBucket} ${self:custom.settings.stgEnvName} ${self:custom.settings.envName}
- scripts/upload-env-config-if-not-versioned.sh ${self:provider.profile} ${self:provider.deploymentBucket.name} ${self:custom.settings.stgEnvName} ${self:custom.settings.envName}
- scripts/upload-test-config-if-not-versioned.sh ${self:provider.profile} ${self:provider.deploymentBucket.name} ${self:custom.settings.stgEnvName} ${self:custom.settings.envName}

resources:
- Description: Service-Workbench-on-AWS ${self:custom.settings.version} ${self:custom.settings.solutionName} ${self:custom.settings.envName} CICD-Pipeline
Expand Down

0 comments on commit 3e9d28a

Please sign in to comment.