This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      I have a pipeline with a very simple set of instructions, as follows:

      dir('front-end') {
         sh 'npm install'
         sh 'ionic android build'
      }

      But if I run it like the code above, it fails mid-compilation. I have already also tried like this:

      sh 'cd front-end/'
      sh 'npm install'
      sh 'ionic android build'

      Also fails (different error though).

       

      The only way I got it working was to put it all together using triple-quotes, like this:

      sh '''\
      cd front-end/
      npm install
      ionic android build
      '''

       

      Why is that?

            Assignee:
            Unassigned
            Reporter:
            Christian Dechery
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: