Skip to content

GitLab apps

Introduced in v1.11.0

To connect your GitLab account to ZaneOps, you use GitLab apps.

  1. Go to Settings > Git:

    Git settings
  2. Choose Create GitHub app:

    Create GitLab app
  3. To get the credentials for the new app (Application ID and Application Secret) you need to create the app on your Gitlab instance:

    At https://{your-gitlab-instance}/-/profile/applications click on ** Add new application**:

    List gitlab apps

    Create a new application, with the scopes api, read_user and read_repository, and use the same value for the Redirect URI as in the previous step:

    Add new gitlab app on gitlab.com
  4. After submitting, you will be redirected to your GitLab instance and asked to authorize the application:

    Authorize gitlab app on gitlab.com
  5. Once authorized, you will be redirected back to ZaneOps where you will see the newly created app.

    you can test the application installation to make sure it has access to your repositories:

    Test GitLab app
  1. Go to your project > new service and choose Create from Git Provider: New service page
  2. Choose the newly created GitLab app in the list of available apps: Select Git app
  3. There you can select the repository you want to deploy: Create new Gitlab service
  4. Once deployed, you will notice in the logs, that your app is cloned using the Gitlab access token, meaning that it worked ! Git clone with access token

Newly created repositories are not Synchronized by default with Gitlab apps, instead you need to manually synchronize them from the dashboard:

Sync GitLab repositories

If you rotated the secret or updated the redirect URI of your application on your GitLab instance, you can edit the gitlab app and paste in the new credentials:

Edit Gitlab app

Once done, you will be redirected to your gitlab instance and will need to authorize the app again:

Authorize gitlab app on gitlab.com