Skip to content

Commit

Permalink
fix: Use SEMAPHORE_GIT_WORKING_BRANCH to associate Cloud recording to…
Browse files Browse the repository at this point in the history
… current branch (#26333)

* use SEMAPHORE_GIT_WORKING_BRANCH

* fix issue-26309

* fix issue-26309; update changelog

* Update cli/CHANGELOG.md

---------

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
  • Loading branch information
leightjohnson93 and emilyrohrbough authored Apr 10, 2023
1 parent bcfafda commit a196fb4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ _Released 04/11/2023 (PENDING)_

- Capture the [Azure](https://azure.microsoft.com/) CI provider's environment variable [`SYSTEM_PULLREQUEST_PULLREQUESTNUMBER`](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#system-variables-devops-services) to display the linked PR number in the Cloud. Addressed in [#26215](https://github.com/cypress-io/cypress/pull/26215).
- Fixed an issue in the onboarding wizard where project framework & bundler would not be auto-detected when opening directly into component testing mode using the `--component` CLI flag. Fixes [#22777](https://github.com/cypress-io/cypress/issues/22777).
- Updated to use the `SEMAPHORE_GIT_WORKING_BRANCH` [Semphore](https://docs.semaphoreci.com) CI environment variable to correctly associate a Cloud run to the current branch. Previously this was incorrectly associating a run to the target branch. Fixes [#26309](https://github.com/cypress-io/cypress/issues/26309).
- Fix an edge case in Component Testing where a custom `baseUrl` in `tsconfig.json` for Next.js 13.2.0+ is not respected. This was partially fixed in [#26005](https://github.com/cypress-io/cypress/pull/26005), but an edge case was missed. Fixes [#25951](https://github.com/cypress-io/cypress/issues/25951).

**Misc:**
Expand Down
3 changes: 2 additions & 1 deletion packages/server/lib/util/ci_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ const _providerCiParams = () => {
'SEMAPHORE_GIT_REPO_SLUG',
'SEMAPHORE_GIT_SHA',
'SEMAPHORE_GIT_URL',
'SEMAPHORE_GIT_WORKING_BRANCH',
'SEMAPHORE_JOB_COUNT',
'SEMAPHORE_JOB_ID', // v2
'SEMAPHORE_JOB_NAME',
Expand Down Expand Up @@ -570,7 +571,7 @@ const _providerCommitParams = () => {
// Only from forks? https://semaphoreci.com/docs/available-environment-variables.html
semaphore: {
sha: env.SEMAPHORE_GIT_SHA,
branch: env.SEMAPHORE_GIT_BRANCH,
branch: env.SEMAPHORE_GIT_WORKING_BRANCH,
// message: ???
// authorName: ???
// authorEmail: ???
Expand Down
2 changes: 2 additions & 0 deletions packages/server/test/unit/util/ci_provider_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ describe('lib/util/ci_provider', () => {
SEMAPHORE_CURRENT_THREAD: 'semaphoreCurrentThread',
SEMAPHORE_EXECUTABLE_UUID: 'semaphoreExecutableUuid',
SEMAPHORE_GIT_BRANCH: 'show-semaphore-v2-266',
SEMAPHORE_GIT_WORKING_BRANCH: 'show-semaphore-v2-266',
SEMAPHORE_GIT_DIR: 'cypress-example-kitchensink',
SEMAPHORE_GIT_REF: 'refs/heads/show-semaphore-v2-266',
SEMAPHORE_GIT_REF_TYPE: 'branch',
Expand Down Expand Up @@ -917,6 +918,7 @@ describe('lib/util/ci_provider', () => {
semaphoreCurrentThread: 'semaphoreCurrentThread',
semaphoreExecutableUuid: 'semaphoreExecutableUuid',
semaphoreGitBranch: 'show-semaphore-v2-266',
semaphoreGitWorkingBranch: 'show-semaphore-v2-266',
semaphoreGitDir: 'cypress-example-kitchensink',
semaphoreGitRef: 'refs/heads/show-semaphore-v2-266',
semaphoreGitRefType: 'branch',
Expand Down

5 comments on commit a196fb4

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a196fb4 Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.9.1/linux-arm64/develop-a196fb49d4efa398c874fd433a86c503b6e380e2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a196fb4 Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.9.1/linux-x64/develop-a196fb49d4efa398c874fd433a86c503b6e380e2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a196fb4 Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.9.1/darwin-arm64/develop-a196fb49d4efa398c874fd433a86c503b6e380e2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a196fb4 Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.9.1/darwin-x64/develop-a196fb49d4efa398c874fd433a86c503b6e380e2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a196fb4 Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.9.1/win32-x64/develop-a196fb49d4efa398c874fd433a86c503b6e380e2/cypress.tgz

Please sign in to comment.