You could work with Jenkins API endpoint. Create your own hook.
crumb=$(curl -u "$USER:$JENKINS_API_KEY" -s 'http://$HOST/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') curl -vg -u "$USER:$JENKINS_API_KEY" --data-urlencode json=$DATA -H "$crumb" "http://$HOST/job/$PROJECT_NAME/build?delay=0sec"
DATA="{\"parameter\":[{\"name\":\"GITHUB_BRANCH_HEAD_SHA\",\"value\":\"$GITHUB_SHA\"},{\"name\":\"GITHUB_BRANCH_NAME\",\"value\":\"$BRANCH\"},{\"name\":\"BUILD_NUMBER\",\"value\":\"$GITHUB_SHA\"},{\"name\":\"ACTION_DESCRIPTION\",\"value\":\"$BRANCH$GITHUB_SHA\"}]}"
Hope this help slightly.
Thanks Daniel. I will try to implement what you have mentioned.
Hi, I am trying to do something similar. I was wondering if you had any luck implementing this?
did you find any luck implementing the abv method ?
did it work for you ?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You could work with Jenkins API endpoint. Create your own hook.
crumb=$(curl -u "$USER:$JENKINS_API_KEY" -s 'http://$HOST/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)')
curl -vg -u "$USER:$JENKINS_API_KEY" --data-urlencode json=$DATA -H "$crumb" "http://$HOST/job/$PROJECT_NAME/build?delay=0sec"
DATA="{\"parameter\":[{\"name\":\"GITHUB_BRANCH_HEAD_SHA\",\"value\":\"$GITHUB_SHA\"},{\"name\":\"GITHUB_BRANCH_NAME\",\"value\":\"$BRANCH\"},{\"name\":\"BUILD_NUMBER\",\"value\":\"$GITHUB_SHA\"},{\"name\":\"ACTION_DESCRIPTION\",\"value\":\"$BRANCH
$GITHUB_SHA\"}]}"
Hope this help slightly.
Thanks Daniel. I will try to implement what you have mentioned.
Hi, I am trying to do something similar. I was wondering if you had any luck implementing this?
did you find any luck implementing the abv method ?
did it work for you ?