@argos-ci/core 0.6.3-alpha.1 → 0.6.3-alpha.2
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/dist/index.mjs +26 -5
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -127,6 +127,25 @@ const createConfig = ()=>{
|
|
|
127
127
|
return result;
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
+
const service$4 = {
|
|
131
|
+
detect: ({ env })=>Boolean(env.BUILDKITE),
|
|
132
|
+
config: ({ env })=>{
|
|
133
|
+
const ciProps = envCiDetection({
|
|
134
|
+
env
|
|
135
|
+
});
|
|
136
|
+
return {
|
|
137
|
+
name: "Buildkite",
|
|
138
|
+
commit: ciProps?.commit || null,
|
|
139
|
+
branch: env.BUILDKITE_BRANCH || null,
|
|
140
|
+
owner: env.BUILDKITE_ORGANIZATION_SLUG || null,
|
|
141
|
+
repository: env.BUILDKITE_PROJECT_SLUG || null,
|
|
142
|
+
jobId: env.BUILDKITE_JOB_ID || null,
|
|
143
|
+
runId: ciProps?.runId || null,
|
|
144
|
+
prNumber: env.BUILDKITE_PULL_REQUEST ? Number(env.BUILDKITE_PULL_REQUEST) : null
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
130
149
|
const service$3 = {
|
|
131
150
|
detect: ({ env })=>Boolean(env.HEROKU_TEST_RUN_ID),
|
|
132
151
|
config: ({ env })=>({
|
|
@@ -193,7 +212,7 @@ const getPrNumber$1 = ({ env })=>{
|
|
|
193
212
|
const branchRegex = /refs\/pull\/(\d+)/;
|
|
194
213
|
const branchMatches = branchRegex.exec(env.GITHUB_REF || "");
|
|
195
214
|
if (branchMatches) {
|
|
196
|
-
branchMatches[1];
|
|
215
|
+
return Number(branchMatches[1]);
|
|
197
216
|
}
|
|
198
217
|
return null;
|
|
199
218
|
};
|
|
@@ -223,7 +242,7 @@ const getPrNumber = ({ env })=>{
|
|
|
223
242
|
const branchRegex = /pull\/(\d+)/;
|
|
224
243
|
const branchMatches = branchRegex.exec(env.CIRCLE_PULL_REQUEST || "");
|
|
225
244
|
if (branchMatches) {
|
|
226
|
-
branchMatches[1];
|
|
245
|
+
return Number(branchMatches[1]);
|
|
227
246
|
}
|
|
228
247
|
return null;
|
|
229
248
|
};
|
|
@@ -262,7 +281,7 @@ const service = {
|
|
|
262
281
|
repository: ciProps?.repository || null,
|
|
263
282
|
jobId: ciProps?.jobId || null,
|
|
264
283
|
runId: ciProps?.runId || null,
|
|
265
|
-
prNumber: env.TRAVIS_PULL_REQUEST
|
|
284
|
+
prNumber: env.TRAVIS_PULL_REQUEST ? Number(env.TRAVIS_PULL_REQUEST) : null
|
|
266
285
|
};
|
|
267
286
|
}
|
|
268
287
|
};
|
|
@@ -271,7 +290,8 @@ const services = [
|
|
|
271
290
|
service$3,
|
|
272
291
|
service$2,
|
|
273
292
|
service$1,
|
|
274
|
-
service
|
|
293
|
+
service,
|
|
294
|
+
service$4
|
|
275
295
|
];
|
|
276
296
|
const envCiDetection = (ctx)=>{
|
|
277
297
|
const ciContext = envCi(ctx);
|
|
@@ -483,7 +503,8 @@ const getConfigFromOptions = (options)=>{
|
|
|
483
503
|
name: config.buildName,
|
|
484
504
|
parallel: config.parallel,
|
|
485
505
|
parallelNonce: config.parallelNonce,
|
|
486
|
-
screenshotKeys: Array.from(new Set(screenshots.map((screenshot)=>screenshot.hash)))
|
|
506
|
+
screenshotKeys: Array.from(new Set(screenshots.map((screenshot)=>screenshot.hash))),
|
|
507
|
+
prNumber: config.prNumber
|
|
487
508
|
});
|
|
488
509
|
debug("Got screenshots", result);
|
|
489
510
|
// Upload screenshots
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/core",
|
|
3
3
|
"description": "Visual testing solution to avoid visual regression. The core component of Argos SDK that handles build creation.",
|
|
4
|
-
"version": "0.6.3-alpha.
|
|
4
|
+
"version": "0.6.3-alpha.2+760abb1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rm -rf dist",
|
|
7
7
|
"build": "rollup -c",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"rollup-plugin-dts": "^4.2.3",
|
|
61
61
|
"rollup-plugin-swc3": "^0.6.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "760abb140949348929f833a68929744de146e127"
|
|
64
64
|
}
|