-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Webhook secret to String Credential and fix issue with persis…
…tent for JCasC (#267) * Webhook secret is deleted by JCasC on every restart #162 Use Jenkins credentials for webhook secret. * Fix SpotBugs issues * Add migration methods and rename variable * Add readResolve and migrateWebhookSecretCredentials methods to be able to migrate old secret tokens to Jenkins credentials. * Rename secretTokenCredentialsId to webhookSecretCredentialsId * Fix checkstyle error * Rename help file * Fix indentation
- Loading branch information
Showing
4 changed files
with
148 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
...esources/io/jenkins/plugins/gitlabserverconfig/servers/GitLabServer/help-secretToken.html
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...kins/plugins/gitlabserverconfig/servers/GitLabServer/help-webhookSecretCredentialsId.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div> | ||
The secret token is required to authenticate the webhook payloads received from a GitLab Server. Use generate secret token from Advanced options or use your own. If you are an old plugin user and did not set a secret token previously and want the secret token to be applied to the hooks of your existing jobs, you can add the secret token and rescan your jobs. Existing hooks with new secret token will be applied. | ||
</div> |
@fredg02
Hi,
for existing users that are configuring webhooks using secretToken="" the new change breaks the setup. This happens because
The likely workaround is to setup a credential with empty token and refer that id in the webhookSecretCredentialsId but it is preferable that the default behavior uses empty value for secretToken in which case user doesn't need to configure a credentials for empty token. What do you think. Let me know if I should create a new bug request.