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

commands in If in windowa bat is not running in Jenkinsfile

XMLWordPrintable

       I have if statement in Jenkins pipeline run on Windows node. the commands inside the IF statement is not running
       {{ node('win') {}}
      {{      bat label: '', script: ''' }}
      {{      set status=RUNNING }}
                   {{if %status% == RUNNING ( }}
                   {{set test=5 }}
                   {{echo test is %test% }}
                  {{)
      ''' }}
        }
      The output of the echo is
       test is
      I want a way to set variables inside IF statement

            Unassigned Unassigned
            eakad Eman Akad
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: