Skip to content

Commit

Permalink
Merge branch 'develop' into fix/evergreen-headless
Browse files Browse the repository at this point in the history
  • Loading branch information
elevatebart authored Feb 15, 2021
2 parents 52e97be + 8e46206 commit d940cbb
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5424,6 +5424,8 @@ declare namespace Cypress {
/** Override *name* for display purposes only */
displayName: string
message: any
/** Set to false if you want to control the finishing of the command in the log yourself */
autoEnd: boolean
/** Return an object that will be printed in the dev tools console */
consoleProps(): ObjectLike
}
Expand Down
4 changes: 4 additions & 0 deletions packages/server/lib/util/ci_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ const _providerCiParams = () => {
'BITBUCKET_BUILD_NUMBER',
'BITBUCKET_PARALLEL_STEP',
'BITBUCKET_STEP_RUN_NUMBER',
// the PR variables are only set on pull request builds
'BITBUCKET_PR_ID',
'BITBUCKET_PR_DESTINATION_BRANCH',
'BITBUCKET_PR_DESTINATION_COMMIT',
]),
buildkite: extract([
'BUILDKITE_REPO',
Expand Down
55 changes: 55 additions & 0 deletions packages/server/test/unit/ci_provider_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,61 @@ describe('lib/util/ci_provider', () => {
})
})

it('bitbucket pull request', () => {
resetEnv = mockedEnv({
CI: '1',

// build information
BITBUCKET_BUILD_NUMBER: 'bitbucketBuildNumber',
BITBUCKET_REPO_OWNER: 'bitbucketRepoOwner',
BITBUCKET_REPO_SLUG: 'bitbucketRepoSlug',
BITBUCKET_PARALLEL_STEP: 'bitbucketParallelStep',
BITBUCKET_STEP_RUN_NUMBER: 'bitbucketStepRunNumber',

// git information
BITBUCKET_COMMIT: 'bitbucketCommit',
BITBUCKET_BRANCH: 'bitbucketBranch',

// pull request info
BITBUCKET_PR_ID: 'bitbucketPrId',
BITBUCKET_PR_DESTINATION_BRANCH: 'bitbucketPrDestinationBranch',
BITBUCKET_PR_DESTINATION_COMMIT: 'bitbucketPrDestinationCommit',
}, { clear: true })

expectsName('bitbucket')
expectsCiParams({
bitbucketBuildNumber: 'bitbucketBuildNumber',
bitbucketRepoOwner: 'bitbucketRepoOwner',
bitbucketRepoSlug: 'bitbucketRepoSlug',
bitbucketParallelStep: 'bitbucketParallelStep',
bitbucketStepRunNumber: 'bitbucketStepRunNumber',
bitbucketPrId: 'bitbucketPrId',
bitbucketPrDestinationBranch: 'bitbucketPrDestinationBranch',
bitbucketPrDestinationCommit: 'bitbucketPrDestinationCommit',
})

expectsCommitParams({
sha: 'bitbucketCommit',
branch: 'bitbucketBranch',
})

expectsCommitDefaults({
sha: null,
branch: 'gitFoundBranch',
}, {
sha: 'bitbucketCommit',
branch: 'gitFoundBranch',
})

return expectsCommitDefaults({
sha: undefined,
branch: '',
}, {
sha: 'bitbucketCommit',
branch: 'bitbucketBranch',
})
})

it('buildkite', () => {
resetEnv = mockedEnv({
BUILDKITE: 'true',
Expand Down

0 comments on commit d940cbb

Please sign in to comment.