mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
fix(NA): access-multiple-gcs-buckets-when-promoting-snapshots (#176786)
Follow up for https://github.com/elastic/kibana/pull/176781 so we can fix the access to the GCS buckets during snapshot promotion --------- Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
This commit is contained in:
parent
82c48aedbe
commit
32cc250bc1
2 changed files with 7 additions and 3 deletions
|
@ -62,7 +62,10 @@ if [[ -z "$EMAIL" ]]; then
|
|||
EMAIL="kibana-ci-access-coverage@$GCLOUD_EMAIL_POSTFIX"
|
||||
;;
|
||||
"kibana-ci-es-snapshots-daily")
|
||||
EMAIL="kibana-ci-access-es-snapshots@$GCLOUD_EMAIL_POSTFIX"
|
||||
EMAIL="kibana-ci-access-es-daily@$GCLOUD_EMAIL_POSTFIX"
|
||||
;;
|
||||
"kibana-ci-es-snapshots-permanent")
|
||||
EMAIL="kibana-ci-access-es-permanent@$GCLOUD_EMAIL_POSTFIX"
|
||||
;;
|
||||
"kibana-so-types-snapshots")
|
||||
EMAIL="kibana-ci-access-so-snapshots@$GCLOUD_EMAIL_POSTFIX"
|
||||
|
|
|
@ -18,7 +18,7 @@ import { BASE_BUCKET_DAILY, BASE_BUCKET_PERMANENT } from './bucket_config';
|
|||
throw Error('Manifest URL missing');
|
||||
}
|
||||
|
||||
const mainCWD = process.cwd();
|
||||
const projectRoot = process.cwd();
|
||||
const tempDir = fs.mkdtempSync('snapshot-promotion');
|
||||
process.chdir(tempDir);
|
||||
|
||||
|
@ -39,10 +39,11 @@ import { BASE_BUCKET_DAILY, BASE_BUCKET_PERMANENT } from './bucket_config';
|
|||
execSync(
|
||||
`
|
||||
set -euo pipefail
|
||||
${mainCWD}/.buildkite/scripts/common/activate_service_account.sh ${bucket}
|
||||
${projectRoot}/.buildkite/scripts/common/activate_service_account.sh ${BASE_BUCKET_DAILY}
|
||||
cp manifest.json manifest-latest-verified.json
|
||||
gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" cp manifest-latest-verified.json gs://${BASE_BUCKET_DAILY}/${version}/
|
||||
rm manifest.json
|
||||
${projectRoot}/.buildkite/scripts/common/activate_service_account.sh ${BASE_BUCKET_PERMANENT}
|
||||
cp manifest-permanent.json manifest.json
|
||||
gsutil -m cp -r gs://${bucket}/* gs://${BASE_BUCKET_PERMANENT}/${version}/
|
||||
gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" cp manifest.json gs://${BASE_BUCKET_PERMANENT}/${version}/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue