Skip to content

Commit 71956b4

Browse files
authored
RUST-1921 Upload signature files to s3 (#1129)
1 parent 895f0c1 commit 71956b4

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.evergreen/release-build-vars.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ CRATE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq --raw-output '.
1313
rm secrets-export.sh
1414

1515
PAPERTRAIL_PRODUCT="rust-driver"
16+
TEST_PREFIX=""
1617
if [[ "${DRY_RUN:-}" == "yes" ]]; then
1718
PAPERTRAIL_PRODUCT="rust-driver-testing"
19+
TEST_PREFIX="testing-"
1820
fi
1921

2022
cat <<EOT >release-expansion.yml
@@ -27,4 +29,7 @@ ARTIFACTORY_USERNAME: "${ARTIFACTORY_USERNAME}"
2729
ARTIFACTORY_PASSWORD: "${ARTIFACTORY_PASSWORD}"
2830
GARASIGN_USERNAME: "${GARASIGN_USERNAME}"
2931
GARASIGN_PASSWORD: "${GARASIGN_PASSWORD}"
32+
S3_UPLOAD_AWS_KEY: "${S3_UPLOAD_AWS_KEY}"
33+
S3_UPLOAD_AWS_SECRET: "${S3_UPLOAD_AWS_SECRET}"
34+
TEST_PREFIX: "${TEST_PREFIX}"
3035
EOT

.evergreen/releases.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,23 @@ functions:
158158
args:
159159
- .evergreen/release-sign.sh
160160

161+
# Note for debugging: the links generated by Evergreen for these files will
162+
# return a "permission denied" error; this is expected and a consequence of
163+
# s3 configuration. The files can be viewed/downloaded by replacing the host
164+
# portion of the URL with `downloads.mongodb.org`.
161165
"save signature":
162-
command: s3.push
166+
- command: s3.put
167+
params:
168+
aws_key: ${S3_UPLOAD_AWS_KEY}
169+
aws_secret: ${S3_UPLOAD_AWS_SECRET}
170+
local_files_include_filter:
171+
- src/mongodb-${CRATE_VERSION}.sig
172+
- src/mongodb-internal-macros-${CRATE_VERSION}.sig
173+
remote_file: rust-driver/${TEST_PREFIX}
174+
bucket: cdn-origin-rust-driver
175+
permissions: private
176+
content_type: text/plain
177+
display_name: signature-
163178

164179
tasks:
165180
- name: "publish-release"

0 commit comments

Comments
 (0)