Skip to content

Commit 7f25ebe

Browse files
authored
Merge pull request #451 from webern/print-image-names
build: add print-image-list makefile target
2 parents 8a417bd + 43dc806 commit 7f25ebe

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PUSH_IMAGES = $(addprefix push-, $(IMAGES))
2424

2525
.PHONY: build sdk-openssl example-test-agent example-resource-agent \
2626
images fetch integ-test show-variables cargo-deny tools $(IMAGES) \
27-
tag-images $(TAG_IMAGES) push-images $(PUSH_IMAGES)
27+
tag-images $(TAG_IMAGES) push-images $(PUSH_IMAGES) print-image-names
2828

2929
export DOCKER_BUILDKIT=1
3030
export CARGO_HOME = $(TOP)/.cargo
@@ -44,6 +44,20 @@ fetch:
4444

4545
images: fetch $(IMAGES)
4646

47+
# This target prints the image names. It may be useful to write loops over the names of the containers. For example, we
48+
# might want to check to make sure a repository exists for each image (i.e. maybe a new container has been added to the
49+
# list since we last pushed, so maybe we need to create a new repository).
50+
#
51+
# Example:
52+
# declare -a arr=($(make print-image-names))
53+
# for image_name in "${arr[@]}"
54+
# do
55+
# echo "do something with $image_name"
56+
# done
57+
print-image-names:
58+
$(info $(IMAGES))
59+
@echo > /dev/null
60+
4761
# Builds, Lints and Tests the Rust workspace
4862
build: fetch
4963
cargo fmt -- --check

0 commit comments

Comments
 (0)