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() {
|
||||
local services
|
||||
local filter_service
|
||||
filter_service="\"label\":{\"com.docker.stack.namespace=$PORTAINER_STACK_NAME\":true}"
|
||||
services=$(http \
|
||||
--check-status \
|
||||
--ignore-stdin \
|
||||
--verify=$HTTPIE_VERIFY_SSL \
|
||||
"$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")
|
||||
check_for_errors $? "$services"
|
||||
echo "$services"
|
||||
|
Loading…
Reference in New Issue
Block a user