I'm using Bitbucket server and Jenkins.
I've defined a pipeline job that will be spawned from bitbucket when commits are pushed to a branch, either from the main webhook or a pull request notification.
The pipeline job has to use the stash notifier plugin to notify bitbucket/stash of the results of the build.
Looking at the examples of using "StashNotifier", I'm wondering whether I have more options for providing the "credentialsId" value. I'm guessing I could generate this value in the snippet generator and then paste it into my pipeline job, or I could define a job parameter and paste that value in as the default value.
I don't really like either option. I'd really like to be able to configure a credentials object in the job configuration, where I only specified a principal and password, and then simply generate the credentialsId in the pipeline job. Alternatively, I could specify separate principal and password job parameters, but still generate the credentialsId within the pipeline code. Are either of these possible/practical?