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"fiI 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?