[JIRA] (JENKINS-37485) Propagate Job params to script does nothing
Title: Message Title Ioannis Moutsatsos commented on JENKINS-37485 Re: Propagate Job params to script does nothing Dominik Bartholdi Thanks for the guidance. Unfortunately I'm still getting errors trying to access environment variables from the scriptlet using this approach. For example: Execution of script [export_metadata_query.groovy] failed - groovy.lang.MissingPropertyException: No such property: env for class: Script1org.jenkinsci.plugins.scriptler.util.GroovyScript$ScriptlerExecutionException: groovy.lang.MissingPropertyException: No such property: env for class: Script1 at org.jenkinsci.plugins.scriptler.util.GroovyScript.call(GroovyScript.java:131) at hudson.remoting.LocalChannel.call(LocalChannel.java:45) Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-37485) Propagate Job params to script does nothing
Title: Message Title Dominik Bartholdi commented on JENKINS-37485 Re: Propagate Job params to script does nothing Ioannis Moutsatsos sorry, this should work: println ${env.BUILD_URL} Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-37485) Propagate Job params to script does nothing
Title: Message Title Ioannis Moutsatsos commented on JENKINS-37485 Re: Propagate Job params to script does nothing Dominik Bartholdi I have tried the suggestion you provided and instead I get an error: groovy.lang.MissingPropertyException: No such property: BUILD_URL for class Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-37485) Propagate Job params to script does nothing
Title: Message Title Ioannis Moutsatsos updated an issue Jenkins / JENKINS-37485 Propagate Job params to script does nothing Change By: Ioannis Moutsatsos I have a script executed through the scriptler plugin and I would like to use in the script job environment variables such as BUILD_URL. At the beginnig of the script I read the environment variables with {code: groovy java }def env = System.getenv() //also get the environment//then print to confirmenv.each{ println "${it.key} :${it.value}" }{code}Independent of whether I check the 'Propagate Job params to script' checkbox the parameters are the same and only related to the OS. I do not see any of the JOB related environement variables. See example screen shot attached Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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
[JIRA] (JENKINS-37485) Propagate Job params to script does nothing
Title: Message Title Ioannis Moutsatsos updated an issue Jenkins / JENKINS-37485 Propagate Job params to script does nothing Change By: Ioannis Moutsatsos Priority: Minor Major Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-37485) Propagate Job params to script does nothing
Title: Message Title Ioannis Moutsatsos created an issue Jenkins / JENKINS-37485 Propagate Job params to script does nothing Issue Type: Bug Assignee: Dominik Bartholdi Attachments: Untitled_Clipping_081716_051936_PM.jpg Components: scriptler-plugin Created: 2016/Aug/17 9:19 PM Environment: Scriptler v2.9 Jenkins v1.596.2 Priority: Minor Reporter: Ioannis Moutsatsos I have a script executed through the scriptler plugin and I would like to use in the script job environment variables such as BUILD_URL. At the beginnig of the script I read the environment variables with Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, _javascript_, none, sql, xhtml, xml def env = System.getenv() //also get the environment //then print to confirm env.each{ println "${it.key} :${it.value}" } Independent of whether I check the 'Propagate Job params to script' checkbox the parameters are the same and only related to the OS. I do not see any of the JOB related environement variables. See example screen shot attached