• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • scriptler-plugin
    • None
    • Scriptler v2.9 Jenkins v1.596.2

      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

      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

          [JENKINS-37485] Propagate Job params to script does nothing

          Ioannis Moutsatsos created issue -
          Ioannis Moutsatsos made changes -
          Description Original: 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}
          def env = System.getenv() //also get the environment
          //then print to confirm
          env.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
          New: 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:java}
          def env = System.getenv() //also get the environment
          //then print to confirm
          env.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
          Ioannis Moutsatsos made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Dominik Bartholdi made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            domi Dominik Bartholdi
            ioannis Ioannis Moutsatsos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: