This procedure demonstrates configuring GitLab integration in Automation Assembler so that you can work with cloud templates in the repository and automatically download saved templates that are associated with designated projects. To use cloud templates with GitLab, you must create a connection to an appropriate GitLab instance, and then save the desired templates to that instance.
When GitLab integration is configured with an existing repository, all cloud templates associated with selected projects become available to qualified users. You can use these templates with an existing deployment or as the basis of a new deployment. When you add a project, you must select some properties regarding where and how it is stored in GitLab.
If you update a draft cloud template imported from Git, and its content differs from that in the top version, the draft will not be updated in subsequent syncs and a new version is created. If you want to update a cloud template and also allow further sync's from Git, then you must create a new version after final changes.
After you set up your cloud templates for use with GitLab and collect required information, you must set up integration with your GitLab instance. Then, you can import the designated cloud templates into GitLab.
Prerequisites
- Extract an API key for the applicable repository. In your GitLab account, select your login in the upper right corner, and navigate to the Settings menu. Select Access Tokens, then name your token, set an expiration date. Then, select API and create the token. Copy the resulting value and save it.
- Configure and store cloud templates to be integrated with GitLab correctly. Only valid templates are imported into GitLab. See How do I use Git integration in Automation Assembler.
Procedure
- Set up integration with your GitLab environment in Automation Assembler.
- Select and choose GitLab.
- Enter the URL for your GitLab instance. For a software as a service GitLab instance, in most cases, it will be gitlab.com.
- Enter the Token, also known as an API key, for the specified GitLab instance. See the prerequisites above for information about extracting the token from your GitLab instance.
- Add an appropriate Name and Description.
- Click Validate to verify the connection.
- Add capability tags if desired. See Using capability tags in Automation Assembler for more information.
- Click Add.
- Configure the GitLab connection to accept cloud templates in an appropriate repository.
- Select and choose the appropriate GitLab integration.
- Select Projects.
- Select New Project and create a name for the project.
- Enter the Repository path within GitLab. Typically, this is the user name of the main account appended to the repository name.
- Enter the appropriate GitLab Branch that you want to use.
- If applicable, enter a Folder name. If left blank, all folders are available.
- Enter an appropriate Type. If applicable, enter a folder name. If left blank, all folders are available.
- Click Next to finish adding the repository.
When you click Next, an automated synchronization task is initiated that imports cloud templates into the platform.When the synchronization tasks are complete, a message indicates that the cloud templates have been imported.
Results
You can now retrieve cloud templates from GitLab.