-
Bug
-
Resolution: Unresolved
-
Minor
I have a working jenkins instance with github-plugin (https://wiki.jenkins.io/display/JENKINS/GitHub+Plugin) configured. The job is currently accepting posts from github.com and triggering the build. I am able to parse out these 11 environment variables.
echo $payload returns nothing
{{echo GIT_COMMIT $GIT_COMMIT
echo GIT_BRANCH $GIT_BRANCH
echo GIT_LOCAL_BRANCH $GIT_LOCAL_BRANCH
echo GIT_PREVIOUS_COMMIT $GIT_PREVIOUS_COMMIT
echo GIT_PREVIOUS_SUCCESSFUL_COMMIT $GIT_PREVIOUS_SUCCESSFUL_COMMIT
echo GIT_URL $GIT_URL
echo GIT_URL_N - $GIT_URL_N
echo GIT_AUTHOR_NAME $GIT_AUTHOR_NAME
echo GIT_COMMITTER_EMAIL $GIT_COMMITTER_EMAIL}}
However i am unable to get at the PUSH webhook payload example from there https://developer.github.com/v3/activity/events/types/#pushevent
Ideally i would like to parse out this specific key and value using shell
{{ "pusher":
}
Update on configuration:
0
Software Versions: github-plugin version 1.29.3
Jenkins ver. 2.163 ngingx reverse proxy
Current State No communication issues, and build triggers from the push event. However no values in $payload
GitHub Configuration:
Github Webhook: on repo https://username:password@publicIP:port/github-webhook/
Content type (tested both application/x-www-form-url-urlencoded & application/json)
Event type: Just the push Event
..
Jenkins Configuration:
GitHub Project: Populated with the project URL
This project is parameterized: String parameter payload
Source Code Management: REPO URL & Creds Branch Master
Build Triggers: GitHub hook trigger for GITScm polling
Build Execute Shell:
echo "the build worked! The payload is $payload"
Output: is blank for the $payload the build worked! The payload is