devops: upload reports to a new container (#17298)

This patch:
- adds `gitBranchName` to the infra metadata to the report
- starts uploading persistent reports to a different container, prefixed
with utc year-month-date.
This commit is contained in:
Andrey Lushnikov 2022-09-13 10:55:39 -07:00 коммит произвёл GitHub
Родитель ebfefefc8e
Коммит 462fa7d79d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -80,6 +80,7 @@ EMBED_METADATA_SCRIPT=$(cat <<EOF
commitTitle: process.env.COMMIT_TITLE,
commitAuthorName: process.env.COMMIT_AUTHOR_NAME,
commitAuthorEmail: process.env.COMMIT_AUTHOR_EMAIL,
gitBranchName: process.env.GITHUB_REF_NAME,
};
console.log(JSON.stringify(json));
EOF
@ -91,5 +92,13 @@ node -e "${EMBED_METADATA_SCRIPT}" "$1" > "${REPORT_NAME}"
gzip "${REPORT_NAME}"
az storage blob upload --connection-string "${FLAKINESS_CONNECTION_STRING}" -c uploads -f "${REPORT_NAME}.gz" -n "${REPORT_NAME}.gz"
UTC_DATE=$(cat <<EOF | node
const date = new Date();
console.log([date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()].join('-'));
EOF
)
az storage blob upload --connection-string "${FLAKINESS_CONNECTION_STRING}" -c uploads-permanent -f "${REPORT_NAME}.gz" -n "${UTC_DATE}-${REPORT_NAME}.gz"
rm -rf "${REPORT_NAME}.gz"