Skip to content

Conversation

willemvd
Copy link
Contributor

Setting the secret on the job is not working when using different jobs with different secrets (only the last one is stored). It the webhook cannot find the secret in Jenkins when not first triggered a new store of the secret in one of the jobs.

So, now the webhooks uses the Gogs secret defined on the job, so it can be different for each job instead of all the same (and Jenkins can find one without first manually load and save the configuration of one job)

…ch job instead of all the same (now Jenkins can even find one without first manually load and save the configuration of one job
@sanderv32
Copy link
Contributor

Hi, will try the changes tonight and if everything is works fine i will merge this PR into master.

@willemvd
Copy link
Contributor Author

Thanks, that would be great! Really want a more secure, job based, secret usages when using this in production instead of a single secret for all jobs

@willemvd
Copy link
Contributor Author

willemvd commented Dec 6, 2016

@sanderv32 do you have time to fix this? Otherwise I need to start setting stuff up to manually supply this to Jenkins

@sanderv32
Copy link
Contributor

Hi, i have to do this tonight but it can take a while before it shows up in the official repo (+/- 8 hours). So if you are in a real hurry you have to do it manually for the time being.

@willemvd
Copy link
Contributor Author

willemvd commented Dec 6, 2016

Ok I will wait for that (hopefully the 8 hours is my sleeping time ;))

@sanderv32
Copy link
Contributor

Tested #3 and worked in the test environment. 👍

@sanderv32 sanderv32 closed this Dec 6, 2016
@sanderv32
Copy link
Contributor

#3 is merged although the jenkins plugin wiki doesn't show the new version yet it's there under the archive link.

@willemvd
Copy link
Contributor Author

willemvd commented Dec 7, 2016

Found the plugin in the Update section in Jenkins
Only problem is that it is now suddenly returning {"result":"ERROR","message":"Job 'sas-ci' is not defined in Jenkins"} for an existing job.
Will investigate if this is a failure on my side or what goes wrong

@sanderv32
Copy link
Contributor

@silox @willemvd I have debugged the plugin against my configuration and i didn't get any errors. Can you both please provide more information in #4 ?

hongta pushed a commit to hongta/gogs-webhook-plugin that referenced this pull request Jan 2, 2017
@unknwon
Copy link

unknwon commented Mar 2, 2017

Hi... on develop branch of Gogs, after 0.10.1 release. Gogs starts using secret for SHA256 HMAC of payload, will that affect this functionality in this plugin?

@sanderv32
Copy link
Contributor

See issue #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants