[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Liam Newman closed an issue as Fixed Bulk closing resolved issues. Jenkins / JENKINS-54047 All boolean parameters get set to true when used to set env vars. Change By: Liam Newman Status: Resolved Closed Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.194662.1539343181000.16060.1571801047562%40Atlassian.JIRA.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Andrew Bayer commented on JENKINS-54047 Re: All boolean parameters get set to true when used to set env vars. Jarrad Whitaker Yeah, it's a bit annoying - complicated DSLs like this are hairier than I'd like them to be, but we actually see a lot fewer bugs like this show up than I would have expected. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Andrew Bayer updated JENKINS-54047 This'll be in the upcoming 1.3.3 release. Jenkins / JENKINS-54047 All boolean parameters get set to true when used to set env vars. Change By: Andrew Bayer Status: In Review Resolved Resolution: Fixed Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Jarrad Whitaker commented on JENKINS-54047 Re: All boolean parameters get set to true when used to set env vars. Thanks for quickly looking at this. From an unfamiliar dev's point of view, it's a bit eyebrow raising that this sort of error-prone transformation is necessary.. isn't the point of using a DSL based on groovy that you can rely on groovy for basic stuff like this? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Andrew Bayer commented on JENKINS-54047 Re: All boolean parameters get set to true when used to set env vars. PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/290 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Andrew Bayer assigned an issue to Andrew Bayer Jenkins / JENKINS-54047 All boolean parameters get set to true when used to set env vars. Change By: Andrew Bayer Assignee: Andrew Bayer Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Andrew Bayer updated JENKINS-54047 Jenkins / JENKINS-54047 All boolean parameters get set to true when used to set env vars. Change By: Andrew Bayer Status: In Progress Review Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Andrew Bayer started work on JENKINS-54047 Change By: Andrew Bayer Status: Open In Progress Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Andrew Bayer commented on JENKINS-54047 Re: All boolean parameters get set to true when used to set env vars. The JENKINS-47881 thing is a red herring - the actual problem here is that NotExpression isn't being handled properly in the environment value resolution - it's a descendant of BooleanExpression, but I wasn't distinguishing them, so !foo would end up being just foo. D'oh. PR incoming. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Devin Nusbaum updated an issue Jenkins / JENKINS-54047 All boolean parameters get set to true when used to set env vars. Change By: Devin Nusbaum Component/s: pipeline-model-definition-plugin Component/s: pipeline Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Devin Nusbaum edited a comment on JENKINS-54047 Re: All boolean parameters get set to true when used to set env vars. I'm not quite sure what's going on here, but I was able to reproduce it. Looks like someone in JENKINS-47881 also mentioned a similar issues using the ternary operator for an environment variable. CC @ [~ abayer ] , are we all missing something obvious here?{code:java}pipeline {agent anyparameters { booleanParam defaultValue: true, description: '', name: 'p1'}environment {NOT_P1 = "${(!params.p1) ? 'true' : 'false'}"}stages {stage('JENKINS-54047') {steps {// If p1 == true, then this prints "expecting false, got true"// If p1 == false, then this prints "expecting true, got false"echo "expecting ${!p1}, got ${NOT_P1}"}}}} {code} Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Devin Nusbaum updated an issue Jenkins / JENKINS-54047 All boolean parameters get set to true when used to set env vars. Change By: Devin Nusbaum Labels: pipeline Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Devin Nusbaum commented on JENKINS-54047 Re: All boolean parameters get set to true when used to set env vars. I'm not quite sure what's going on here, but I was able to reproduce it. Looks like someone in JENKINS-47881 also mentioned a similar issues using the ternary operator for an environment variable. CC @abayer, are we all missing something obvious here? pipeline { agent any parameters { booleanParam defaultValue: true, description: '', name: 'p1' } environment { NOT_P1 = "${(!params.p1) ? 'true' : 'false'}" } stages { stage('JENKINS-54047') { steps { // If p1 == true, then this prints "expecting false, got true" // If p1 == false, then this prints "expecting true, got false" echo "expecting ${!p1}, got ${NOT_P1}" } } } } Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54047) All boolean parameters get set to true when used to set env vars.
Title: Message Title Jarrad Whitaker created an issue Jenkins / JENKINS-54047 All boolean parameters get set to true when used to set env vars. Issue Type: Bug Assignee: Unassigned Components: pipeline Created: 2018-10-12 11:19 Environment: Jenkins LTS Priority: Minor Reporter: Jarrad Whitaker Using boolean parameters to set environment variables doesn't work for some crazy reason. pipeline { agent none options { ansiColor('xterm') skipDefaultCheckout() durabilityHint('PERFORMANCE_OPTIMIZED') } parameters { booleanParam( name: 'lazyBuild', defaultValue: true, description: 'Skip build' ) } stages { stage('WTF') { agent { label 'master' } environment { IS_LAZY = "${(params.lazyBuild) ? 't' : 'f'}" IS_NOT_LAZY = "${(!params.lazyBuild) ? 't' : 'f'}" } steps { sh 'echo IS_LAZY: $IS_LAZY' sh 'echo IS_NOT_LAZY: $IS_NOT_LAZY' } } } } Output: [00-build] Running shell script + echo IS_LAZY: t IS_LAZY: t [Pipeline] sh [00-build] Running shell script + echo IS_NOT_LAZY: t IS_NOT_LAZY: t