From deed99422667754279f0628594067080eef6e408 Mon Sep 17 00:00:00 2001 From: Ian Walter Date: Fri, 22 Dec 2023 10:13:02 -0500 Subject: [PATCH] Replace LayerCI with Webapp.io --- .../INDETERMINATE_CI_BUILD_ID.html | 12 ++++---- packages/server/__snapshots__/cypress_spec.js | 20 ++++++------- packages/server/lib/util/ci_provider.js | 22 +++++++------- .../server/test/unit/util/ci_provider_spec.js | 30 +++++++++---------- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/packages/errors/__snapshot-html__/INDETERMINATE_CI_BUILD_ID.html b/packages/errors/__snapshot-html__/INDETERMINATE_CI_BUILD_ID.html index e5e81e635832..aae64cf9594e 100644 --- a/packages/errors/__snapshot-html__/INDETERMINATE_CI_BUILD_ID.html +++ b/packages/errors/__snapshot-html__/INDETERMINATE_CI_BUILD_ID.html @@ -2,12 +2,12 @@ - + - +
You passed the --group or --parallel flag but we could not automatically determine or generate a ciBuildId.
 
@@ -65,9 +65,9 @@
  - teamfoundation
  - travis
  - netlify
- - layerci
+ - webappio
 
 Because the ciBuildId could not be auto-detected you must pass the --ci-build-id flag manually.
 
 https://on.cypress.io/indeterminate-ci-build-id
-
\ No newline at end of file + diff --git a/packages/server/__snapshots__/cypress_spec.js b/packages/server/__snapshots__/cypress_spec.js index 7bae6c46cb20..106188d76116 100644 --- a/packages/server/__snapshots__/cypress_spec.js +++ b/packages/server/__snapshots__/cypress_spec.js @@ -80,7 +80,7 @@ The ciBuildId is automatically detected if you are running Cypress in any of the - teamfoundation - travis - netlify - - layerci + - webappio Because the ciBuildId could not be auto-detected you must pass the --ci-build-id flag manually. @@ -118,7 +118,7 @@ The ciBuildId is automatically detected if you are running Cypress in any of the - teamfoundation - travis - netlify - - layerci + - webappio Because the ciBuildId could not be auto-detected you must pass the --ci-build-id flag manually. @@ -157,7 +157,7 @@ The ciBuildId is automatically detected if you are running Cypress in any of the - teamfoundation - travis - netlify - - layerci + - webappio Because the ciBuildId could not be auto-detected you must pass the --ci-build-id flag manually. @@ -334,7 +334,7 @@ exports['Long Cypress Cloud URL'] = ` ──────────────────────────────────────────────────────────────────────────────────────────────────── - + Running: app.cy.js (1 of 1) ==================================================================================================== @@ -342,15 +342,15 @@ exports['Long Cypress Cloud URL'] = ` (Run Finished) - Spec Tests Passing Failing Pending Skipped + Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✖ XX:XX 1 2 3 4 5 │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✖ 1 of 1 failed (100%) XX:XX 1 2 3 4 5 + ✖ 1 of 1 failed (100%) XX:XX 1 2 3 4 5 ─────────────────────────────────────────────────────────────────────────────────────────────────────── - + Recorded Run: http://cloud.cypress.io/this-is-a-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-url ` @@ -370,7 +370,7 @@ exports['CLOUD_RECOMMENDATION_MESSAGE'] = ` ──────────────────────────────────────────────────────────────────────────────────────────────────── - + Running: test1.js (1 of 1) (Results) @@ -393,11 +393,11 @@ exports['CLOUD_RECOMMENDATION_MESSAGE'] = ` (Run Finished) - Spec Tests Passing Failing Pending Skipped + Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✖ test1.js XX:XX - - 1 - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✖ 1 of 1 failed (100%) XX:XX - - 1 - - + ✖ 1 of 1 failed (100%) XX:XX - - 1 - - ---------------------------------------------------------------------------------------------------- diff --git a/packages/server/lib/util/ci_provider.js b/packages/server/lib/util/ci_provider.js index bf9015137ae7..35990f6c2b84 100644 --- a/packages/server/lib/util/ci_provider.js +++ b/packages/server/lib/util/ci_provider.js @@ -113,7 +113,7 @@ const CI_PROVIDERS = { 'travis': 'TRAVIS', 'wercker': isWercker, netlify: 'NETLIFY', - layerci: 'LAYERCI', + webappio: 'WEBAPPIO', } const _detectProviderName = () => { @@ -418,15 +418,15 @@ const _providerCiParams = () => { 'DEPLOY_PRIME_URL', 'DEPLOY_ID', ]), - // https://layerci.com/docs/layerfile-reference/build-env - layerci: extract([ - 'LAYERCI_JOB_ID', - 'LAYERCI_RUNNER_ID', + // https://docs.webapp.io/layerfile-reference/build-env + webappio: extract([ + 'JOB_ID', + 'RUNNER_ID', 'RETRY_INDEX', - 'LAYERCI_PULL_REQUEST', - 'LAYERCI_REPO_NAME', - 'LAYERCI_REPO_OWNER', - 'LAYERCI_BRANCH', + 'PULL_REQUEST_URL', + 'REPOSITORY_NAME', + 'REPOSITORY_OWNER', + 'GIT_BRANCH', 'GIT_TAG', // short hex for commits ]), } @@ -621,9 +621,9 @@ const _providerCommitParams = () => { branch: env.BRANCH, remoteOrigin: env.REPOSITORY_URL, }, - layerci: { + webappio: { sha: env.GIT_COMMIT, - branch: env.LAYERCI_BRANCH, + branch: env.GIT_BRANCH, message: env.GIT_COMMIT_TITLE, }, } diff --git a/packages/server/test/unit/util/ci_provider_spec.js b/packages/server/test/unit/util/ci_provider_spec.js index 53286fd079c2..60884a61e180 100644 --- a/packages/server/test/unit/util/ci_provider_spec.js +++ b/packages/server/test/unit/util/ci_provider_spec.js @@ -1088,34 +1088,34 @@ describe('lib/util/ci_provider', () => { }) }) - it('layerci', () => { + it('webappio', () => { resetEnv = mockedEnv({ - LAYERCI: 'true', + WEBAPPIO: 'true', - LAYERCI_JOB_ID: 'jobId', - LAYERCI_RUNNER_ID: 'runnerId', + JOB_ID: 'jobId', + RUNNER_ID: 'runnerId', RETRY_INDEX: 'retryIndex', // git info - LAYERCI_PULL_REQUEST: 'pullRequest', - LAYERCI_REPO_NAME: 'repoName', - LAYERCI_REPO_OWNER: 'repoOwner', - LAYERCI_BRANCH: 'branch', + PULL_REQUEST_URL: 'pullRequest', + REPOSITORY_NAME: 'repoName', + REPOSITORY_OWNER: 'repoOwner', + GIT_BRANCH: 'branch', GIT_TAG: 'tag', GIT_COMMIT: 'commit', GIT_COMMIT_TITLE: 'commitTitle', }, { clear: true }) - expectsName('layerci') + expectsName('webappio') expectsCiParams({ - layerciJobId: 'jobId', - layerciRunnerId: 'runnerId', + jobId: 'jobId', + runnerId: 'runnerId', retryIndex: 'retryIndex', gitTag: 'tag', - layerciBranch: 'branch', - layerciPullRequest: 'pullRequest', - layerciRepoName: 'repoName', - layerciRepoOwner: 'repoOwner', + gitBranch: 'branch', + pullRequestUrl: 'pullRequest', + repositoryName: 'repoName', + repositoryOwner: 'repoOwner', }) return expectsCommitParams({