Skip to content

Badges in GitLab #1491

Answered by roadSurfer
roadSurfer asked this question in Q&A
Discussion options

You must be logged in to vote

I have manged to achieve this in GitLab Runner and Jenkins by following this basic process:

  1. Using the GitLab information to query DT and find the project id there
    1. Failing the build if not found
  2. Querying GitLab to see if the bade exists
    1. If it does, updating it (PUT)
    2. Otherwise creating it (POST)

Most of this is done in simple BASH, although it may be necessary to employ a curl-jq container in some instances.
Creating a standalone service to abstract all that away and simplify the CI/CD pipeline should be a trivial affair.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by roadSurfer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant