You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[sdlf-cicd] github support as an alternative to codecommit
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}}"
}
}
```
# when enabling Gitlab support, /SDLF/GitLab/Url and /SDLF/GitLab/AccessToken are required too (as secure strings)
45
+
# when enabling GitLab support, /SDLF/GitLab/Url, /SDLF/GitLab/Group (containing the group or user name) and /SDLF/GitLab/AccessToken are required too (as secure strings)
48
46
# then enable GitLab::Projects::Project third-party resource type in CloudFormation Registry
49
47
rGitlabFeatureSsm:
50
48
Type: AWS::SSM::Parameter
51
49
Properties:
52
50
Name: /SDLF/GitLab/Enabled
53
51
Type: String
54
-
Value: !Ref pEnableGitlab
52
+
Value: !If
53
+
- GitPlatformGitLab
54
+
- true
55
+
- false
55
56
Description: Create repositories on GitLab instead of CodeCommit
56
57
58
+
# when enabling GitHub support, /SDLF/GitHub/Group (containing the org or user name) and /SDLF/GitHub/AccessToken are required too (as secure strings)
59
+
# then enable GitHub::Repositories::Repository third-party resource type in CloudFormation Registry
60
+
rGithubFeatureSsm:
61
+
Type: AWS::SSM::Parameter
62
+
Properties:
63
+
Name: /SDLF/GitHub/Enabled
64
+
Type: String
65
+
Value: !If
66
+
- GitPlatformGitHub
67
+
- true
68
+
- false
69
+
Description: Create repositories on GitHub instead of CodeCommit
0 commit comments