@ckeditor/ckeditor5-dev-ci 53.4.0 → 54.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@ CKEditor 5 CI utilities
6
6
 
7
7
  Utils for [CKEditor 5](https://ckeditor.com) CI builds.
8
8
 
9
- Contains tools for sending Slack notifications by Travis or Circle CI.
9
+ Contains tools for sending Slack notifications by Circle CI.
10
10
 
11
11
  ## Available scripts
12
12
 
@@ -29,7 +29,7 @@ These commands accept a mix of environment variables and command line arguments.
29
29
 
30
30
  - ⚙️ **`ckeditor5-dev-ci-circle-enable-auto-cancel-builds`**
31
31
 
32
- Enables the _“Auto-cancel redundant workflows”_ option in CircleCI for a given repository.
32
+ Enables the _“Auto-cancel redundant workflows”_ option in CircleCI for a given repository.
33
33
  Should be used after a release workflow that temporarily disables this option using the `ckeditor5-dev-ci-circle-disable-auto-cancel-builds` script.
34
34
 
35
35
  **Environment variables:**
@@ -41,7 +41,7 @@ These commands accept a mix of environment variables and command line arguments.
41
41
 
42
42
  - ⚙️ **`ckeditor5-dev-ci-circle-workflow-notifier`**
43
43
 
44
- Waits for all jobs in the **current CircleCI workflow** to finish (success or error) and then runs a final command (the "notifier").
44
+ Waits for all jobs in the **current CircleCI workflow** to finish (success or error) and then runs a final command (the "notifier").
45
45
  Intended to run as a **dedicated job** in your workflow. The script itself handles waiting – you typically don’t add `requires` on this job.
46
46
 
47
47
  **Environment variables:**
@@ -57,7 +57,7 @@ These commands accept a mix of environment variables and command line arguments.
57
57
 
58
58
  - ⚙️ **`ckeditor5-dev-ci-is-job-triggered-by-member`**
59
59
 
60
- Verifies that a **CircleCI approval job** was approved by a user who belongs to a specified GitHub team.
60
+ Verifies that a **CircleCI approval job** was approved by a user who belongs to a specified GitHub team.
61
61
  Uses CircleCI and GitHub APIs to check the approver against the team membership.
62
62
 
63
63
  **Environment variables:**
@@ -74,7 +74,7 @@ These commands accept a mix of environment variables and command line arguments.
74
74
 
75
75
  - ⚙️ **`ckeditor5-dev-ci-is-workflow-restarted`**
76
76
 
77
- Checks whether the current CircleCI workflow has been **restarted**.
77
+ Checks whether the current CircleCI workflow has been **restarted**.
78
78
  If a restart is detected, the script exits with a zero exit code, allowing the pipeline to continue conditionally.
79
79
 
80
80
  **Environment variables:**
@@ -85,7 +85,7 @@ These commands accept a mix of environment variables and command line arguments.
85
85
 
86
86
  - ⚙️ **`ckeditor5-dev-ci-notify-circle-status`**
87
87
 
88
- Sends a Slack notification summarizing the current CircleCI build/workflow status.
88
+ Sends a Slack notification summarizing the current CircleCI build/workflow status.
89
89
  For failed builds, fetches the commit author via the GitHub API (works with private repositories).
90
90
 
91
91
  **Environment variables:**
@@ -94,7 +94,7 @@ These commands accept a mix of environment variables and command line arguments.
94
94
  - `CKE5_SLACK_WEBHOOK_URL` — Incoming Webhook URL for the Slack channel receiving notifications.
95
95
 
96
96
  **CircleCI-provided variables:**
97
- - `CIRCLE_BRANCH` — The number of the current build.
97
+ - `CIRCLE_BRANCH` — The number of the current build.
98
98
  - `CIRCLE_PROJECT_REPONAME` — Repository name.
99
99
  - `CIRCLE_PROJECT_USERNAME` — Organization/user name.
100
100
  - `CIRCLE_SHA1` — Commit SHA of the current build.
@@ -108,7 +108,7 @@ These commands accept a mix of environment variables and command line arguments.
108
108
 
109
109
  - ⚙️ **`ckeditor5-dev-ci-trigger-circle-build`**
110
110
 
111
- Triggers a **new CircleCI pipeline** for a specified repository.
111
+ Triggers a **new CircleCI pipeline** for a specified repository.
112
112
  Commonly used to initiate release or follow-up pipelines from an existing workflow.
113
113
 
114
114
  **Environment variables:**
@@ -120,7 +120,7 @@ These commands accept a mix of environment variables and command line arguments.
120
120
 
121
121
  **Parameters:**
122
122
  - `--slug` — Repository slug (`org/name`) where the new pipeline will be started.
123
- - `--trigger-repository-slug` — *(Optional)* Repository slug (`org/name`) that triggered the new pipeline.
123
+ - `--trigger-repository-slug` — *(Optional)* Repository slug (`org/name`) that triggered the new pipeline.
124
124
  Can be omitted if it matches `--slug`.
125
125
  - `--release-branch` — *(Optional)* Branch that leads the release process.
126
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-dev-ci",
3
- "version": "53.4.0",
3
+ "version": "54.0.0",
4
4
  "description": "Utils used on various Continuous Integration services.",
5
5
  "keywords": [],
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/ckeditor5-dev-ci"
14
14
  },
15
15
  "engines": {
16
- "node": ">=22.0.0",
16
+ "node": ">=24.11.0",
17
17
  "npm": ">=5.7.1"
18
18
  },
19
19
  "type": "module",
@@ -23,11 +23,8 @@
23
23
  "lib"
24
24
  ],
25
25
  "bin": {
26
- "ckeditor5-dev-ci-notify-travis-status": "bin/notify-travis-status.js",
27
26
  "ckeditor5-dev-ci-notify-circle-status": "bin/notify-circle-status.js",
28
27
  "ckeditor5-dev-ci-circle-workflow-notifier": "bin/circle-workflow-notifier.js",
29
- "ckeditor5-dev-ci-allocate-swap-memory": "bin/allocate-swap-memory.sh",
30
- "ckeditor5-dev-ci-install-latest-chrome": "bin/install-latest-chrome.sh",
31
28
  "ckeditor5-dev-ci-is-job-triggered-by-member": "bin/is-job-triggered-by-member.js",
32
29
  "ckeditor5-dev-ci-is-workflow-restarted": "bin/is-workflow-restarted.js",
33
30
  "ckeditor5-dev-ci-trigger-circle-build": "bin/trigger-circle-build.js",
@@ -1,21 +0,0 @@
1
- #!/bin/bash
2
-
3
- # @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
- # For licensing, see LICENSE.md.
5
-
6
- echo "Allocating swap memory to prevent running out of RAM."
7
-
8
- # Remove existing swap so that allocating new swap does not throw.
9
- sudo swapoff -a
10
-
11
- # Create a 4 gigabyte swapfile.
12
- sudo fallocate -l 4G /swapfile
13
-
14
- # Secure the swapfile by restricting access to root.
15
- sudo chmod 600 /swapfile
16
-
17
- # Mark the file as a swap space.
18
- sudo mkswap /swapfile
19
-
20
- # Enable the swap.
21
- sudo swapon /swapfile
@@ -1,13 +0,0 @@
1
- #!/bin/bash
2
-
3
- # @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
- # For licensing, see LICENSE.md.
5
-
6
- echo "Installing the latest Chrome."
7
-
8
- sudo apt-get update
9
- sudo apt-get install lsb-release libappindicator3-1
10
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
11
- sudo dpkg -i google-chrome.deb
12
- sudo sed -i 's|HERE/chrome"|HERE/chrome" --no-sandbox|g' /opt/google/chrome/google-chrome
13
- rm google-chrome.deb
@@ -1,111 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
5
- * For licensing, see LICENSE.md.
6
- */
7
-
8
- import formatMessage from '../lib/format-message.js';
9
- import slackNotify from 'slack-notify';
10
-
11
- const ALLOWED_BRANCHES = [
12
- 'stable',
13
- 'master'
14
- ];
15
-
16
- const ALLOWED_EVENTS = [
17
- 'push',
18
- 'cron',
19
- 'api'
20
- ];
21
-
22
- // This script assumes that is being executed on Travis CI.
23
- // Described environment variables should be added by the integrator.
24
-
25
- const {
26
- /**
27
- * POSIX timestamps created when the script has begun and ended the job.
28
- * Timestamps should be in seconds instead of milliseconds.
29
- */
30
- START_TIME,
31
- END_TIME,
32
-
33
- /**
34
- * Token to a Github account with the scope: "repos". It is required for obtaining an author of
35
- * the commit if the build failed. The repository can be private and we can't use the public API.
36
- */
37
- GITHUB_TOKEN,
38
-
39
- /**
40
- * Required. Webhook URL of the Slack channel where the notification should be sent.
41
- */
42
- SLACK_WEBHOOK_URL,
43
-
44
- /**
45
- * Optional. If defined, the script will use the URL as the commit URL.
46
- * Otherwise, URL will be constructed using current repository data.
47
- */
48
- SLACK_NOTIFY_COMMIT_URL,
49
-
50
- /**
51
- * Optional. If set to "true", commit author will be hidden.
52
- * See: https://github.com/ckeditor/ckeditor5/issues/9252.
53
- */
54
- SLACK_NOTIFY_HIDE_AUTHOR,
55
-
56
- // Variables that are available by default in Travis environment.
57
- TRAVIS_BRANCH,
58
- TRAVIS_COMMIT,
59
- TRAVIS_EVENT_TYPE,
60
- TRAVIS_JOB_NUMBER,
61
- TRAVIS_JOB_WEB_URL,
62
- TRAVIS_REPO_SLUG,
63
- TRAVIS_TEST_RESULT
64
- } = process.env;
65
-
66
- notifyTravisStatus();
67
-
68
- async function notifyTravisStatus() {
69
- // Send a notification only for main branches...
70
- if ( !ALLOWED_BRANCHES.includes( TRAVIS_BRANCH ) ) {
71
- console.log( `Aborting slack notification due to an invalid branch (${ TRAVIS_BRANCH }).` );
72
-
73
- process.exit();
74
- }
75
-
76
- // ...and an event that triggered the build is correct...
77
- if ( !ALLOWED_EVENTS.includes( TRAVIS_EVENT_TYPE ) ) {
78
- console.log( `Aborting slack notification due to an invalid event type (${ TRAVIS_EVENT_TYPE }).` );
79
-
80
- process.exit();
81
- }
82
-
83
- // ...and for builds that failed.
84
- if ( TRAVIS_TEST_RESULT == 0 ) {
85
- console.log( 'The build did not fail. The notification will not be sent.' );
86
-
87
- process.exit();
88
- }
89
-
90
- const [ repositoryOwner, repositoryName ] = TRAVIS_REPO_SLUG.split( '/' );
91
-
92
- const message = await formatMessage( {
93
- slackMessageUsername: 'Travis CI',
94
- iconUrl: 'https://a.slack-edge.com/66f9/img/services/travis_36.png',
95
- repositoryOwner,
96
- repositoryName,
97
- branch: TRAVIS_BRANCH,
98
- buildTitle: 'Job number',
99
- buildUrl: TRAVIS_JOB_WEB_URL,
100
- buildId: '#' + TRAVIS_JOB_NUMBER,
101
- githubToken: GITHUB_TOKEN,
102
- triggeringCommitUrl: SLACK_NOTIFY_COMMIT_URL || `https://github.com/${ TRAVIS_REPO_SLUG }/commit/${ TRAVIS_COMMIT }`,
103
- startTime: Number( START_TIME ),
104
- endTime: Number( END_TIME ),
105
- shouldHideAuthor: SLACK_NOTIFY_HIDE_AUTHOR === 'true'
106
- } );
107
-
108
- return slackNotify( SLACK_WEBHOOK_URL )
109
- .send( message )
110
- .catch( err => console.log( 'API error occurred:', err ) );
111
- }