Debugging workflow - only built workload container so far
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 6s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 7s
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 6s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 7s
This commit is contained in:
@@ -78,12 +78,21 @@ jobs:
|
|||||||
|
|
||||||
# yq-based extractor (multi-doc aware; Deployment only; container name match)
|
# yq-based extractor (multi-doc aware; Deployment only; container name match)
|
||||||
yq_extract() {
|
yq_extract() {
|
||||||
yq -r '
|
if [[ "$ctype" == "initContainers" ]]; then
|
||||||
select(.kind == "Deployment") |
|
yq -r '
|
||||||
.spec.template.spec.[env(ctype)] // [] |
|
select(.kind == "Deployment") |
|
||||||
map(select(.name == env(cname))) |
|
.spec.template.spec.initContainers // [] |
|
||||||
.[]?.image
|
map(select(.name == env(cname))) |
|
||||||
' "$1" 2>/dev/null | tail -n 1
|
.[]?.image
|
||||||
|
' "$1" 2>/dev/null | tail -n 1
|
||||||
|
else
|
||||||
|
yq -r '
|
||||||
|
select(.kind == "Deployment") |
|
||||||
|
.spec.template.spec.containers // [] |
|
||||||
|
map(select(.name == env(cname))) |
|
||||||
|
.[]?.image
|
||||||
|
' "$1" 2>/dev/null | tail -n 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# ultra-tolerant fallback: grep around the appropriate block
|
# ultra-tolerant fallback: grep around the appropriate block
|
||||||
@@ -120,11 +129,19 @@ jobs:
|
|||||||
list_workload_images() {
|
list_workload_images() {
|
||||||
echo "== workload $ctype in $1 ==" >&2
|
echo "== workload $ctype in $1 ==" >&2
|
||||||
if have_yq; then
|
if have_yq; then
|
||||||
yq -r '
|
if [[ "$ctype" == "initContainers" ]]; then
|
||||||
select(.kind == "Deployment") |
|
yq -r '
|
||||||
.spec.template.spec.[env(ctype)] // [] |
|
select(.kind == "Deployment") |
|
||||||
.[] | "\(.name): \(.image)"
|
.spec.template.spec.initContainers // [] |
|
||||||
' "$1" 2>/dev/null | nl -ba >&2 || true
|
.[] | "\(.name): \(.image)"
|
||||||
|
' "$1" 2>/dev/null | nl -ba >&2 || true
|
||||||
|
else
|
||||||
|
yq -r '
|
||||||
|
select(.kind == "Deployment") |
|
||||||
|
.spec.template.spec.containers // [] |
|
||||||
|
.[] | "\(.name): \(.image)"
|
||||||
|
' "$1" 2>/dev/null | nl -ba >&2 || true
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# coarse list for visibility
|
# coarse list for visibility
|
||||||
if [[ "$ctype" == "initContainers" ]]; then
|
if [[ "$ctype" == "initContainers" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user