Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19373

Script executed through token macro expansion does not honour restriction to run on master

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • scriptler-plugin
    • None

      When running a script via token macro expansion, the script is executed on the current executor/node even when it should be restricted to run only on the master.

          [JENKINS-19373] Script executed through token macro expansion does not honour restriction to run on master

          I'm not sure what to do in this case, maybe:

          • the execution should be skipped in case it is not running on the master?
          • break the build?
          • don't allow to use these scripts in the macro?

          Dominik Bartholdi added a comment - I'm not sure what to do in this case, maybe: the execution should be skipped in case it is not running on the master? break the build? don't allow to use these scripts in the macro?

          I would expect the same behaviour as when executing the script in a build-step - that the script is executed on the master.

          Looking at the code, I would be able to fix it by copying the logic from ScriptlerBuilder - but a refactoring for reuse might be in order.

          Thomas Vestergaard Trolle added a comment - I would expect the same behaviour as when executing the script in a build-step - that the script is executed on the master. Looking at the code, I would be able to fix it by copying the logic from ScriptlerBuilder - but a refactoring for reuse might be in order.

            domi Dominik Bartholdi
            tveon Thomas Vestergaard Trolle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: