-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added codecov checksum validation, updated CircleCI machine to Focal. #5907
Conversation
a4b5772
to
fb8c356
Compare
fb8c356
to
49df6e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this PR was opened, looks like we have more checksums to validate. Will tack on some changes requested and confirm CI is still passing.
ci_env=$(bash <(curl -s https://codecov.io/env)) | ||
tmpdir=$(mktemp -d -t codecov-XXXX) | ||
curl -s https://codecov.io/bash > "$tmpdir"/codecov; # env isn't in SHA256SUM yet!! | ||
curl -s https://codecov.io/env > "$tmpdir"/env; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env isn't in SHA256SUM yet!!
Looks like it is now: https://github.com/codecov/codecov-bash/blob/1b4b96ac38946b20043b3ca3bad88d95462259b6/SHA256SUM
@@ -97,6 +97,7 @@ version: 2 | |||
jobs: | |||
lint: | |||
machine: | |||
image: ubuntu-2004:202010-01 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Machine images are set to 20.04 through all machine-executor jobs in the CI config. 👍
securedrop/bin/dev-shell
Outdated
tmpdir=$(mktemp -d -t codecov-XXXX) | ||
curl -s https://codecov.io/bash > "$tmpdir"/codecov; # env isn't in SHA256SUM yet!! | ||
curl -s https://codecov.io/env > "$tmpdir"/env; | ||
VERSION=$(curl --silent "https://api.github.com/repos/codecov/codecov-bash/releases/latest" | grep '"tag_name":' |sed -E 's/.*"([^"]+)".*/\1/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: curl -s https://api.github.com/repos/codecov/codecov-bash/releases/latest | jq -r .tag_name
for posterity's sake.
securedrop/bin/dev-shell
Outdated
VERSION=$(curl --silent "https://api.github.com/repos/codecov/codecov-bash/releases/latest" | grep '"tag_name":' |sed -E 's/.*"([^"]+)".*/\1/') | ||
curl -s https://raw.githubusercontent.com/codecov/codecov-bash/"${VERSION}"/SHA256SUM > "$tmpdir"/codecov-hashes | ||
pushd "$tmpdir" && shasum -a 256 -c --ignore-missing codecov-hashes && popd | ||
chmod +x "$tmpdir"/env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: does env
need to be executable?
3341e41
to
31b05b0
Compare
Encountered a flake on the ua test:
via https://app.circleci.com/pipelines/github/freedomofpress/securedrop/2313/workflows/1e215457-a0bd-4e8f-9aec-2c800348d61b/jobs/53583 . Rerunning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI now passing, and changes lgtm
Status
Ready for review
Description of Changes
bash
andenv
scripts in CI to validate checksums against their GitHub repo before running.Testing
Deployment
CI only, no deployment issues