-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: parameterized-remote-trigger-plugin
-
None
-
Environment:Jenkins 2.528.3
Plugin 3.2.2
I seems the plugin only works with Jenkins credentials, not actual token
The following does not work:
node ("a_node") { Â Â stage("Test") { Â Â Â Â withVault(vaultSecrets: [ Â Â Â Â Â Â [ Â Â Â Â Â Â Â Â path: "mysecret.usertoken", secretValues: [ Â Â Â Â Â Â Â Â Â Â [vaultKey: "username", envVar: "USERNAME"], Â Â Â Â Â Â Â Â Â Â [vaultKey: "token", envVar: "TOKEN"], Â Â Â Â Â Â Â Â ] Â Â Â Â Â Â ] Â Â Â Â ]) { Â Â Â Â Â Â def remoteRes = triggerRemoteJob( Â Â Â Â Â Â Â Â job: "https://my-jenkins.ahost.internal/job/test/", Â Â Â Â Â Â Â Â auth: TokenAuth(apiToken: env.TOKEN, userName: env.USERNAME), Â Â Â Â Â Â Â Â blockBuildUntilComplete: true) Â Â Â Â Â Â echo "remoteRes: $remoteRes" Â Â Â Â } Â Â } }
We have a large number of Jenkins instances, all configured with code.
It is not feasible for us to add specialized secrets as jenkins credentials, they are handled in Hashicorp Vault by users of the individual Jenkins instances. These users are not admins.
Please add support to pass the actual token instead of a credential id.