-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathlistimages.sh
More file actions
executable file
·52 lines (42 loc) · 1.04 KB
/
listimages.sh
File metadata and controls
executable file
·52 lines (42 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
help_msg=$(cat <<EOF
Usage:
listimages.sh [OPTIONS]
Options:
-r <registry>
-o <operator version>
-h
EOF
)
: "${REGISTRY:=registry.suse.com}"
: "${OPERATOR:=$(git describe --abbrev=0 | sed "s|v\(.*\)|\1|g")}"
while getopts "hr:o:" flag; do
case $flag in
h)
echo "${help_msg}"
exit 0
;;
r)
REGISTRY=${OPTARG}
;;
o)
OPERATOR=$OPTARG
;;
\?)
>&2 echo "Invalid options"
echo "${help_msg}"
exit 1
;;
esac
done
echo "${REGISTRY}/rancher/elemental-operator:${OPERATOR}"
echo "${REGISTRY}/rancher/seedimage-builder:${OPERATOR}"
echo "${REGISTRY}/rancher/elemental-channel:${OPERATOR}"
echo "${REGISTRY}/rancher/elemental-rt-channel:${OPERATOR}"
# Assume if not registry.suse.com it should be some OBS path, hence
# charts require a different repository than containers
if [ ${REGISTRY} != "registry.suse.com" ]; then
REGISTRY="$(dirname ${REGISTRY})/charts"
fi
echo "${REGISTRY}/rancher/elemental-operator-crds:${OPERATOR}"
echo "${REGISTRY}/rancher/elemental-operator:${OPERATOR}"