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

Powershell script execution broken in powershellHelper.ps1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • durable-task-plugin
    • None
    • Win2008R2 master, Win2016 agent. Jenkins 2.117 and earlier.

      Powershell script execution is broken, possibly after upgrading to durable task plugin 1.22.

      11:15:08 out-lineoutput : Object reference not set to an instance of an object.
      11:15:08 At C:\Builds\home\workspace\INTG_Lab_Installation_Script_Test\workspace@tmp\durable-19f0c27a\powershellHelper.ps1:25 char:7
      11:15:08 +       $Input | Out-String -Stream -Width 192 | ForEach-Object { $Writer.WriteLin ...
      11:15:08 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      11:15:08     + CategoryInfo          : NotSpecified: (:) [out-lineoutput], NullReferenc    eException
      11:15:08     + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShe    ll.Commands.OutLineOutputCommand
      11:15:08  

      Reverting to 1.17 broke everything

      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] End of Pipeline
      java.lang.NoSuchMethodError: No such DSL method 'node' found among steps [addBadge, addErrorBadge, addHtmlBadge, addInfoBadge, addShortText, addWarningBadge, ansiColor, archive, build, catchError, checkout, createSummary, deleteDir, dir, echo, error, fileExists, getContext, git, input, isUnix, jiraComment, jiraIssueSelector, jiraSearch, junit, library, libraryResource, load, mail, milestone, p4, p4approve, p4publish, p4sync, p4tag, p4unshelve, parallel, properties, publishHTML, pwd, readFile, readTrusted, removeBadges, removeHtmlBadges, removeSummaries, resolveScm, retry, sleep, stage, stash, step, svn, timeout, timestamps, tm, tool, unarchive, unstash, waitUntil, withContext, withCredentials, withEnv, wrap, writeFile] or symbols [absolute, agent, all, always, ant, antFromApache, antOutcome, antTarget, apiToken, approve, architecture, archiveArtifacts, artifactManager, authorizationMatrix, autoClean, batchFile, bitbucket, booleanParam, buildButton, buildDiscarder, bzt, caseInsensitive, caseSensitive, certificate, checkstyle, choice, choiceParam, ciGame, cleanup, clientSpec, clock, cloud, command, credentials, cron, crumb, defaultView, demand, depotSource, disableConcurrentBuilds, disableResume, dockerCert, downloadSettings, downstream, dumb, durabilityHint, envVars, file, fileCopyOperation, fileCreateOperation, fileDeleteOperation, fileDownloadOperation, fileJoinOperation, fileOperations, fileParam, filePath, filePropertiesToJsonOperation, fileRenameOperation, fileTransformOperation, fileUnTarOperation, fileUnZipOperation, fileZipOperation, fingerprint, fishEye, flushOnly, folderCopyOperation, folderCreateOperation, folderDeleteOperation, folderRenameOperation, forceClean, frameOptions, freeStyle, freeStyleJob, fromScm, fromSource, git, github, githubPush, globalLib, gradle, graphClean, graphSource, headRegexFilter, headWildcardFilter, hyperlink, hyperlinkToModels, incremental, inheriting, inheritingGlobal, installSource, jdk, jdkInstaller, jgit, jgitapache, jnlp, jobName, label, lastDuration, lastFailure, lastGrantedAuthorities, lastStable, lastSuccess, legacy, legacySCM, list, local, location, logRotator, loggedInUsersCanDoAnything, manualSpec, masterBuild, matrix, maven, maven3Mojos, mavenErrors, mavenMojos, mavenWarnings, modernSCM, multiBranch, multiGraph, multiStreams, multiSwarm, myView, nodeProperties, nonInheriting, nonStoredPasswordParam, none, note, openGrok, overrideIndexTriggers, p4Trigger, p4Web, p4cleanup, p4groovy, p4sync, paneStatus, parallel, parameters, password, pathFilter, pattern, perfReport, perforce, performanceReport, performanceTest, pipelineTriggers, plainText, plugin, pollSCM, previewOnly, previous, projectNamingStrategy, proxy, publish, queueItemAuthenticator, quietPeriod, relative, remotingCLI, run, runParam, schedule, scmRetryCount, scriptApprovalLink, search, security, shell, shelve, slave, sourceRegexFilter, sourceWildcardFilter, specFileSpec, sshUserPrivateKey, stackTrace, standard, staticSpec, status, streamSource, streamSpec, string, stringParam, submit, swapSpace, swarm, syncOnly, templateSource, templateSpec, testCase, text, textParam, ticket, ticketMode, tmpSpace, toolLocation, trust, unsecured, unshelve, upstream, user, userFilter, usernameColonPassword, usernamePassword, viewFilter, viewPattern, viewsTabBar, warnings, weather, withAnt, zfs, zip] or globals [currentBuild, env, manager, params, scm]
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:20)
      	at WorkflowScript.run(WorkflowScript:1)
      	at ___cps.transform___(Native Method)
      	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      	at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:46)
      	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      Finished: FAILURE
      

      Nothing else was changed. Restoring 1.22 re-introduced the original error.

            gabloe Gabriel Loewen
            ghs1 g hs1
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: