diff --git a/aio/scripts/deploy-to-firebase.js b/aio/scripts/deploy-to-firebase.js index 973987cbf5..1f700dda00 100644 --- a/aio/scripts/deploy-to-firebase.js +++ b/aio/scripts/deploy-to-firebase.js @@ -34,7 +34,8 @@ if (require.main === module) { `Build/deploy mode : ${deploymentInfo.deployEnv}\n` + `Firebase project : ${deploymentInfo.projectId}\n` + `Firebase site : ${deploymentInfo.siteId}\n` + - `Deployment URLs : ${deploymentInfo.deployedUrl}\n`); + `Deployment URLs : ${deploymentInfo.deployedUrl}\n` + + ` https://${deploymentInfo.siteId}.web.app/`); if (!isDryRun) { deploy({...inputVars, ...deploymentInfo}); @@ -64,14 +65,11 @@ function computeDeploymentInfo( // The deployment mode is computed based on the branch we are building. const currentBranchMajorVersion = computeMajorVersion(currentBranch); - // Special-case v9, because it is piloting the Firebase hosting "multisites" setup. - // See https://angular-team.atlassian.net/browse/DEV-125 for more info. - const isV9 = currentBranchMajorVersion === 9; const deploymentInfoPerTarget = { next: { deployEnv: 'next', - projectId: 'aio-staging', - siteId: 'aio-staging', + projectId: 'angular-io', + siteId: 'next-angular-io-site', deployedUrl: 'https://next.angular.io/', }, rc: { @@ -83,13 +81,13 @@ function computeDeploymentInfo( stable: { deployEnv: 'stable', projectId: 'angular-io', - siteId: 'angular-io', + siteId: `v${currentBranchMajorVersion}-angular-io-site`, deployedUrl: 'https://angular.io/', }, archive: { deployEnv: 'archive', - projectId: isV9 ? 'aio-staging' : `v${currentBranchMajorVersion}-angular-io`, - siteId: isV9 ? 'v9-angular-io' : `v${currentBranchMajorVersion}-angular-io`, + projectId: 'angular-io', + siteId: `v${currentBranchMajorVersion}-angular-io-site`, deployedUrl: `https://v${currentBranchMajorVersion}.angular.io/`, }, }; diff --git a/aio/scripts/deploy-to-firebase.spec.js b/aio/scripts/deploy-to-firebase.spec.js index 6889a30d7d..1633b983d2 100644 --- a/aio/scripts/deploy-to-firebase.spec.js +++ b/aio/scripts/deploy-to-firebase.spec.js @@ -45,8 +45,8 @@ describe('deploy-to-firebase:', () => { CI_COMMIT: getLatestCommit('master'), }))).toEqual({ deployEnv: 'next', - projectId: 'aio-staging', - siteId: 'aio-staging', + projectId: 'angular-io', + siteId: 'next-angular-io-site', deployedUrl: 'https://next.angular.io/', }); }); @@ -77,7 +77,7 @@ describe('deploy-to-firebase:', () => { }))).toEqual({ deployEnv: 'stable', projectId: 'angular-io', - siteId: 'angular-io', + siteId: 'v4-angular-io-site', deployedUrl: 'https://angular.io/', }); }); @@ -108,13 +108,15 @@ describe('deploy-to-firebase:', () => { CI_COMMIT: getLatestCommit('2.4.x'), }))).toEqual({ deployEnv: 'archive', - projectId: 'v2-angular-io', - siteId: 'v2-angular-io', + projectId: 'angular-io', + siteId: 'v2-angular-io-site', deployedUrl: 'https://v2.angular.io/', }); }); - it('archive - v9-angular-io multisite special case - deploy success', () => { + // v9 used to be special-cased, because it was piloting the Firebase hosting "multisites" setup. + // See https://angular-team.atlassian.net/browse/DEV-125 for more info. + it('archive - deploy success (no special case for v9)', () => { expect(computeDeploymentInfo(computeInputVars({ CI_REPO_OWNER: 'angular', CI_REPO_NAME: 'angular', @@ -124,8 +126,8 @@ describe('deploy-to-firebase:', () => { CI_COMMIT: getLatestCommit('9.1.x'), }))).toEqual({ deployEnv: 'archive', - projectId: 'aio-staging', - siteId: 'v9-angular-io', + projectId: 'angular-io', + siteId: 'v9-angular-io-site', deployedUrl: 'https://v9.angular.io/', }); });