-
New Feature
-
Resolution: Done
-
Minor
-
None
When using the build user vars plugin in a pipeline the current required usage is:
node { wrap([$class: 'BuildUser']) { // Do something with env.BUILD_USER* vars } }
The 'node' is required here, because of how 'wrap' works. Because of this it is currently not possible to get the build user information outside the context of a node.
Creating a custom Workflow step would solve this. Example:
def buildUser = buildUserVars() // Do something with any of its properties: // - name // - firstName // - lastName // - userId // - email
Or to keep it closer to how it currently works:
buildUserVars {
// Do something with env.BUILD_USER* vars
}
See https://issues.jenkins-ci.org/browse/JENKINS-30142 for a similar issue, which has been solved, for a different plugin.
- relates to
-
JENKINS-30142 timestamped logs not available in all workflow logs.
-
- Resolved
-
-
JENKINS-44771 Mask Passwords should not require node
-
- Open
-
[JENKINS-44741] Build User Vars should not require node
Description |
Original:
When using the build user vars plugin in a pipeline the current required usage is: {code:java} node { wrap([$class: 'BuildUser']) { // Do something with env.BUILD_USER* vars } } {code} The 'node' is required here, because of how 'wrap' works. See https://issues.jenkins-ci.org/browse/JENKINS-30142. Because of this it is currently not possible to get the build user information outside the context of a node. Creating a custom Workflow step would solve this. Example: {code:java} def buildUser = buildUserVars() // Do something with buildUser.BUILD_USER* vars {code} |
New:
When using the build user vars plugin in a pipeline the current required usage is: {code:java} node { wrap([$class: 'BuildUser']) { // Do something with env.BUILD_USER* vars } } {code} The 'node' is required here, because of how 'wrap' works. See https://issues.jenkins-ci.org/browse/JENKINS-30142. Because of this it is currently not possible to get the build user information outside the context of a node. Creating a custom Workflow step would solve this. Example: {code:java} def buildUser = buildUserVars() // Do something with any of its properties: // - name // - firstName // - lastName // - userId {code} Or to keep it closer to how it currently works: {code:java} buildUserVars { // Do something with env.BUILD_USER* vars } {code} |
Description |
Original:
When using the build user vars plugin in a pipeline the current required usage is: {code:java} node { wrap([$class: 'BuildUser']) { // Do something with env.BUILD_USER* vars } } {code} The 'node' is required here, because of how 'wrap' works. See https://issues.jenkins-ci.org/browse/JENKINS-30142. Because of this it is currently not possible to get the build user information outside the context of a node. Creating a custom Workflow step would solve this. Example: {code:java} def buildUser = buildUserVars() // Do something with any of its properties: // - name // - firstName // - lastName // - userId {code} Or to keep it closer to how it currently works: {code:java} buildUserVars { // Do something with env.BUILD_USER* vars } {code} |
New:
When using the build user vars plugin in a pipeline the current required usage is: {code:java} node { wrap([$class: 'BuildUser']) { // Do something with env.BUILD_USER* vars } } {code} The 'node' is required here, because of how 'wrap' works. See https://issues.jenkins-ci.org/browse/JENKINS-30142. Because of this it is currently not possible to get the build user information outside the context of a node. Creating a custom Workflow step would solve this. Example: {code:java} def buildUser = buildUserVars() // Do something with any of its properties: // - name // - firstName // - lastName // - userId {code} Or to keep it closer to how it currently works: {code:java} buildUserVars { // Do something with env.BUILD_USER* vars } {code} |
Link |
New:
This issue relates to |
Description |
Original:
When using the build user vars plugin in a pipeline the current required usage is: {code:java} node { wrap([$class: 'BuildUser']) { // Do something with env.BUILD_USER* vars } } {code} The 'node' is required here, because of how 'wrap' works. See https://issues.jenkins-ci.org/browse/JENKINS-30142. Because of this it is currently not possible to get the build user information outside the context of a node. Creating a custom Workflow step would solve this. Example: {code:java} def buildUser = buildUserVars() // Do something with any of its properties: // - name // - firstName // - lastName // - userId {code} Or to keep it closer to how it currently works: {code:java} buildUserVars { // Do something with env.BUILD_USER* vars } {code} |
New:
When using the build user vars plugin in a pipeline the current required usage is: {code:java} node { wrap([$class: 'BuildUser']) { // Do something with env.BUILD_USER* vars } } {code} The 'node' is required here, because of how 'wrap' works. Because of this it is currently not possible to get the build user information outside the context of a node. Creating a custom Workflow step would solve this. Example: {code:java} def buildUser = buildUserVars() // Do something with any of its properties: // - name // - firstName // - lastName // - userId {code} Or to keep it closer to how it currently works: {code:java} buildUserVars { // Do something with env.BUILD_USER* vars } {code} See https://issues.jenkins-ci.org/browse/JENKINS-30142 for a similar issue, which has been solved, for a different plugin. |
Link | New: This issue relates to JENKINS-44771 [ JENKINS-44771 ] |
Assignee | New: Fábio Silva [ zedasvacas ] | |
Resolution | New: Done [ 10000 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |