Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.devtools bob.devtools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bob.devtoolsbob.devtools
  • Issues
  • #83
Closed
Open
Issue created Oct 11, 2021 by Samuel GAIST@samuel.gaistMaintainer

[suggestion] Change CI template include style

Currently the .gitlab-ci.yml template for all bob packages contains either one or two lines like the following:

include: 'https://gitlab.idiap.ch/bob/bob.devtools/raw/master/bob/devtools/data/gitlab-ci/single-package.yaml'

This has several drawbacks:

  1. The server address is hardcoded
  2. If there are incompatible changes to be done, there's no really easy way to test them without breaking a lot of packages
  3. If one needs to keep using an old version of that file to be able to continue building it's not really clear how to proceed

For these reasons, I suggest to change the template as well as the bob packages .gitlab-ci.yml to the following.

include:
  - project: 'bob/bob.devtools'
    ref: master
    file: '/bob/devtools/data/gitlab-ci/single-package.yaml'

This removes the server address so if there's a need to move stuff around, then there will be way less problems.

It also allows to retrieve the file from different branches if required in an easy fashion. For example if there's a massive change to the infrastructure, it allows to do that without breaking everything that is currently working.

The ref value can also be $CI_DEFAULT_BRANCH provided that the projects follow the same naming convention. It will thus allow to properly move from using master to main as default branch name.

Edited May 03, 2022 by Samuel GAIST
Assignee
Assign to
Time tracking