-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa56886
commit a5fa295
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
gcr.io: | ||
images: | ||
k8s-prow/hook: [] | ||
k8s-prow/sinker: [] | ||
k8s-prow/deck: [] | ||
k8s-prow/horologium: [] | ||
k8s-prow/status-reconciler: [] | ||
k8s-prow/ghproxy: [] | ||
k8s-prow/prow-controller-manager: [] | ||
k8s-prow/crier: [] | ||
k8s-prow/checkconfig: [] | ||
k8s-prow/clonerefs: [] | ||
k8s-prow/initupload: [] | ||
k8s-prow/entrypoint: [] | ||
k8s-prow/sidecar: [] | ||
k8s-staging-boskos/boskos: [] | ||
k8s-staging-boskos/aws-janitor-boskos: [] | ||
k8s-staging-boskos/cleaner: [] | ||
k8s-staging-boskos/reaper: [] | ||
k8s-testgrid/summarizer: [] | ||
k8s-testgrid/updater: [] | ||
|
||
ghcr.io: | ||
images: | ||
external-secrets/kubernetes-external-secrets: [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/sh | ||
|
||
AWS_REGION="us-east-2" | ||
ECR_REGISTRY_TOKEN="t0q8k6g2" | ||
|
||
ARTIFACTS="${ARTIFACTS:-${PWD}/_artifacts}" | ||
mkdir -p "$ARTIFACTS/logs/" | ||
|
||
# list of image repositories to sync in internal ecr | ||
declare -a images=( | ||
"another-test" | ||
"hook" | ||
"sinker" | ||
"deck" | ||
"horologium" | ||
"status-reconciler" | ||
"ghproxy" | ||
"prow-controller-manager" | ||
"crier" | ||
"checkconfig" | ||
"clonerefs" | ||
"initupload" | ||
"entrypoint" | ||
"sidecar" | ||
"kubernetes-external-secrets" | ||
"boskos" | ||
"aws-janitor-boskos" | ||
"cleaner" | ||
"reaper" | ||
"summarizer" | ||
"updater" | ||
) | ||
|
||
# Logging to the ECR registry | ||
echo "[INFO] Logging to ECR registry ..." | ||
printf '~%.0s' {1..80}; echo | ||
aws ecr-public get-login-password --region ${AWS_REGION} | skopeo login --username AWS --password-stdin public.ecr.aws | ||
|
||
# Create ecr-public repostories | ||
echo "[INFO] Checking ECR Repository ..." | ||
printf '~%.0s' {1..80}; echo | ||
for repository_name in "${images[@]}" | ||
do | ||
aws ecr-public describe-repositories --repository-names ${repository_name} --region ${AWS_REGION} >> $ARTIFACTS/logs/aws-ecr-public.log || aws ecr-public create-repository --repository-name ${repository_name} --region ${AWS_REGION} >> $ARTIFACTS/logs/aws-ecr-public.log | ||
done | ||
|
||
# Sync the upstream/third-party image tags with internal ecr images | ||
|
||
echo "[INFO] Starting syncing images to ECR..." | ||
printf '~%.0s' {1..80}; echo | ||
skopeo sync --src yaml source-images.yaml --dest docker public.ecr.aws/${ECR_REGISTRY_TOKEN}/ --keep-going |