Ignore profiled services in runtime drift check
This commit is contained in:
@@ -30,7 +30,7 @@ parse_compose() {
|
|||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
function emit() {
|
function emit() {
|
||||||
if (service && image) {
|
if (service && image && !has_profile) {
|
||||||
print clean(container) "\t" clean(image)
|
print clean(container) "\t" clean(image)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,6 +40,7 @@ parse_compose() {
|
|||||||
sub(/:$/, "", service)
|
sub(/:$/, "", service)
|
||||||
image=""
|
image=""
|
||||||
container=service
|
container=service
|
||||||
|
has_profile=0
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
service && /^ image:/ {
|
service && /^ image:/ {
|
||||||
@@ -52,6 +53,10 @@ parse_compose() {
|
|||||||
sub(/^[[:space:]]*container_name:[[:space:]]*/, "", container)
|
sub(/^[[:space:]]*container_name:[[:space:]]*/, "", container)
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
service && /^ profiles:/ {
|
||||||
|
has_profile=1
|
||||||
|
next
|
||||||
|
}
|
||||||
END { emit() }
|
END { emit() }
|
||||||
' "$compose"
|
' "$compose"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user