Skip to content

Commit

Permalink
chore: collect additional ci envs (#29845)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyrohrbough authored Jul 16, 2024
1 parent 217f27f commit 62d30da
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
20 changes: 19 additions & 1 deletion packages/server/lib/util/ci_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,20 @@ const _providerCiParams = () => {
'APPVEYOR_PULL_REQUEST_NUMBER',
'APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH',
]),
// https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables
azure: extract([
'BUILD_BUILDID',
'BUILD_BUILDNUMBER',
'BUILD_CONTAINERID',
'BUILD_REPOSITORY_URI',
'SYSTEM_JOBID',
'SYSTEM_STAGEATTEMPT',
'SYSTEM_PHASEATTEMPT',
'SYSTEM_JOBATTEMPT',
'SYSTEM_PLANID',
'SYSTEM_PULLREQUEST_PULLREQUESTNUMBER',
'SYSTEM_PULLREQUEST_TARGETBRANCH',
'SYSTEM_PULLREQUEST_TARGETBRANCHNAME',
]),
awsCodeBuild: extract([
'CODEBUILD_BUILD_ID',
Expand Down Expand Up @@ -206,6 +214,8 @@ const _providerCiParams = () => {
'CIRCLE_PR_USERNAME',
'CIRCLE_COMPARE_URL',
'CIRCLE_WORKFLOW_ID',
'CIRCLE_WORKFLOW_JOB_ID',
'CIRCLE_PIPELINE_ID',
'CIRCLE_PULL_REQUEST',
'CIRCLE_REPOSITORY_URL',
'CI_PULL_REQUEST',
Expand All @@ -224,6 +234,8 @@ const _providerCiParams = () => {
'CI_BUILD_ID',
'CI_REPO_NAME',
'CI_PROJECT_ID',
'CI_PR_NUMBER',
'CI_PULL_REQUEST',
]),
// https://concourse-ci.org/implementing-resource-types.html#resource-metadata
concourse: extract([
Expand Down Expand Up @@ -266,6 +278,7 @@ const _providerCiParams = () => {
'GITHUB_HEAD_REF',
'GITHUB_REF_NAME',
'GITHUB_REF',
'GITHUB_JOB',
]),
// see https://docs.gitlab.com/ee/ci/variables/
gitlab: extract([
Expand All @@ -284,7 +297,9 @@ const _providerCiParams = () => {
'CI_REPOSITORY_URL',
'CI_ENVIRONMENT_URL',
'CI_DEFAULT_BRANCH',
// for PRs: https://gitlab.com/gitlab-org/gitlab-ce/issues/23902
// for PRs: https://gitlab.com/gitlab-org/gitlab-ce/issues/23902
'CI_MERGE_REQUEST_SOURCE_BRANCH_NAME',
'CI_MERGE_REQUEST_SOURCE_BRANCH_SHA',
]),
// https://docs.gocd.org/current/faq/dev_use_current_revision_in_build.html#standard-gocd-environment-variables
goCD: extract([
Expand Down Expand Up @@ -312,6 +327,9 @@ const _providerCiParams = () => {
'TAG_NAME',
'COMMIT_SHA',
'SHORT_SHA',
'_HEAD_BRANCH',
'_BASE_BRANCH',
'_PR_NUMBER',
// https://cloud.google.com/cloud-build/docs/api/reference/rest/Shared.Types/Build
]),
/**
Expand Down
35 changes: 34 additions & 1 deletion packages/server/test/unit/util/ci_provider_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,16 @@ describe('lib/util/ci_provider', () => {
it('circle', () => {
resetEnv = mockedEnv({
CIRCLECI: 'true',

CIRCLE_JOB: 'circleJob',
CIRCLE_BUILD_NUM: 'circleBuildNum',
CIRCLE_BUILD_URL: 'circleBuildUrl',
CIRCLE_PR_NUMBER: 'circlePrNumber',
CIRCLE_PR_REPONAME: 'circlePrReponame',
CIRCLE_PR_USERNAME: 'circlePrUsername',
CIRCLE_COMPARE_URL: 'circleCompareUrl',
CIRCLE_PIPELINE_ID: 'circlePipelineId',
CIRCLE_WORKFLOW_ID: 'circleWorkflowId',
CIRCLE_WORKFLOW_JOB_ID: 'circleWorkflowJobId',
CIRCLE_PULL_REQUEST: 'circlePullRequest',
CIRCLE_REPOSITORY_URL: 'circleRepositoryUrl',
CI_PULL_REQUEST: 'ciPullRequest',
Expand All @@ -380,7 +381,9 @@ describe('lib/util/ci_provider', () => {
circlePrReponame: 'circlePrReponame',
circlePrUsername: 'circlePrUsername',
circleCompareUrl: 'circleCompareUrl',
circlePipelineId: 'circlePipelineId',
circleWorkflowId: 'circleWorkflowId',
circleWorkflowJobId: 'circleWorkflowJobId',
circlePullRequest: 'circlePullRequest',
circleRepositoryUrl: 'circleRepositoryUrl',
ciPullRequest: 'ciPullRequest',
Expand Down Expand Up @@ -444,13 +447,17 @@ describe('lib/util/ci_provider', () => {
CI_COMMIT_MESSAGE: 'ciCommitMessage',
CI_COMMITTER_NAME: 'ciCommitterName',
CI_COMMITTER_EMAIL: 'ciCommitterEmail',
CI_PR_NUMBER: 'prNumber',
CI_PULL_REQUEST: 'pullRequest',
}, { clear: true })

expectsName('codeshipPro')
expectsCiParams({
ciBuildId: 'ciBuildId',
ciRepoName: 'ciRepoName',
ciProjectId: 'ciProjectId',
ciPrNumber: 'prNumber',
ciPullRequest: 'pullRequest',
})

return expectsCommitParams({
Expand Down Expand Up @@ -568,6 +575,7 @@ describe('lib/util/ci_provider', () => {
GITHUB_ACTION: 'ciGitHubActionId',
GITHUB_EVENT_NAME: 'ciEventName',
GITHUB_RUN_ID: 'ciGithubRunId',
GITHUB_JOB: 'jobName',
GITHUB_RUN_ATTEMPT: 'ciGithubRunAttempt',
GITHUB_REPOSITORY: 'ciGithubRepository',
GITHUB_SHA: 'ciCommitSha',
Expand All @@ -586,6 +594,7 @@ describe('lib/util/ci_provider', () => {
githubRepository: 'ciGithubRepository',
githubRunAttempt: 'ciGithubRunAttempt',
githubRunId: 'ciGithubRunId',
githubJob: 'jobName',
githubBaseRef: 'ciBaseRef',
githubHeadRef: 'ciHeadRef',
githubRefName: 'ciRefName',
Expand Down Expand Up @@ -653,6 +662,8 @@ describe('lib/util/ci_provider', () => {
CI_COMMIT_MESSAGE: 'ciCommitMessage',
GITLAB_USER_NAME: 'gitlabUserName',
GITLAB_USER_EMAIL: 'gitlabUserEmail',
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME: 'sourceBranchName',
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA: 'sourceBranchSha',
}, { clear: true })

expectsName('gitlab')
Expand All @@ -669,6 +680,8 @@ describe('lib/util/ci_provider', () => {
ciRepositoryUrl: 'ciRepositoryUrl',
ciEnvironmentUrl: 'ciEnvironmentUrl',
ciDefaultBranch: 'ciDefaultBranch',
ciMergeRequestSourceBranchName: 'sourceBranchName',
ciMergeRequestSourceBranchSha: 'sourceBranchSha',
})

expectsCommitParams({
Expand Down Expand Up @@ -741,6 +754,9 @@ describe('lib/util/ci_provider', () => {

COMMIT_SHA: 'commitSha',
BRANCH_NAME: 'branchName',
_HEAD_BRANCH: 'headBranch',
_BASE_BRANCH: 'baseBranch',
_PR_NUMBER: 'prNumber',
}, { clear: true })

expectsName('googleCloud')
Expand All @@ -749,6 +765,9 @@ describe('lib/util/ci_provider', () => {
projectId: 'projectId',
commitSha: 'commitSha',
branchName: 'branchName',
headBranch: 'headBranch',
baseBranch: 'baseBranch',
prNumber: 'prNumber',
})

expectsCommitParams({
Expand Down Expand Up @@ -1137,7 +1156,14 @@ describe('lib/util/ci_provider', () => {
BUILD_BUILDNUMBER: 'buildNumber',
BUILD_CONTAINERID: 'containerId',
BUILD_REPOSITORY_URI: 'buildRepositoryUri',
SYSTEM_PLANID: 'planId',
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: 'systemPullrequestPullrequestnumber',
SYSTEM_PULLREQUEST_TARGETBRANCH: 'targetBranch',
SYSTEM_PULLREQUEST_TARGETBRANCHNAME: 'targetBranchName',
SYSTEM_JOBID: 'jobid',
SYSTEM_STAGEATTEMPT: 'stageAttempt',
SYSTEM_PHASEATTEMPT: 'phaseAttempt',
SYSTEM_JOBATTEMPT: 'jobAttempt',

BUILD_SOURCEVERSION: 'commit',
BUILD_SOURCEBRANCHNAME: 'branch',
Expand All @@ -1152,7 +1178,14 @@ describe('lib/util/ci_provider', () => {
buildBuildnumber: 'buildNumber',
buildContainerid: 'containerId',
buildRepositoryUri: 'buildRepositoryUri',
systemPlanid: 'planId',
systemPullrequestPullrequestnumber: 'systemPullrequestPullrequestnumber',
systemPullrequestTargetbranch: 'targetBranch',
systemPullrequestTargetbranchname: 'targetBranchName',
systemJobid: 'jobid',
systemStageattempt: 'stageAttempt',
systemPhaseattempt: 'phaseAttempt',
systemJobattempt: 'jobAttempt',
})

return expectsCommitParams({
Expand Down

5 comments on commit 62d30da

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 62d30da Jul 16, 2024

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/13.13.1/linux-x64/develop-62d30daf6139b22acbabd36b542a0a83123d25f3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 62d30da Jul 16, 2024

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/13.13.1/linux-arm64/develop-62d30daf6139b22acbabd36b542a0a83123d25f3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 62d30da Jul 16, 2024

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/13.13.1/darwin-arm64/develop-62d30daf6139b22acbabd36b542a0a83123d25f3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 62d30da Jul 16, 2024

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/13.13.1/win32-x64/develop-62d30daf6139b22acbabd36b542a0a83123d25f3/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 62d30da Jul 16, 2024

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/13.13.1/darwin-x64/develop-62d30daf6139b22acbabd36b542a0a83123d25f3/cypress.tgz

Please sign in to comment.