Add Source Control Management
Endpoints
VMware Aria Suite Lifecycle
can include
multiple repositories with branches on a source control server. By adding a Source Control
Management (SCM) endpoint, you can check in and check out SDDC content on the source control
server. - Verify that the appliance name and fully qualified domain name of theVMware Aria Suite Lifecycleinstance are available.
- Verify that the URL variable is assigned.url='https://LCM-Hostname'
- Verify that you have correct permissions.
- As DevOps administrator, verify that you are an organization owner inVMware Aria Suite Lifecyclewith an administrator role.
- As a developer, verify that you are an organization owner inVMware Aria Suite Lifecyclewith a user role.
- Verify thatVMware Aria Suite Lifecyclesupports the version of the source control server that you plan to use.Supported Source Control Server VersionsSCM Server TypeVersion nVersion (n-1)GitLab12.812.7GitHub2.20.12.19.8BitBucket CloudVersion 2.0N/ABitbucket Server7.06.10
As a DevOps administrator, you create a
project with a branch on the source control server. Then you assign access rights for
the branch to developers. After that, you use the API to add a source control server
endpoint in
VMware Aria Suite Lifecycle
. As a content
developer with access rights to the branch on the source control server, you can
generate a user token. Then you attach the token to the source control server and
create an SCM content endpoint.
- As a DevOps administrator, add a source control server endpoint inVMware Aria Suite Lifecycle. In this example, the source control server type is GitLab.VMware Aria Suite Lifecyclealso supports GitHub, Bitbucket Cloud, and Bitbucket Server types.curl -X POST \ '$url/lcm/cms/api/v1/endpoints' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ -d '{ "sourceControlType": "gitlab", "endpointType": "SERVER_ENDPOINT", "category": "SourceControl", "name": "gitlab.vmware.com", "server": "gitlab.vmware.com" }' | jq "."
- Examine the response and note the reference ID.A snippet of the response shows the endpoint ID listed as thereferenceID.{ "requestId":"2688b287-d50c-4f89-be42-2d707af26758", "status":"IN_PROGRESS", "message":"Endpoint Successfully Created", "referenceId":"567a280d-3419-4eb7-81c0-219902b8447c" }
- Set up access control in GitLab for the branch.
- Assign access rights for the branch to your developer.
- Provide your developer with the ID of the source control server endpoint.
- As a developer with access rights to the branch on the source control server, generate auserTokenwith full access for source control and assign the token to a variable name.SourceControlAccessToken = '<userToken>'
- Assign the reference ID of the source control server endpoint that you received from the DevOps administrator to a variable name.SourceControlServerEndpointID = '<referenceID>'
- Attach the token to the server endpoint.curl -X POST \ '$url/lcm/cms/api/v1/sourcecontrol/token/' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ -d '{ "endpointId": "{$SourceControlServerEndpointID}", "token": "{$SourceControlAccessToken}" }' | jq "."GitHub servers support credential-based access in addition to token-based access as shown in the following request example.curl -X POST \ '$url/lcm/cms/api/v1/sourcecontrol/token/' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ -d '{ "endpointId": "{$SourceControl_GitHubServer_EndpointID}", "userName": "{$SourceControlUserName}", "password": "{$SourceControlPassword}" }' | jq "."
- Create an SCM content endpoint to perform source control operations. In this example, you can perform operations such as checkin, checkout, and raise code reviews through the new endpoint.curl -X POST \ '$url/lcm/cms/api/v1/endpoints' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ -d '{ "tagNames": ["test123"], "supportCapture": true, "supportTest": true, "supportRelease": true, "name": "git-lab-content-endpoint", "category": "SourceControl", "sourceControlServerId": "{$SourceControlServerEndpointID}", "branch": "master", "repository": "example-test/feature", "server": "gitlab.vmware.com", "sourceControlType": "gitlab", "endpointType": "CONTENT_ENDPOINT" }' | jq "."
Use your SCM endpoint to manage
the following types of content:
- Automation-Component Profile
- Automation-Composite Blueprint
- Automation-Custom Form
- Automation-Property Definition
- Automation-Property Group
- Automation-Resource Map
- Automation-Resource Type
- Automation-Resource Action
- Automation-Software
- Automation-Subscription
- Automation-XaaS Blueprint
- Orchestrator-Package
- vSphere-Custom Spec
- Operations-Alert
- Operations-Dashboard
- Operations-Report
- Operations-ResourceKindMetricConfig
- Operations-SuperMetric
- Operations-Symptom
- Operations-TextWidgetContent
- Operations-TopoWidgetContent
- Operations-View