You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
function parse_jira_ids(){
for ID in "$(echo $log | grep -Po '(TEST-([0-9]{1,}))')"
do
echo $ID
echo "${ID}" > $fileName.txt (WORKING ) -> Write "TEST-1" in fileName.txt
JIRA_URL_1="https://jira.linx.com.br/rest/api/2/issue/TEST-1/comment"
JIRA_URL_2="https://jira.linx.com.br/rest/api/2/issue/$ID/comment" (NOT WORKING)
curl -k -u 'user':'pass' -X POST --data '{"body": "exemple" }' -H "Content-type: application/json" $JIRA_URL_1 >> aapost-commit.log 2>&1 (working )
curl -k -u 'user':'pass' -X POST --data '{"body": "$ID" }' -H "Content-type: application/json" $JIRA_URL_2 >> aapost-commit.log 2>&1 (NOT working )
done
}
My best guess is that the $1 is not being expanded in your commands. I'd try ${ID} instead of $ID
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events