mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Extract services stack filter to a local variable
This commit is contained in:
parent
d4c11ec5eb
commit
8082eb7823
4
psu
4
psu
@ -1056,12 +1056,14 @@ tasks_healthy() {
|
|||||||
|
|
||||||
services() {
|
services() {
|
||||||
local services
|
local services
|
||||||
|
local filter_service
|
||||||
|
filter_service="\"label\":{\"com.docker.stack.namespace=$PORTAINER_STACK_NAME\":true}"
|
||||||
services=$(http \
|
services=$(http \
|
||||||
--check-status \
|
--check-status \
|
||||||
--ignore-stdin \
|
--ignore-stdin \
|
||||||
--verify=$HTTPIE_VERIFY_SSL \
|
--verify=$HTTPIE_VERIFY_SSL \
|
||||||
"$PORTAINER_URL/api/endpoints/$PORTAINER_ENDPOINT/docker/services" \
|
"$PORTAINER_URL/api/endpoints/$PORTAINER_ENDPOINT/docker/services" \
|
||||||
filters=="{\"label\":{\"com.docker.stack.namespace=$PORTAINER_STACK_NAME\":true}}" \
|
filters=="{$filter_service}" \
|
||||||
"Authorization: Bearer $AUTH_TOKEN")
|
"Authorization: Bearer $AUTH_TOKEN")
|
||||||
check_for_errors $? "$services"
|
check_for_errors $? "$services"
|
||||||
echo "$services"
|
echo "$services"
|
||||||
|
Loading…
Reference in New Issue
Block a user