browserstack-cypress-cli 1.36.13 → 1.36.15

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.
@@ -347,6 +347,8 @@ module.exports = function run(args, rawArgs) {
347
347
  utils.setProcessHooks(data.build_id, bsConfig, bs_local, args, buildReportData);
348
348
  if(isTestObservabilitySession) {
349
349
  utils.setO11yProcessHooks(data.build_id, bsConfig, bs_local, args, buildReportData);
350
+ // OB-10135: read by stopBuildUpstream in testObservability/helper/helper.js
351
+ process.env.BROWSERSTACK_AUTOMATION_BUILD_ID = data.build_id;
350
352
  }
351
353
  let message = `${data.message}! ${Constants.userMessages.BUILD_CREATED} with build id: ${data.build_id}`;
352
354
  let dashboardLink = `${Constants.userMessages.VISIT_DASHBOARD} ${data.dashboard_url}`;
@@ -102,7 +102,7 @@ exports.getGitMetaData = () => {
102
102
  if(!info.commonGitDir) {
103
103
  logger.debug(`Unable to find a Git directory`);
104
104
  exports.debug(`Unable to find a Git directory`);
105
- resolve({});
105
+ return resolve({});
106
106
  }
107
107
  if(!info.author && exports.findGitConfig(process.cwd())) {
108
108
  /* commit objects are packed */
@@ -196,6 +196,16 @@ exports.getHostInfo = () => {
196
196
  exports.getCiInfo = () => {
197
197
  var env = process.env;
198
198
 
199
+ // GitHub Actions — checked before the presence-only providers (Jenkins,
200
+ // Bitbucket) so leftover env vars on self-hosted runners can't shadow it
201
+ if (env.GITHUB_ACTIONS === "true" || (env.CI === "true" && env.GITHUB_RUN_ID)) {
202
+ return {
203
+ name: "GitHub Actions",
204
+ build_url: `${env.GITHUB_SERVER_URL || 'https://github.com'}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}`,
205
+ job_name: env.GITHUB_WORKFLOW || env.GITHUB_JOB,
206
+ build_number: env.GITHUB_RUN_ID
207
+ };
208
+ }
199
209
  // Jenkins
200
210
  if ((typeof env.JENKINS_URL === "string" && env.JENKINS_URL.length > 0) || (typeof env.JENKINS_HOME === "string" && env.JENKINS_HOME.length > 0)) {
201
211
  return {
@@ -268,15 +278,6 @@ exports.getCiInfo = () => {
268
278
  build_number: env.CI_JOB_ID
269
279
  };
270
280
  }
271
- // GitHub Actions
272
- if (env.GITHUB_ACTIONS === "true" || env.CI === "true" && env.GITHUB_RUN_ID) {
273
- return {
274
- name: "GitHub Actions",
275
- build_url: `${env.GITHUB_SERVER_URL || 'https://github.com'}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}`,
276
- job_name: env.GITHUB_WORKFLOW || env.GITHUB_JOB,
277
- build_number: env.GITHUB_RUN_ID
278
- };
279
- }
280
281
  // Buildkite
281
282
  if (env.CI === "true" && env.BUILDKITE === "true") {
282
283
  return {
@@ -684,7 +684,9 @@ exports.stopBuildUpstream = async () => {
684
684
  };
685
685
  } else {
686
686
  const data = {
687
- 'stop_time': (new Date()).toISOString()
687
+ 'stop_time': (new Date()).toISOString(),
688
+ // OB-10135: cached in bin/commands/runs.js at build-create
689
+ 'automate_build_id': process.env.BROWSERSTACK_AUTOMATION_BUILD_ID
688
690
  };
689
691
  const config = {
690
692
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserstack-cypress-cli",
3
- "version": "1.36.13",
3
+ "version": "1.36.15",
4
4
  "description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",
5
5
  "main": "index.js",
6
6
  "scripts": {