Configure Gitlab
This section discusses how you can configure Gitlab to integrate with Duplo
Prerequisites
To use GitLab CI/CD, you need to:
Deploy the application with DuploCloud as a Service and test that it works as expected.
GitLab CI/CD is recommended only for upgrades of container images and to run tests that can be written to run either before or after.
Configuring GitLab
In order to call a DuploCloud API from Gitlab, you will need to obtain an API token.
pageAPI tokensThe basic steps are:
(Recommended) Create a "service account" user in DuploCloud that will own the API token.
Give the DuploCloud user access to the desired tenant. See adding tenants to a user.
Create an API token for that user. See creating API Tokens.
Add a Gitlab Variable DUPLO_TOKEN that contains the DuploCloud API token.
Add another Gitlab variable DOCKERHUB_PASSWORD that contains DockerHub password.
Note: A 'service account' user in DuploCloud is just a user whose user name is not an email address, such as gitlab-bot
or my-api-user
. These users are not able to log in.
The rest of this documentation will assume that you named the Gitlab repository secret DUPLO_TOKEN
.
Last updated