• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • scriptler-plugin
    • None

      It will be useful if we can execute saved scripts from REST API. Something like this: http://my-jenkins/scriptlet/ScriptName?param1=value1&param2=value2 with returning results in xml/json (any text form).

          [JENKINS-14964] Add ability to call script from REST API

          I've created a Pull-Request at GitHub for this issue: https://github.com/jenkinsci/scriptler-plugin/pull/15

          It allows you to run a script using the URL /scriptler/run/<myScriptId>?param1=value1 (or the POST equivalent).
          The parameters {node, script (alternative script source), and contentType (for the response) are also available.

          Andreas Gudian added a comment - I've created a Pull-Request at GitHub for this issue: https://github.com/jenkinsci/scriptler-plugin/pull/15 It allows you to run a script using the URL /scriptler/run/<myScriptId>?param1=value1 (or the POST equivalent). The parameters { node , script (alternative script source), and contentType (for the response) are also available.

          Code changed in jenkins
          User: Andreas Gudian
          Path:
          src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java
          src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagment/runscript.properties
          http://jenkins-ci.org/commit/scriptler-plugin/b0e9fbffcc80531272e9230cf695ef9e302776ad
          Log:
          JENKINS-14964 Allow running scripts using the REST API

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andreas Gudian Path: src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagment/runscript.properties http://jenkins-ci.org/commit/scriptler-plugin/b0e9fbffcc80531272e9230cf695ef9e302776ad Log: JENKINS-14964 Allow running scripts using the REST API

          Code changed in jenkins
          User: Andreas Gudian
          Path:
          src/test/java/org/jenkinsci/plugins/scriptler/restapi/ScriptlerRestApiTest.java
          http://jenkins-ci.org/commit/scriptler-plugin/cb565fb2500acda536fecc0dc7ce6ee2a96417bc
          Log:
          JENKINS-14964 add test for REST API

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andreas Gudian Path: src/test/java/org/jenkinsci/plugins/scriptler/restapi/ScriptlerRestApiTest.java http://jenkins-ci.org/commit/scriptler-plugin/cb565fb2500acda536fecc0dc7ce6ee2a96417bc Log: JENKINS-14964 add test for REST API

          Code changed in jenkins
          User: Andreas Gudian
          Path:
          src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java
          http://jenkins-ci.org/commit/scriptler-plugin/c6e37122cedcd83b37dd915f3f51e1a33847ea30
          Log:
          JENKINS-14964 fix error text to suggest the correct URL

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andreas Gudian Path: src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java http://jenkins-ci.org/commit/scriptler-plugin/c6e37122cedcd83b37dd915f3f51e1a33847ea30 Log: JENKINS-14964 fix error text to suggest the correct URL

          Code changed in jenkins
          User: imod
          Path:
          src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java
          src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagment/runscript.properties
          src/test/java/org/jenkinsci/plugins/scriptler/restapi/ScriptlerRestApiTest.java
          http://jenkins-ci.org/commit/scriptler-plugin/dbb18c412fcf888eb683e68877e879ad91fa4bdf
          Log:
          Merge branch 'JENKINS-14964' of https://github.com/agudian/scriptler-plugin into agudian-JENKINS-14964

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagment/runscript.properties src/test/java/org/jenkinsci/plugins/scriptler/restapi/ScriptlerRestApiTest.java http://jenkins-ci.org/commit/scriptler-plugin/dbb18c412fcf888eb683e68877e879ad91fa4bdf Log: Merge branch ' JENKINS-14964 ' of https://github.com/agudian/scriptler-plugin into agudian- JENKINS-14964

          integrated into 1.7

          Dominik Bartholdi added a comment - integrated into 1.7

            domi Dominik Bartholdi
            nirro Stanislav Tyurikov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: