From ae2bdb171b69032ca9a4c32380e36b36e5bc77aa Mon Sep 17 00:00:00 2001 From: Joshua D'Souza Date: Tue, 6 Feb 2024 12:41:49 +0300 Subject: [PATCH 1/4] Replacing LayerCI references with webapp.io --- .../INDETERMINATE_CI_BUILD_ID.html | 2 +- packages/server/__snapshots__/cypress_spec.js | 6 ++-- packages/server/lib/util/ci_provider.js | 22 +++++++------- .../server/test/unit/util/ci_provider_spec.js | 30 +++++++++---------- 4 files changed, 30 insertions(+), 30 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..c7ebc545151e 100644 --- a/packages/errors/__snapshot-html__/INDETERMINATE_CI_BUILD_ID.html +++ b/packages/errors/__snapshot-html__/INDETERMINATE_CI_BUILD_ID.html @@ -65,7 +65,7 @@ - teamfoundation - travis - netlify - - layerci + - webappio Because the ciBuildId could not be auto-detected you must pass the --ci-build-id flag manually. diff --git a/packages/server/__snapshots__/cypress_spec.js b/packages/server/__snapshots__/cypress_spec.js index 7bae6c46cb20..500b9230cae9 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. diff --git a/packages/server/lib/util/ci_provider.js b/packages/server/lib/util/ci_provider.js index bf9015137ae7..3a4ec524090b 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([ + 'WEBAPPIO_JOB_ID', + 'WEBAPPIO_RUNNER_ID', 'RETRY_INDEX', - 'LAYERCI_PULL_REQUEST', - 'LAYERCI_REPO_NAME', - 'LAYERCI_REPO_OWNER', - 'LAYERCI_BRANCH', + 'WEBAPPIO_PULL_REQUEST', + 'WEBAPPIO_REPO_NAME', + 'WEBAPPIO_REPO_OWNER', + 'WEBAPPIO_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.WEBAPPIO_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..6ab5f831f561 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', + WEBAPPIO_JOB_ID: 'jobId', + WEBAPPIO_RUNNER_ID: 'runnerId', RETRY_INDEX: 'retryIndex', // git info - LAYERCI_PULL_REQUEST: 'pullRequest', - LAYERCI_REPO_NAME: 'repoName', - LAYERCI_REPO_OWNER: 'repoOwner', - LAYERCI_BRANCH: 'branch', + WEBAPPIO_PULL_REQUEST: 'pullRequest', + WEBAPPIO_REPO_NAME: 'repoName', + WEBAPPIO_REPO_OWNER: 'repoOwner', + WEBAPPIO_BRANCH: 'branch', GIT_TAG: 'tag', GIT_COMMIT: 'commit', GIT_COMMIT_TITLE: 'commitTitle', }, { clear: true }) - expectsName('layerci') + expectsName('webappio') expectsCiParams({ - layerciJobId: 'jobId', - layerciRunnerId: 'runnerId', + webappioJobId: 'jobId', + webappioRunnerId: 'runnerId', retryIndex: 'retryIndex', gitTag: 'tag', - layerciBranch: 'branch', - layerciPullRequest: 'pullRequest', - layerciRepoName: 'repoName', - layerciRepoOwner: 'repoOwner', + webappioBranch: 'branch', + webappioPullRequest: 'pullRequest', + webappioRepoName: 'repoName', + webappioRepoOwner: 'repoOwner', }) return expectsCommitParams({ From 5ee14a14b91c0c2cfcae2bf2736b2fb75af7d73d Mon Sep 17 00:00:00 2001 From: Joshua D'Souza Date: Tue, 6 Feb 2024 13:06:56 +0300 Subject: [PATCH 2/4] Update CI params exposed from webapp.io and add EXPOSE_WEBSITE_HOST --- packages/server/lib/util/ci_provider.js | 15 ++++++----- .../server/test/unit/util/ci_provider_spec.js | 26 ++++++++++--------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/packages/server/lib/util/ci_provider.js b/packages/server/lib/util/ci_provider.js index 3a4ec524090b..f266ad795b14 100644 --- a/packages/server/lib/util/ci_provider.js +++ b/packages/server/lib/util/ci_provider.js @@ -420,14 +420,15 @@ const _providerCiParams = () => { ]), // https://docs.webapp.io/layerfile-reference/build-env webappio: extract([ - 'WEBAPPIO_JOB_ID', - 'WEBAPPIO_RUNNER_ID', + 'JOB_ID', + 'RUNNER_ID', 'RETRY_INDEX', - 'WEBAPPIO_PULL_REQUEST', - 'WEBAPPIO_REPO_NAME', - 'WEBAPPIO_REPO_OWNER', - 'WEBAPPIO_BRANCH', + 'PULL_REQUEST_URL', + 'REPOSITORY_NAME', + 'REPOSITORY_OWNER', + 'GIT_BRANCH', 'GIT_TAG', // short hex for commits + 'EXPOSE_WEBSITE_HOST', ]), } } @@ -623,7 +624,7 @@ const _providerCommitParams = () => { }, webappio: { sha: env.GIT_COMMIT, - branch: env.WEBAPPIO_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 6ab5f831f561..5f85d7c84753 100644 --- a/packages/server/test/unit/util/ci_provider_spec.js +++ b/packages/server/test/unit/util/ci_provider_spec.js @@ -1092,15 +1092,16 @@ describe('lib/util/ci_provider', () => { resetEnv = mockedEnv({ WEBAPPIO: 'true', - WEBAPPIO_JOB_ID: 'jobId', - WEBAPPIO_RUNNER_ID: 'runnerId', + JOB_ID: 'jobId', + RUNNER_ID: 'runnerId', RETRY_INDEX: 'retryIndex', + EXPOSE_WEBSITE_HOST: 'exposeWebsiteHost', // git info - WEBAPPIO_PULL_REQUEST: 'pullRequest', - WEBAPPIO_REPO_NAME: 'repoName', - WEBAPPIO_REPO_OWNER: 'repoOwner', - WEBAPPIO_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', @@ -1108,14 +1109,15 @@ describe('lib/util/ci_provider', () => { expectsName('webappio') expectsCiParams({ - webappioJobId: 'jobId', - webappioRunnerId: 'runnerId', + jobId: 'jobId', + runnerId: 'runnerId', retryIndex: 'retryIndex', gitTag: 'tag', - webappioBranch: 'branch', - webappioPullRequest: 'pullRequest', - webappioRepoName: 'repoName', - webappioRepoOwner: 'repoOwner', + gitBranch: 'branch', + pullRequestUrl: 'pullRequest', + repositoryName: 'repoName', + repositoryOwner: 'repoOwner', + exposeWebsiteHost: 'exposeWebsiteHost', }) return expectsCommitParams({ From 8d12bbd057cd172d71af34d1749164e48ae4b05b Mon Sep 17 00:00:00 2001 From: Joshua D'Souza Date: Tue, 6 Feb 2024 13:34:32 +0300 Subject: [PATCH 3/4] Adding misc to changelog references changes from LayerCI to webappio --- cli/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 12ae85c36b7e..4e54a72ba490 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -10,6 +10,7 @@ _Released 2/13/2024 (PENDING)_ **Misc:** - Improved accessibility of the Cypress App in some areas. Addressed in [#28774](https://github.com/cypress-io/cypress/pull/28774). +- Changed references of LayerCI to webapp.io. Addressed in [#28874](https://github.com/cypress-io/cypress/pull/28874). ## 13.6.4 From b8e9b7fd0fc0fd3e760012e07f856e7a54e9b4a0 Mon Sep 17 00:00:00 2001 From: Joshua D'Souza Date: Tue, 6 Feb 2024 18:27:55 +0300 Subject: [PATCH 4/4] Removing EXPOSE_WEBSITE_HOST --- packages/server/lib/util/ci_provider.js | 1 - packages/server/test/unit/util/ci_provider_spec.js | 2 -- 2 files changed, 3 deletions(-) diff --git a/packages/server/lib/util/ci_provider.js b/packages/server/lib/util/ci_provider.js index f266ad795b14..35990f6c2b84 100644 --- a/packages/server/lib/util/ci_provider.js +++ b/packages/server/lib/util/ci_provider.js @@ -428,7 +428,6 @@ const _providerCiParams = () => { 'REPOSITORY_OWNER', 'GIT_BRANCH', 'GIT_TAG', // short hex for commits - 'EXPOSE_WEBSITE_HOST', ]), } } diff --git a/packages/server/test/unit/util/ci_provider_spec.js b/packages/server/test/unit/util/ci_provider_spec.js index 5f85d7c84753..60884a61e180 100644 --- a/packages/server/test/unit/util/ci_provider_spec.js +++ b/packages/server/test/unit/util/ci_provider_spec.js @@ -1095,7 +1095,6 @@ describe('lib/util/ci_provider', () => { JOB_ID: 'jobId', RUNNER_ID: 'runnerId', RETRY_INDEX: 'retryIndex', - EXPOSE_WEBSITE_HOST: 'exposeWebsiteHost', // git info PULL_REQUEST_URL: 'pullRequest', @@ -1117,7 +1116,6 @@ describe('lib/util/ci_provider', () => { pullRequestUrl: 'pullRequest', repositoryName: 'repoName', repositoryOwner: 'repoOwner', - exposeWebsiteHost: 'exposeWebsiteHost', }) return expectsCommitParams({