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

run a script defined in package.json scripts

    Details

    • Similar Issues:

      Description

      I tried to to run the release script but I couldn't get it working.
      require('npm-run-script')('release').once('exit',(code)=>console.log('exit in',code))

      Error: Cannot find module 'npm-run-script'

        Attachments

          Activity

          Hide
          nfalco Nikolas Falco added a comment -

          The NodeJS script step runs (platform indipendent) the follow shell command nodejs tmp-script.js where the content of tmp-script.js is that one defined in the job step and base dir WORKSPACE.

          That I know you have to load the javascript file before with

          require('./myscript.js');
          Show
          nfalco Nikolas Falco added a comment - The NodeJS script step runs (platform indipendent) the follow shell command nodejs tmp-script.js where the content of tmp-script.js is that one defined in the job step and base dir WORKSPACE. That I know you have to load the javascript file before with require( './myscript.js' );
          Hide
          nfalco Nikolas Falco added a comment -

          Please reopen the issue with reproducible steps to understand exactly what want you do.

          Show
          nfalco Nikolas Falco added a comment - Please reopen the issue with reproducible steps to understand exactly what want you do.

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              warrenc5 wozza xing
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: