I want to save the output of curl -X GET "http://localhost:8080/test" ^| jq -r ".integrations.[0].id"
to an environment variable within a jenkins batch command in Windows8 so that I can use it in subsequent commands.
How to do that?
I tried this but did not work.
@echo off ^for /F "delims=" %%i in ("curl -X GET "http://localhost:8080/test" ^| jq -r ".integrations.[0].id"") do (set "response=%%i") ^echo ID = %response% ^endlocal