Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context for the interruptible flag for GitLab #301

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/content/ci/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,18 @@ chromatic_publish:
stage: test
script:
- yarn chromatic
# Interruptible is optional, but recommended. It will save you build minutes.
# The external chromatic status checks won't cancel by default, so you'll
# end up with a lot of redundant builds that don't cancel each other.
interruptible: true
```

<div class="aside">

Use [interruptible](https://docs.gitlab.com/16.3/ee/ci/yaml/index.html#interruptible) if a job should be canceled when a newer pipeline starts before the job completes. This is the recommended strategy as the external status checks won't update by default, even if you create a new build for the same branch.

This keyword has no effect if [automatic cancellation of redundant pipelines](https://docs.gitlab.com/16.3/ee/ci/pipelines/settings.html#auto-cancel-redundant-pipelines) is disabled. When enabled, a running job with interruptible: true is cancelled when starting a pipeline for a new change on the same branch.

We recommend saving the project token as a masked environment variable named `CHROMATIC_PROJECT_TOKEN` for security reasons. When the Chromatic CLI is executed, it will read the environment variable automatically without any additional flags. Refer to the official GitLab [environment variables documentation](https://docs.gitlab.com/ee/ci/variables/index.html#mask-a-cicd-variable) to learn more about it.

</div>
Expand Down
Loading