Name: gitlab-crucible-bridge
Owner: AOE
Description: Translates GitLab webhooks into Crucible sync triggers
Created: 2017-12-04 06:41:52.0
Updated: 2017-12-07 11:38:41.0
Pushed: 2017-12-11 19:55:25.0
Homepage: null
Size: 6
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This project provided some glue code to trigger a SCM refresh in Crucible via GitLab webhooks.
To trigger an SCM refresh in Crucible you need the Crucible project ID. GitLab sends the git url within its webhooks. To be able to leverage GitLab webhooks as a trigger for refreshing Crucible we need to convert between git urls and Crucible project IDs. This tool periodically (with configurable time periods) downloads a project list from Crucible, normalizes the git url (to be able to handle http(s) and ssh urls) and uses that list whenever a GitLab webhook comes in to trigger a refresh.
The app uses the incremental-index
endpoint in Crucible which is the only endpoint which can be accessed via API key for now. For downloading the projects list we need to use real credentials.
Tested with:
You can use GitLab's “System Hooks”. There is no special configuration in each GitLab repository needed. All you have to do is to configure a “System Hook” for Push events or Tag push events and provide a Secret Token.
All of the following settings are required!
| Environment Variable | Description | Example |
| ——————– | ———– | ——- |
|CRUCIBLE_API_BASE_URL
|The base url to the |https://crucible.example.com/cru/rest-service-fecru
|
|CRUCIBLE_API_KEY
|The API key which is used for triggering a refresh in Crucible. Look at the Crucible documentation on how to generate that.|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|
|CRUCIBLE_USERNAME
|Username of a Crucible user which can access the project list|username|
|CRUCIBLE_PASSWORD
|Password of a Crucible user which can access the project list|password|
|CRUCIBLE_PROJECT_REFRESH_INTERVAL
|How often the repository list should be refreshed. (In minutes)|60|
|CRUCIBLE_PROJECT_LIMIT
|Limit of how many projects should be fetched from Crucible. Currently the app doesn't download the list paginated so you have to specify at least the number of total projects you have.|1000|
|GITLAB_TOKEN
|A token in the GitLab webhook which will be used for validation in the app.|some_token|