From a18cb02e776df663a54f4c2231e7ffd4895f79a8 Mon Sep 17 00:00:00 2001 From: Felix Perron-Brault Date: Tue, 17 Sep 2024 17:53:14 -0400 Subject: [PATCH] chore: add bueno to deploy config (#4429) This PR will add bueno to the list of resources that get deployed on the CDN. https://coveord.atlassian.net/browse/KIT-3552 --- .deployment.config.json | 33 +++++++++++++++++++ .../deploy/execute-deployment-pipeline.mjs | 5 +++ scripts/deploy/invalidate-cloudfront.mjs | 2 ++ 3 files changed, 40 insertions(+) diff --git a/.deployment.config.json b/.deployment.config.json index 1b84e881fc9..30434007746 100644 --- a/.deployment.config.json +++ b/.deployment.config.json @@ -15,6 +15,39 @@ } }, "ordered_phases": [ + { + "id": "deploy-bueno-patch-to-s3-version", + "s3": { + "bucket": "{terraform.infra.infra.bucket_binaries}", + "directory": "proda/StaticCDN/bueno/v$[BUENO_PATCH_VERSION]", + "source": "packages/bueno/dist/browser", + "parameters": { + "acl": "public-read" + } + } + }, + { + "id": "deploy-bueno-minor-to-s3-version", + "s3": { + "bucket": "{terraform.infra.infra.bucket_binaries}", + "directory": "proda/StaticCDN/bueno/v$[BUENO_MINOR_VERSION]", + "source": "packages/bueno/dist/browser", + "parameters": { + "acl": "public-read" + } + } + }, + { + "id": "deploy-bueno-major-to-s3-version", + "s3": { + "bucket": "{terraform.infra.infra.bucket_binaries}", + "directory": "proda/StaticCDN/bueno/v$[BUENO_MAJOR_VERSION]", + "source": "packages/bueno/dist/browser", + "parameters": { + "acl": "public-read" + } + } + }, { "id": "deploy-headless-patch-to-s3-version", "s3": { diff --git a/scripts/deploy/execute-deployment-pipeline.mjs b/scripts/deploy/execute-deployment-pipeline.mjs index c6868d662ac..6658f10127a 100644 --- a/scripts/deploy/execute-deployment-pipeline.mjs +++ b/scripts/deploy/execute-deployment-pipeline.mjs @@ -4,6 +4,7 @@ import atomicHostedPageJson from '../../packages/atomic-hosted-page/package.json import atomicReactJson from '../../packages/atomic-react/package.json' assert {type: 'json'}; import atomicJson from '../../packages/atomic/package.json' assert {type: 'json'}; import headlessJson from '../../packages/headless/package.json' assert {type: 'json'}; +import buenoJson from '../../packages/bueno/package.json' assert {type: 'json'}; const releaseCommit = execSync('git rev-parse HEAD').toString().trim(); @@ -16,12 +17,16 @@ function getVersionComposants(version) { }; } +const bueno = getVersionComposants(buenoJson.version); const headless = getVersionComposants(headlessJson.version); const atomic = getVersionComposants(atomicJson.version); const atomicReact = getVersionComposants(atomicReactJson.version); const atomicHostedPage = getVersionComposants(atomicHostedPageJson.version); console.log(execSync(` deployment-package package create --with-deploy \ + --resolve BUENO_MAJOR_VERSION=${bueno.major} \ + --resolve BUENO_MINOR_VERSION=${bueno.major}.${bueno.minor} \ + --resolve BUENO_PATCH_VERSION=${bueno.major}.${bueno.minor}.${bueno.patch} \ --resolve HEADLESS_MAJOR_VERSION=${headless.major} \ --resolve HEADLESS_MINOR_VERSION=${headless.major}.${headless.minor} \ --resolve HEADLESS_PATCH_VERSION=${headless.major}.${headless.minor}.${headless.patch} \ diff --git a/scripts/deploy/invalidate-cloudfront.mjs b/scripts/deploy/invalidate-cloudfront.mjs index 0fc5bdd0ef8..52bd393a9e2 100644 --- a/scripts/deploy/invalidate-cloudfront.mjs +++ b/scripts/deploy/invalidate-cloudfront.mjs @@ -17,6 +17,8 @@ async function main() { `/atomic/v${getMajorVersion('atomic')}/*`, '/headless/latest/*', `/headless/v${getMajorVersion('headless')}/*`, + '/bueno/latest/*', + `/bueno/v${getMajorVersion('bueno')}/*`, ]; const invalidationRequest = cloudfront.createInvalidation({