@ckeditor/ckeditor5-dev-ci
v55.5.0
Published
Utils used on various Continuous Integration services.
Readme
CKEditor 5 CI utilities
Utils for CKEditor 5 CI builds.
Contains tools for sending Slack notifications by Circle CI.
Available scripts
These commands accept a mix of environment variables and command line arguments. Environment variables are preferred when the value comes from the CI environment or is sensitive (like tokens). Command line arguments are preferred when the value is static or local to a given repository.
[!WARNING] Tokens are passed as environment variables to avoid exposing sensitive credentials in shell history, CI logs, or shared configuration files.
⚙️
ckeditor5-dev-ci-circle-disable-auto-cancel-buildsDisables the “Auto-cancel redundant workflows” option in CircleCI for a given repository. Useful during release processes to prevent CircleCI from canceling the workflow triggered by the release commit itself.
Environment variables:
CKE5_CIRCLE_TOKEN— CircleCI API token used for authentication.
Parameters:
--organization— GitHub organization name.--repository— GitHub repository name.
⚙️
ckeditor5-dev-ci-circle-enable-auto-cancel-buildsEnables the “Auto-cancel redundant workflows” option in CircleCI for a given repository. Should be used after a release workflow that temporarily disables this option using the
ckeditor5-dev-ci-circle-disable-auto-cancel-buildsscript.Environment variables:
CKE5_CIRCLE_TOKEN— CircleCI API token used for authentication.
Parameters:
--organization— GitHub organization name.--repository— GitHub repository name.
⚙️
ckeditor5-dev-ci-circle-workflow-notifierWaits for all jobs in the current CircleCI workflow to finish (success or error) and then runs a final command (the "notifier"). Intended to run as a dedicated job in your workflow. The script itself handles waiting – you typically don’t add
requireson this job.Environment variables:
CKE5_CIRCLE_TOKEN— CircleCI API token used for authentication.
CircleCI-provided variables:
CIRCLE_WORKFLOW_ID— ID of the current workflow.CIRCLE_JOB— Name of the current job.
Parameters:
--task— Command to execute at the end; default:pnpm ckeditor5-dev-ci-notify-circle-status.--ignore— Job name to ignore when waiting (repeatable; can be passed multiple times).
Behavior:
- Retries transient CircleCI API errors up to 5 attempts with a 10s delay between attempts.
- Fails immediately for non-retryable API errors (for example: invalid token or wrong workflow ID).
- If transient errors persist, it exits with an explicit message asking to verify workflow results manually.
⚙️
ckeditor5-dev-ci-is-job-triggered-by-memberVerifies that a CircleCI approval job was approved by a user who belongs to a specified GitHub team. Uses CircleCI and GitHub APIs to check the approver against the team membership.
Environment variables:
CKE5_CIRCLE_TOKEN— CircleCI API token used for authentication.CKE5_GITHUB_TOKEN— GitHub token used to query team membership.
CircleCI-provided variables:
CIRCLE_WORKFLOW_ID— ID of the current workflow.
Parameters:
--job— Name of the approval job to verify.--organization— GitHub organization name.--team— GitHub team name (slug) to validate against.
⚙️
ckeditor5-dev-ci-is-workflow-restartedChecks whether the current CircleCI workflow has been restarted. If a restart is detected, the script exits with a zero exit code, allowing the pipeline to continue conditionally.
Environment variables:
CKE5_CIRCLE_TOKEN— CircleCI API token used for authentication.
CircleCI-provided variables:
CIRCLE_WORKFLOW_ID— ID of the current workflow (set by CircleCI).
⚙️
ckeditor5-dev-ci-notify-circle-statusSends a Slack notification summarizing the current CircleCI build/workflow status. For failed builds, fetches the commit author via the GitHub API (works with private repositories).
Environment variables:
CKE5_GITHUB_TOKEN— GitHub token with thereposcope, used to fetch commit author.CKE5_CIRCLE_TOKEN— CircleCI API token used for API calls.CKE5_SLACK_WEBHOOK_URL— Incoming Webhook URL for the Slack channel receiving notifications.
CircleCI-provided variables:
CIRCLE_BRANCH— The number of the current build.CIRCLE_PROJECT_REPONAME— Repository name.CIRCLE_PROJECT_USERNAME— Organization/user name.CIRCLE_SHA1— Commit SHA of the current build.CIRCLE_WORKFLOW_ID— ID of the current workflow.
Parameters:
--pipeline-id&mdash Value of Circle's<< pipeline.number >>parameter (read more).--trigger-repository-slug—<org>/<repo>to construct the commit URL when provided with--trigger-commit-hash. Useful when a pipeline was triggered via a different repository.--trigger-commit-hash— Commit SHA to construct the commit URL. Useful when a pipeline was triggered via a different repository.--hide-author—"true"/"false"to hide the author in Slack.
⚙️
ckeditor5-dev-ci-trigger-circle-buildTriggers a new CircleCI pipeline for a specified repository. Commonly used to initiate release or follow-up pipelines from an existing workflow.
Environment variables:
CKE5_CIRCLE_TOKEN— CircleCI API token used for authentication.
CircleCI-provided variables:
CIRCLE_BRANCH— Git branch of the currently processed pipeline.CIRCLE_SHA1— Full commit SHA of the currently processed pipeline.
Parameters:
--slug— Repository slug (org/name) where the new pipeline will be started.--trigger-repository-slug— (Optional) Repository slug (org/name) that triggered the new pipeline. Can be omitted if it matches--slug.--release-branch— (Optional) Branch that leads the release process.
⚙️
ckeditor5-dev-ci-trigger-snyk-scanPublishes Snyk code and dependency snapshots for the current branch. It configures the Snyk CLI to use the EU endpoint and the provided organization, then runs
snyk code testandsnyk monitorcommands.Environment variables:
SNYK_TOKEN— Snyk token used for authentication.DEBUG— (Optional) When set, appends-dtosnyk code testandsnyk monitorfor verbose output, and removes--silentfrom thepnpminvocation.
CircleCI-provided variables:
CIRCLE_BRANCH— Git branch used as Snyk'starget-reference.
Parameters:
--depth— (Optional) Detection depth passed tosnyk monitoras--detection-depth. Defaults to2.--exclude— (Optional, repeatable) Additional directory or file name to exclude from Snyk's dependency snapshot. Use multiple times, for example--exclude=build --exclude=dist. The provided values are merged with the built-in defaults (external,tests,node_modules,release,scripts).--organization— Snyk organization ID or slug.
Behavior:
- Always excludes
external,tests,node_modules,releaseandscriptsfrom dependency snapshot detection. Any paths provided via--excludeare merged with these defaults (duplicates are ignored). - Passes
--detection-depth(default:2) tosnyk monitorto limit how deep Snyk scans for manifest files, which avoids performance issues caused by deeply nestednode_modulestrees. - Accepts exit code
1fromsnyk code test, so code snapshots are still published when vulnerabilities are found. - Requires exit code
0fromsnyk monitor, because any other code means the dependency snapshot was not created.
Changelog
See the CHANGELOG.md file.
License
Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md file.
