SERVER-104014 migrate to DevProd ECR (#40640)
GitOrigin-RevId: 39e0eb2822e257335476db33f95098081ded8046
This commit is contained in:
committed by
MongoDB Bot
parent
552bbb3db7
commit
ae8a523db2
@@ -2283,6 +2283,19 @@ functions:
|
||||
args:
|
||||
- "./src/evergreen/sasl_windows_cyrussasl_teardown.sh"
|
||||
|
||||
"log into devprod container registry":
|
||||
- command: ec2.assume_role
|
||||
params:
|
||||
role_arn: ${ecr_role_evergreen_arn}
|
||||
- *f_expansions_write
|
||||
- command: subprocess.exec
|
||||
params:
|
||||
binary: bash
|
||||
include_expansions_in_env:
|
||||
[AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
|
||||
args:
|
||||
- "./src/evergreen/container_registry_login.sh"
|
||||
|
||||
# Pre task steps
|
||||
pre:
|
||||
- func: "set task expansion macros"
|
||||
@@ -7127,15 +7140,7 @@ tasks:
|
||||
aws_key_remote: ${repo_aws_key}
|
||||
aws_secret_remote: ${repo_aws_secret}
|
||||
- func: "f_expansions_write"
|
||||
|
||||
# login to container registry
|
||||
- command: shell.exec
|
||||
params:
|
||||
shell: bash
|
||||
silent: true
|
||||
script: |
|
||||
set -oe
|
||||
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
|
||||
- func: "log into devprod container registry"
|
||||
|
||||
# signing windows artifacts
|
||||
- command: subprocess.exec
|
||||
@@ -7466,14 +7471,7 @@ tasks:
|
||||
aws_key_remote: ${repo_aws_key}
|
||||
aws_secret_remote: ${repo_aws_secret}
|
||||
- func: "f_expansions_write"
|
||||
# login to container registry
|
||||
- command: shell.exec
|
||||
params:
|
||||
shell: bash
|
||||
silent: true
|
||||
script: |
|
||||
set -oe
|
||||
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
|
||||
- func: "log into devprod container registry"
|
||||
- command: subprocess.exec
|
||||
params:
|
||||
binary: bash
|
||||
|
||||
14
evergreen/container_registry_login.sh
Normal file
14
evergreen/container_registry_login.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
|
||||
. "$DIR/prelude.sh"
|
||||
|
||||
cd src
|
||||
|
||||
set -oe
|
||||
attempts=0
|
||||
max_attempts=4
|
||||
|
||||
while ! aws ecr get-login-password --region us-east-1 | podman login --password-stdin --username ${release_tools_container_registry_username_ecr} ${release_tools_container_registry_ecr}; do
|
||||
[ "$attempts" -ge "$max_attempts" ] && exit 1
|
||||
((attempts++))
|
||||
sleep 10
|
||||
done
|
||||
@@ -29,5 +29,5 @@ podman run \
|
||||
--env-file=signing-envfile \
|
||||
--rm \
|
||||
-v $(pwd):$(pwd) -w $(pwd) \
|
||||
${garasign_gpg_image} \
|
||||
${garasign_gpg_image_ecr} \
|
||||
/bin/bash -c "$(cat ./gpg_signing_commands.sh)"
|
||||
|
||||
@@ -61,5 +61,5 @@ podman run \
|
||||
--env-file=signing-envfile \
|
||||
--rm \
|
||||
-v $(pwd):$(pwd) -w $(pwd) \
|
||||
${garasign_gpg_image} \
|
||||
${garasign_gpg_image_ecr} \
|
||||
/bin/bash -c "$(cat ./gpg_signing_commands.sh)"
|
||||
|
||||
@@ -31,7 +31,7 @@ podman run \
|
||||
--env-file=signing-envfile \
|
||||
--rm \
|
||||
-v $(pwd):$(pwd) -w $(pwd) \
|
||||
${garasign_jsign_image} \
|
||||
${garasign_jsign_image_ecr} \
|
||||
/bin/bash -c "$(cat ./jsign_signing_commands.sh)"
|
||||
|
||||
# generating checksums
|
||||
|
||||
Reference in New Issue
Block a user