Skip to content
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

[sdlf-cicd] github support as an alternative to codecommit #374

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

cnfait
Copy link
Contributor

@cnfait cnfait commented Aug 5, 2024

Issue #, if available:
#328 although support here is only for public GitHub.

Description of changes:
Replace CodeCommit entirely with GitHub - all SDLF repositories (components, main and team repositories) can now be hosted on GitHub. This does not replace CodeBuild and CodePipeline, GitHub Actions are not used.

Creating repositories is done through CloudFormation third-party resource types: https://github.com/aws-ia/cloudformation-github-resource-providers/tree/main/GitHub-Repositories-Repository

Currently SDLF is quite rigid in terms of setup for GitHub, in part due to limitations of the aforementioned resource types.

  • Setup a CodeConnection to GitHub.
  • Populate /SDLF/GitHub/CodeConnection in SSM Parameter Store with the ARN of the CodeConnection.
  • Put the access token in /SDLF/GitHub/AccessToken in SSM Parameter Store as a secure string.
  • Enable the third-party resource type GitHub::Repositories::Repository on CloudFormation Registry. Do not forget to configure it.
  • Use -f github when deploying SDLF with deploy.sh.

Resource type configuration example:

{
    "GitHubAccess": {
        "AccessToken": "{{resolve:ssm-secure:/cfn/github/accesstoken:1}}"
    }
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@cnfait cnfait self-assigned this Aug 5, 2024
Replace CodeCommit entirely with GitHub - all SDLF repositories (components, main and team repositories)
can now be hosted on GitHub. This does *not* replace CodeBuild and CodePipeline, GitHub Actions are not used.

Creating repositories is done through CloudFormation third-party resource types:
https://github.com/aws-ia/cloudformation-github-resource-providers/tree/main/GitHub-Repositories-Repository

Currently SDLF is quite rigid in terms of setup for GitHub, in part due to limitations of the aforementioned resource types.
* Setup a CodeConnection to GitHub.
* Populate `/SDLF/GitHub/CodeConnection` in SSM Parameter Store with the ARN of the CodeConnection.
* Put the access token in `/SDLF/GitHub/AccessToken` in SSM Parameter Store as a secure string.
* Enable the third-party resource type `GitHub::Repositories::Repository` on CloudFormation Registry. Do not forget to configure it.
* Use `-f github` when deploying SDLF with `deploy.sh`.

Resource type configuration example:
```
{
    "GitHubAccess": {
        "AccessToken": "{{resolve:ssm-secure:/cfn/github/accesstoken:1}}"
    }
}
```
@cnfait cnfait merged commit 8880acf into main Aug 5, 2024
2 of 3 checks passed
@cnfait cnfait deleted the github-support branch August 5, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant