@ckeditor/ckeditor5-dev-ci 55.1.0 → 55.1.1
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
|
@@ -132,7 +132,7 @@ These commands accept a mix of environment variables and command line arguments.
|
|
|
132
132
|
- ⚙️ **`ckeditor5-dev-ci-trigger-snyk-scan`**
|
|
133
133
|
|
|
134
134
|
Publishes Snyk code and dependency snapshots for the current branch.
|
|
135
|
-
It configures the Snyk CLI to use the EU endpoint and the provided organization, then runs `snyk code test --report` and `snyk monitor --all-projects --
|
|
135
|
+
It configures the Snyk CLI to use the EU endpoint and the provided organization, then runs `snyk code test --report` and `snyk monitor --all-projects --exclude=external,tests`.
|
|
136
136
|
|
|
137
137
|
**Environment variables:**
|
|
138
138
|
- `SNYK_TOKEN` — Snyk token used for authentication.
|
|
@@ -141,10 +141,11 @@ These commands accept a mix of environment variables and command line arguments.
|
|
|
141
141
|
- `CIRCLE_BRANCH` — Git branch used as Snyk's `target-reference`.
|
|
142
142
|
|
|
143
143
|
**Parameters:**
|
|
144
|
+
- `--exclude` — *(Optional, repeatable)* Directory or file name passed to Snyk's `--exclude`. Use multiple times, for example `--exclude=external --exclude=tests`. Defaults to `external` and `tests`.
|
|
144
145
|
- `--organization` — Snyk organization ID or slug.
|
|
145
146
|
|
|
146
147
|
**Behavior:**
|
|
147
|
-
-
|
|
148
|
+
- Excludes directories and files named `external` and `tests` from dependency snapshot detection by default, and allows overriding that list with repeated `--exclude` flags.
|
|
148
149
|
- Accepts exit code `1` from `snyk code test --report`, so code snapshots are still published when vulnerabilities are found.
|
|
149
150
|
- Requires exit code `0` from `snyk monitor --all-projects`, because any other code means the dependency snapshot was not created.
|
|
150
151
|
|
|
@@ -112,8 +112,9 @@ async function waitForOtherJobsAndSendNotification() {
|
|
|
112
112
|
return waitForOtherJobsAndSendNotification();
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
// If any ignored job failed, all of its children will be marked as
|
|
116
|
-
|
|
115
|
+
// If any ignored job failed or was canceled, all of its children will be marked as
|
|
116
|
+
// 'failed_parent', and thus will not trigger this check.
|
|
117
|
+
const anyJobsFailed = jobs.some( job => job.status === 'failed' || job.status === 'canceled' );
|
|
117
118
|
|
|
118
119
|
if ( anyJobsFailed ) {
|
|
119
120
|
return execSync( task, { stdio: 'inherit' } );
|
package/bin/trigger-snyk-scan.js
CHANGED
|
@@ -15,6 +15,11 @@ try {
|
|
|
15
15
|
|
|
16
16
|
const { values } = parseArgs( {
|
|
17
17
|
options: {
|
|
18
|
+
exclude: {
|
|
19
|
+
default: [ 'external', 'tests' ],
|
|
20
|
+
multiple: true,
|
|
21
|
+
type: 'string'
|
|
22
|
+
},
|
|
18
23
|
organization: {
|
|
19
24
|
type: 'string'
|
|
20
25
|
}
|
|
@@ -57,7 +62,7 @@ try {
|
|
|
57
62
|
[
|
|
58
63
|
'monitor',
|
|
59
64
|
'--all-projects',
|
|
60
|
-
'
|
|
65
|
+
`--exclude=${ values.exclude.join( ',' ) }`,
|
|
61
66
|
`--target-reference=${ CIRCLE_BRANCH }`
|
|
62
67
|
],
|
|
63
68
|
|
|
@@ -64,6 +64,11 @@ function isJobFailed( job ) {
|
|
|
64
64
|
return true;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
// See: https://github.com/ckeditor/ckeditor5/issues/19978.
|
|
68
|
+
if ( job.status === 'canceled' ) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
67
72
|
if ( job.status === 'failed_parent' ) {
|
|
68
73
|
return true;
|
|
69
74
|
}
|
|
@@ -85,7 +90,7 @@ function clone( obj ) {
|
|
|
85
90
|
*
|
|
86
91
|
* @property {string} id
|
|
87
92
|
*
|
|
88
|
-
* @property {'blocked'|'running'|'failed'|'failed_parent'|'success'} status
|
|
93
|
+
* @property {'blocked'|'running'|'failed'|'canceled'|'failed_parent'|'success'|'skipped'} status
|
|
89
94
|
*
|
|
90
95
|
* @property {Array.<string>} dependencies
|
|
91
96
|
*/
|