Hi ALL
I am trying to pass “date --rfc-3339=seconds” output to curl command body inside
declarative pipeline but not able to succeed as tried multiple way by defining in script block then inside sh block . Still nothing works . Can someone help me how i can pass the output of the shell command inside the curl .
ReleaseDate= date --rfc-3339=seconds
steps {
sh '''
curl --location 'URL' \
--header 'Content-Type: application/json' \
--data '{
"component":"********",
"title":"XXXXXX",
"description":"YYYYYYY",
"status":"success",
"version":"1.10",
"release_time":"'${ReleaseDate}'"
}'
'''
}