Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

Differnce between linux shell skript and Gitlab shell script [duplicate]

$
0
0

I have a pipeline that always fail with a shell command. This is:

response=$(curl -s -u "${HARBOR_SWIO_USER}:${HARBOR_SWIO_PASS}" -H "Accept:application/json" "$URL")#This line will failecho "$response" | jq -e --arg TAG "$TAG" '.[]|select(.tags[].name==$TAG)'> /dev/nullif [ $? -eq 0 ]; then    echo "Image exists"else    echo "Image does not exist"fi

I put this into a shell script on my Linux and execute it, works well. On Gitlab with a Linux Runner it fails.

I checked the jq version, both 1.6I verified the JSON from response with JQ and this is successful (0).

echo $response | jq -e . >/dev/null 2>&1  ; echo ${PIPESTATUS[1]}

But everytime the first call fail on Gitlab. Any Idea what is wrong?


Viewing all articles
Browse latest Browse all 657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>