Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CI: Switch to using reuse for license checking
[releng/global-jjb.git]
/
shell
/
openstack-protect-in-use-images.sh
diff --git
a/shell/openstack-protect-in-use-images.sh
b/shell/openstack-protect-in-use-images.sh
index
e229906
..
0d1624c
100644
(file)
--- a/
shell/openstack-protect-in-use-images.sh
+++ b/
shell/openstack-protect-in-use-images.sh
@@
-19,20
+19,28
@@
set -eu -o pipefail
echo "---> Protect in-use images"
os_cloud="${OS_CLOUD:-vex}"
echo "---> Protect in-use images"
os_cloud="${OS_CLOUD:-vex}"
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+lf-activate-venv --python python3 "lftools[openstack]" \
+ kubernetes \
+ python-heatclient \
+ python-openstackclient
+
images=()
while read -r -d $'\n' ; do
images+=("$REPLY")
done < <(grep -r IMAGE_NAME --include \*.cfg jenkins-config \
images=()
while read -r -d $'\n' ; do
images+=("$REPLY")
done < <(grep -r IMAGE_NAME --include \*.cfg jenkins-config \
- | awk -F'=' '{print $2}' \
- | sort -u)
+
| awk -F'=' '{print $2}' \
+
| sort -u)
jjbimages=()
while read -r -d $'\n' ; do
jjbimages+=("$REPLY")
done < <(grep -r 'ZZCI - ' --include \*.yaml jjb \
jjbimages=()
while read -r -d $'\n' ; do
jjbimages+=("$REPLY")
done < <(grep -r 'ZZCI - ' --include \*.yaml jjb \
- | awk -F": " '{print $3}' \
- | sed -e "s:'::;s:'$::;/^$/d" -e 's/^"//' -e 's/"$//' \
- | sort -u)
+
| awk -F": " '{print $3}' \
+
| sed -e "s:'::;s:'$::;/^$/d" -e 's/^"//' -e 's/"$//' \
+
| sort -u)
if ! [[ ${#images[@]} -eq 0 ]]; then
echo "INFO: There are images to protect defined in jenkins-config."
if ! [[ ${#images[@]} -eq 0 ]]; then
echo "INFO: There are images to protect defined in jenkins-config."