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

No such property: LastExitCode for class: groovy.lang.Binding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • pipeline

    Description

      I'm doing Unreal Engine Game development and want to use Jenkins to automate the process of building, compiling and packaging the game.

      However, I'm trying to use powershell to run an executable file AutomationTool.exe and it does successfully exited with code 0 however pipeline will always failed with same error. 

      No such property: LastExitCode for class: groovy.lang.Binding

      Here's the code:

      stage('BuildCookRun Server [BUILD]') {
        when {
            expression { params.BUILD_SERVER == true }
        }
        steps {
            script {
                powershell(
                    label: "Running UnrealAutomationTool.exe BuildCookRun [Build]",
                    returnStdout: false,
                    script: """\$Options = @(
                        \'BuildCookRun\'
                        \'-build\'
                    )
                    & (\"${ENGINE_PATH}//Engine//Binaries//DotNet//AutomationTool.exe\") @Options
                    echo \"LASTEXITCODE is \$LASTEXITCODE\"
                    """
                )
            }
        }
      }

       

      Attachments

        Activity

          People

            ariffazman Ariff Azman
            ariffazman Ariff Azman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: