Skip to content
Snippets Groups Projects

Support CI `paths`, `project`, and `ref` subkeys in `rules:exists`

Merged Leaminn Ma requested to merge ci-rules-exists-add-paths-project-ref into master
  1. Apr 10, 2024
  2. Apr 09, 2024
  3. Apr 08, 2024
    • Leaminn Ma's avatar
      Minor code refactor · 43c68abf
      Leaminn Ma authored
      Accessed the instance variables directly in
      find_project and find_sha instead of passing them
      along.
      Verified
      43c68abf
    • Leaminn Ma's avatar
      Support rules:exists subkeys `paths`, `project`, and `ref` · c3da05da
      Leaminn Ma authored
      Adds the ability to specify the context in which `rules:exists` searches
      for the given file paths. The subkeys `paths`, `project`, and `ref` can
      be specified.  If `project` is specified but not `ref`, the default
      `ref` is the project's HEAD. If `project` is not specified, the defaults
      are as follows:
      
      For `job:rules:exists`, the default context is the project/ref in
      which the pipeline is running.
      
      For `include:rules:exists`, the default context is the project/ref
      of the file in which the `include` is declared.
      
      These changes are made behind a Feature flag:
      `ci_support_rules_exists_paths_and_project`
      Verified
      c3da05da
Loading