-
Notifications
You must be signed in to change notification settings - Fork 34
Codecommit deprecation #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
durdina
wants to merge
6
commits into
aws-samples:main
Choose a base branch
from
durdina:codecommit-deprecation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2f4f501
Making ECR repo mutable to fix tagging with 'latest'
durdina 4369c4f
Removal of AWS CodeCommit dependency
durdina 7af995d
Removing unnecessary export
durdina 313bec0
Fixing conflicts of libcrypto3 and libssl3
durdina d341a0c
Upgrade to code-guru-profiler 1.2.3 && fixing ENV deprecated syntax
durdina 86a5c11
Prettifying yaml code
durdina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,16 @@ AWSTemplateFormatVersion: 2010-09-09 | |
Description: CFN Template to deploy CodePipeline to build Docker Image of java application and push to ECR and deploy to EKS following DevSecOps Practices | ||
|
||
Parameters: | ||
SourceRepoConnection: | ||
Type: String | ||
Description: > | ||
ARN of connection to GitHub account where the code resides. Connection can be created via CLI or Console in Pending state but then needs to | ||
be activated in Console (https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create-github.html). | ||
SourceRepoName: | ||
Type: String | ||
Description: AWS CodeCommit RepoName where code resides | ||
Description: > | ||
GitHub RepoName where code resides. You must maintain the correct case for the SourceRepoName value. | ||
For example, if your user name is some-user and repo name is My-Repo, the recommended value of SourceRepoName is some-user/My-Repo. | ||
CodeBranchName: | ||
Type: String | ||
Default: main | ||
|
@@ -45,13 +52,6 @@ Resources: | |
Name: MySecurityHub | ||
Purpose: Security | ||
|
||
SourceRepositoryAssociation: | ||
Type: AWS::CodeGuruReviewer::RepositoryAssociation | ||
Properties: | ||
Name: !Ref SourceRepoName | ||
Type: CodeCommit | ||
BucketName: !Ref CodeGuruReviewerBucket | ||
|
||
MyProfilingGroup: | ||
Type: AWS::CodeGuruProfiler::ProfilingGroup | ||
Properties: | ||
|
@@ -341,6 +341,8 @@ Resources: | |
- s3:GetObject | ||
- s3:GetObjectVersion | ||
- s3:GetBucketVersioning | ||
- s3:DeleteObject | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There were warnings in build.log if these permissions were missing:
|
||
- s3:DeleteObjectVersion | ||
Effect: Allow | ||
Resource: | ||
- !Sub arn:${AWS::Partition}:s3:::${CodeGuruReviewerBucket} | ||
|
@@ -408,16 +410,11 @@ Resources: | |
PolicyDocument: | ||
Version: 2012-10-17 | ||
Statement: | ||
- Resource: !Sub arn:${AWS::Partition}:codecommit:${AWS::Region}:${AWS::AccountId}:${SourceRepoName} | ||
- Resource: !Ref SourceRepoConnection | ||
Effect: Allow | ||
Action: | ||
- codecommit:GetBranch | ||
- codecommit:GetCommit | ||
- codecommit:ListRepositories | ||
- codecommit:GetRepository | ||
- codecommit:UploadArchive | ||
- codecommit:GetUploadArchiveStatus | ||
- codecommit:CancelUploadArchive | ||
- codeconnections:UseConnection | ||
- codestar-connections:UseConnection | ||
- Resource: | ||
- !Sub arn:${AWS::Partition}:codebuild:${AWS::Region}:${AWS::AccountId}:project/${CodeBuildImageProject} | ||
- !Sub arn:${AWS::Partition}:codebuild:${AWS::Region}:${AWS::AccountId}:project/${CodeDeployImageProject} | ||
|
@@ -428,14 +425,6 @@ Resources: | |
- codebuild:BatchGetBuilds | ||
- codebuild:BatchGetBuildBatches | ||
- codebuild:StartBuildBatch | ||
- Resource: !GetAtt SourceRepositoryAssociation.AssociationArn | ||
Effect: Allow | ||
Action: | ||
- codeguru-reviewer:List* | ||
- codeguru-reviewer:Describe* | ||
- codeguru-reviewer:Get* | ||
- codeguru:Get* | ||
- codeguru-reviewer:CreateCodeReview | ||
- Resource: !Sub arn:${AWS::Partition}:ecr:${AWS::Region}:${AWS::AccountId}:repository/${EcrDockerRepository} | ||
Effect: Allow | ||
Action: | ||
|
@@ -516,7 +505,8 @@ Resources: | |
- cloudwatch:DescribeAlarmsForMetric | ||
- iam:GenerateCredentialReport | ||
- iam:GetCredentialReport | ||
- Resource: !Sub arn:${AWS::Partition}:securityhub:${AWS::Region}::product/aquasecurity/aquasecurity | ||
- Sid: MakeSureToManuallyEnableIntegrationForAquasecurityInSecurityHubConsoleOtherwiseThisWontWork | ||
Resource: !Sub arn:${AWS::Partition}:securityhub:${AWS::Region}::product/aquasecurity/aquasecurity | ||
Effect: Allow | ||
Action: | ||
- securityhub:BatchImportFindings | ||
|
@@ -530,17 +520,17 @@ Resources: | |
- logs:CreateLogGroup | ||
- logs:CreateLogStream | ||
- logs:PutLogEvents | ||
- Resource: !Sub arn:${AWS::Partition}:codecommit:${AWS::Region}:${AWS::AccountId}:${SourceRepoName} | ||
- Resource: !Ref SourceRepoConnection | ||
Effect: Allow | ||
Action: | ||
- codecommit:GitPull | ||
- codecommit:TagResource | ||
- codeconnections:UseConnection | ||
- codestar-connections:UseConnection | ||
- codeconnections:GetConnectionToken | ||
- Resource: "*" | ||
Effect: Allow | ||
Action: | ||
- codeguru-reviewer:AssociateRepository | ||
- Resource: | ||
- !GetAtt SourceRepositoryAssociation.AssociationArn | ||
- !Sub arn:${AWS::Partition}:codeguru-reviewer:${AWS::Region}:${AWS::AccountId}:* | ||
Effect: Allow | ||
Action: | ||
|
@@ -618,8 +608,6 @@ Resources: | |
Artifacts: | ||
Type: CODEPIPELINE | ||
Source: | ||
Location: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Location is ignored in conjunction with |
||
Fn::Sub: https://git-codecommit.${AWS::Region}.amazonaws.com/v1/repos/${SourceRepoName} | ||
Type: CODEPIPELINE | ||
BuildSpec: "buildspec/buildspec_secscan.yaml" | ||
TimeoutInMinutes: 30 | ||
|
@@ -649,8 +637,6 @@ Resources: | |
Artifacts: | ||
Type: CODEPIPELINE | ||
Source: | ||
Location: | ||
Fn::Sub: https://git-codecommit.${AWS::Region}.amazonaws.com/v1/repos/${SourceRepoName} | ||
Type: CODEPIPELINE | ||
BuildSpec: "buildspec/buildspec.yml" | ||
TimeoutInMinutes: 30 | ||
|
@@ -680,8 +666,6 @@ Resources: | |
Artifacts: | ||
Type: CODEPIPELINE | ||
Source: | ||
Location: | ||
Fn::Sub: https://git-codecommit.${AWS::Region}.amazonaws.com/v1/repos/${SourceRepoName} | ||
Type: CODEPIPELINE | ||
BuildSpec: "buildspec/buildspec_deploy.yml" | ||
TimeoutInMinutes: 30 | ||
|
@@ -729,12 +713,12 @@ Resources: | |
Category: Source | ||
Owner: AWS | ||
Version: 1 | ||
Provider: CodeCommit | ||
Provider: CodeStarSourceConnection | ||
Configuration: | ||
ConnectionArn: !Ref SourceRepoConnection | ||
FullRepositoryId: !Ref SourceRepoName | ||
BranchName: !Ref CodeBranchName | ||
OutputArtifactFormat: CODEBUILD_CLONE_REF | ||
RepositoryName: | ||
Ref: SourceRepoName | ||
OutputArtifacts: | ||
- Name: SourceCodeApp | ||
RunOrder: 1 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed as command is executed with full path
$BASE/aws-codeguru-cli/bin/aws-codeguru-cli