Я проверяю код через плагин TFS в конвейере Jenkins. Но это дает ошибку SPORADI C. Он прекрасно работает, когда я перестраиваю задание.
Ошибка:
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.text.DigitList.getLong(Unknown Source)
at java.text.DecimalFormat.parse(Unknown Source)
at java.text.SimpleDateFormat.subParse(Unknown Source)
at java.text.SimpleDateFormat.parse(Unknown Source)
at java.text.DateFormat.parse(Unknown Source)
at com.microsoft.tfs.util.datetime.LenientDateTimeParser.parseExtended(LenientDateTimeParser.java:285)
at com.microsoft.tfs.util.datetime.LenientDateTimeParser.parse(LenientDateTimeParser.java:365)
at com.microsoft.tfs.core.clients.versioncontrol.specs.version.DateVersionSpec.<init>(DateVersionSpec.java:51)
at com.microsoft.tfs.core.clients.versioncontrol.specs.version.VersionSpec.parseSingleVersionFromSpec(VersionSpec.java:197)
at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:60)
at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:34)
at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
at hudson.plugins.tfs.model.Server.execute(Server.java:233)
Caused: java.lang.RuntimeException
at hudson.plugins.tfs.model.Server.execute(Server.java:237)
at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:280)
at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:276)
at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:292)
at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:394)
at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:343)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
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
Используемый фрагмент:
withCredentials([usernamePassword(
credentialsId: 'amer-o9-ServiceAdmin',
passwordVariable: 'pass',
usernameVariable: 'user'
)]) {
def secret = hudson.util.Secret.fromString(pass)
checkout(
changelog: false,
scm: [
$class: 'TeamFoundationServerScm',
localPath: '\\',
userName: user,
password: secret,
projectPath: '$/my_workspace/my_project',
serverUrl: properURL,
useUpdate: true,
workspaceName: "HUDSON-${env.JOB_NAME}-${env.NODE_NAME}"
]
)
}
PS Нет проблем с путем к рабочей области.
- Версия Jenkins: 2.204.2
- Версия плагина TFS: 5.157.1
Поиск решений здесь:
Кто-нибудь знает, что мне не хватает?