Skip to content

force run of chromatic with commt msg

Warren Gifford requested to merge wbezuide/rdy-review-commit-flag into main

Created by: burmudar

By specifying [force-run-step-chromatic] in the commit message a dev can now force the pipeline to run the chromatic step instead of marking their PR as ready for review

closes https://github.com/sourcegraph/sourcegraph/issues/30625

Test plan

  1. Add a graphql file to the diff so that the chromatic tests are triggered
  2. Normal pipeline run, without the commit message flag which means the pipeline will require a user to mark their PR as ready for review
❯ go run ./enterprise/dev/ci/gen-pipeline.go -yaml | grep "draft"
    if: build.pull_request.id != null && !build.pull_request.draft
❯ go run ./enterprise/dev/ci/gen-pipeline.go -yaml | grep "yarn chromatic"
    - ./tr yarn chromatic --exit-zero-on-changes --exit-once-uploaded | ./dev/ci/post-chromatic.sh
  1. Pipeline with the commit message flag, which allows the user to trigger the chromatic tests without the need to mark their PR as ready. The absense of if: build.pull_request.id != null && !build.pull_request.draft means the pipeline will run the chromatic tests
❯ BUILDKITE_MESSAGE="[force-run-step-chromatic]" go run ./enterprise/dev/ci/gen-pipeline.go -yaml | grep "yarn chromatic"
    - ./tr yarn chromatic --exit-zero-on-changes --exit-once-uploaded | ./dev/ci/post-chromatic.sh
❯ BUILDKITE_MESSAGE="[force-run-step-chromatic]" go run ./enterprise/dev/ci/gen-pipeline.go -yaml | grep "draft"

@jhchabran @bobheadxi I'm not a fan of the message flag wording so would be open to something better 🤔

Merge request reports

Loading