Skip to content

Commit

Permalink
Add support for test_tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
hpidcock committed Aug 28, 2023
1 parent e272137 commit cab657d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ images:
tags:
- 4.4
- 4.4.18
test_tag: 4.4
build_args:
- BASE_IMAGE=public.ecr.aws/ubuntu/ubuntu:20.04
- SNAP_RISK=stable
Expand All @@ -23,6 +24,7 @@ images:
- public.ecr.aws/juju/juju-db
tags:
- 4.4.24
test_tag: 4.4
build_args:
- BASE_IMAGE=public.ecr.aws/ubuntu/ubuntu:20.04
- SNAP_RISK=candidate
Expand Down
4 changes: 4 additions & 0 deletions make_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ microk8s_image_update() {
fi
reg_paths=$(yq -o=c ".images.[\"${image}\"].registry_paths" < images.yaml)
tags=$(yq -o=c ".images.[\"${image}\"].tags" < images.yaml)
test_tag=$(yq -o=c ".images.[\"${image}\"].test_tag" < images.yaml)
for reg_path in ${reg_paths//,/ }; do
for tag in ${tags//,/ }; do
last_tag=${tag}
docker save "${reg_path}:${tag}" | sudo microk8s.ctr --namespace k8s.io image import -
done
docker tag "${reg_path}:${last_tag}" "${reg_path}:${test_tag}"
docker save "${reg_path}:${test_tag}" | sudo microk8s.ctr --namespace k8s.io image import -
done
}

0 comments on commit cab657d

Please sign in to comment.