GitLab CI Events Proposal 2: Using the rules keyword

Can we do it with our current rules system?

workflow:
  rules:
    - events: ["package/*"]

test_package_published:
  script: echo testing published package
  rules:
    - events: ["package/published"]

test_package_removed:
  script: echo testing removed package
  rules:
    - events: ["package/removed"]
  1. We don’t upsert subscriptions to the database.
  2. We’ll have a single worker which runs when something happens in GitLab.
  3. The worker just tries to create a pipeline with the correct parameters.
  4. Pipeline runs when rules subsystem finds a job to run.

Challenges

  1. For every defined event run, we need to enqueue a new pipeline creation worker.
  2. Creating pipelines and selecting builds to run is a relatively expensive operation
  3. This will not work on GitLab.com scale.
Last modified August 23, 2024: Ensure frontmatter is consistent (e47101dc)