Skip to content

Commit e092b9c

Browse files
committed
[sdlf-cicd] custom resource with GitLab API call for initial repositories
1 parent 1ea4c74 commit e092b9c

File tree

2 files changed

+148
-151
lines changed

2 files changed

+148
-151
lines changed

docs/constructs/cicd.md

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -91,50 +91,15 @@ Rnabled by setting `pEnableLambdaLayerBuilder` to `true` when deploying `templat
9191

9292
### GitLab
9393

94-
- Create a dedicated user on GitLab. Currently the user must be named: `sdlf`.
95-
- Create an access token with the `sdlf` user. The token name must be named `aws`. Permissions must be `api` and `write_repository`.
96-
- Create [CodeConnections](https://docs.aws.amazon.com/codepipeline/latest/userguide/connections-gitlab-managed.html) for the self-managed GitLab instance
94+
The creation of GitLab repositories will be performed through the GitLab API.
9795

9896
Populate:
9997

10098
- `/SDLF/GitLab/Url` :: secure-string :: GitLab URL **with** trailing `/`
10199
- `/SDLF/GitLab/AccessToken` :: secure-string :: User access token
100+
- `/SDLF/GitLab/NamespaceId` :: secure-string :: User/Enterprise namespace ID
102101
- `/SDLF/GitLab/CodeConnection` :: string :: CodeConnections ARN
103102

104-
Create CloudFormation role:
105-
106-
```
107-
{
108-
"Version": "2012-10-17",
109-
"Statement": [
110-
{
111-
"Effect": "Allow",
112-
"Principal": {
113-
"Service": "resources.cloudformation.amazonaws.com"
114-
},
115-
"Action": "sts:AssumeRole",
116-
"Condition": {
117-
"StringEquals": {
118-
"aws:SourceAccount": "111111111111"
119-
}
120-
}
121-
]
122-
}
123-
```
124-
125-
Enable `GitLab::Projects::Project` third-party resource type in CloudFormation Registry.
126-
127-
Add configuration (use of ssm-secure is mandatory):
128-
129-
```
130-
{
131-
"GitLabAccess": {
132-
"AccessToken": "{{resolve:ssm-secure:/SDLF/GitLab/AccessToken:1}}",
133-
"Url": "{{resolve:ssm-secure:/SDLF/GitLab/Url:1}}"
134-
}
135-
}
136-
```
137-
138103
## Interface
139104

140105
There is no external interface.

0 commit comments

Comments
 (0)