Skip to content

Commit 0a0ea73

Browse files
committed
Run jq in docker
1 parent 96e046d commit 0a0ea73

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Taskfile.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ tasks:
9696
fi
9797
TOKEN=$(curl -s -X POST "http://localhost:${NGINX_PORT}/api/v1/auth/login" \
9898
-H "Content-Type: application/json" \
99-
-d '{"username":"global-admin@os2iot.dk","password":"hunter2"}' | jq -r '.accessToken')
99+
-d '{"username":"global-admin@os2iot.dk","password":"hunter2"}' | docker run -i --rm ghcr.io/jqlang/jq -r '.accessToken')
100100
if [ "$TOKEN" = "null" ] || [ -z "$TOKEN" ]; then
101101
echo "✗ Failed to login - ensure services are running"
102102
exit 1
@@ -191,7 +191,7 @@ tasks:
191191
fi
192192
TOKEN=$(curl -s -X POST "http://localhost:${NGINX_PORT}/api/v1/auth/login" \
193193
-H "Content-Type: application/json" \
194-
-d '{"username":"global-admin@os2iot.dk","password":"hunter2"}' | jq -r '.accessToken')
194+
-d '{"username":"global-admin@os2iot.dk","password":"hunter2"}' | docker run -i --rm ghcr.io/jqlang/jq -r '.accessToken')
195195
if [ "$TOKEN" = "null" ] || [ -z "$TOKEN" ]; then
196196
echo "✗ Failed to login - ensure services are running"
197197
exit 1
@@ -210,7 +210,7 @@ tasks:
210210
-H "Content-Type: application/json" \
211211
-d '{"name":"test-development", "expiresOn": "2100-01-01T00:00:00Z", "permissionIds": [ 2, 3, 4 ]}')
212212
if echo "$RESULT" | grep -q '"key"'; then
213-
API_KEY=$(echo "$RESULT" | jq --raw-output '.key')
213+
API_KEY=$(echo "$RESULT" | docker run -i --rm ghcr.io/jqlang/jq --raw-output '.key')
214214
echo "✓ API key:"
215215
echo
216216
echo "$API_KEY"

0 commit comments

Comments
 (0)