Skip to content

chore: automate tagging with gitlab version in release pipeline

David O'Regan requested to merge 44-self-hosted-tags into main

A small MVC for Automate generating `self-hosted-*` tags on AIG... (gitlab-org/ai-powered/custom-models/custom-models#44 - moved) • David O'Regan • 17.5.

Problem to solve

Currently, the process of tagging AI Gateway (AIGW) versions to match GitLab versions is manual. This makes it difficult for customers to know which version of AIGW to use with their specific GitLab version, especially for older installations.

Proposal

Automate the tagging process in the release CI pipeline to create a tag on AIGW with the name self-hosted-{gitlab-tag}. This ensures that customers can easily identify the compatible version of AIGW for their GitLab installation.

Implementation

  • Add a new job in the .gitlab-ci.yml file under the release stage.
  • The job should:
    • Get the latest commit hash.
    • Create a new tag prefixed with self-hosted- followed by the GitLab version.
    • Push the new tag to the repository.

Example Configuration:

tag-self-hosted:
  stage: release
  needs:
    - build-docker-model-gateway
  script:
    - |
      latest_commit=$(git rev-parse HEAD)
      git tag "self-hosted-${CI_COMMIT_TAG}" ${latest_commit}
      git push origin "self-hosted-${CI_COMMIT_TAG}"
  rules:
    - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/

Benefits

  • Ensures compatibility between GitLab and AI Gateway versions.
  • Simplifies the process for customers to identify the correct version of AIGW to use.
  • Reduces manual effort and potential errors in the tagging process.

Additional Notes

  • Ensure that the job runs only when a new GitLab version tag is created.
  • Update the documentation to reflect the new automated tagging process.

Merge request reports

Loading