Hasty Briefsbeta

Dynamically include files in GitLab-CI

20 days ago
  • #YAML
  • #API
  • #GitLab-CI
  • Dynamically include variables from a YAML file in a GitLab-CI pipeline.
  • YAML files named after version numbers (e.g., .gitlab/vars/1.0.yml) contain variables like LONG_VERSION and SHORT_VERSION.
  • Use the 'include' keyword in the pipeline to load the YAML file dynamically based on the VERSION variable.
  • Trigger the pipeline via an API call, passing the VERSION variable to specify which YAML file to include.