Remove dependency on build artifacts mirror (#24575)

This reverts #24106.

There was a regression in CircleCI's artifacts API recently where you
could no longer access artifacts without an authorization token. This
broke our size reporting CI job because we can't use an authorization
token on external PRs without potentially leaking it. As a temporary
workaround, I changed the size reporting job to use a public mirror of
our build artifacts.

The CircleCI API has since been fixed to no longer require
authorization, so we can revert the workaround.
This commit is contained in:
Andrew Clark
2022-05-18 11:13:19 -04:00
committed by GitHub
parent 357a61324f
commit a412d787e9
2 changed files with 14 additions and 19 deletions

View File

@@ -9,14 +9,6 @@ const {getArtifactsList, logPromise} = require('../utils');
const theme = require('../theme');
const run = async ({build, cwd, releaseChannel}) => {
const CIRCLE_TOKEN = process.env.CIRCLE_CI_API_TOKEN;
if (!CIRCLE_TOKEN) {
console.error(
theme.error('Missing required environment variable: CIRCLE_CI_API_TOKEN')
);
process.exit(1);
}
const artifacts = await getArtifactsList(build);
const buildArtifacts = artifacts.find(entry =>
entry.path.endsWith('build.tgz')
@@ -32,7 +24,7 @@ const run = async ({build, cwd, releaseChannel}) => {
// Download and extract artifact
await exec(`rm -rf ./build`, {cwd});
await exec(
`curl -L $(fwdproxy-config curl) ${buildArtifacts.url} -H "Circle-Token: ${CIRCLE_TOKEN}" | tar -xvz`,
`curl -L $(fwdproxy-config curl) ${buildArtifacts.url} | tar -xvz`,
{
cwd,
}