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

Job archive directory is added to the front of the properties file path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins version 1.636
      java.version 1.7.0_17
      os.arch x86
      os.name Windows Server 2008 R2
      os.version 6.1
      envinject 1.92.1

      When we try to build another job using a properties file to set the parameters, the directory "C:\Program Files (x86)\Jenkins\jobs\jobName\builds\buildNum\archive\" is added to the front of the specified properties file. This same code was working with Jenkins 1.627, it stopped working after we upgraded to 1.636. Is this potentially related to https://issues.jenkins-ci.org/browse/JENKINS-23084 ? or JENKINS-31434

      Injecting Environment Variables

      PROPSFULLFILENAME=${WORKSPACE}\triggeredjobvars.properties
      

      Execute Windows Batch Command

      @echo.
      @echo Creating jobvars.properties file %propsFullFileName%...
      

      Console output of the windows batch command

      Creating jobvars.properties file C:\Jenkins\workspace\Audit - All Templates - All Acceptance\triggeredjobvars.properties...
      

      After some variables are set in the file, a new job is triggered with the parameters set in the properties file that was created. This is the resulting output:

      ERROR: Build step failed with exception
      java.nio.file.InvalidPathException: Illegal char <:> at index 95: C:\Program Files (x86)\Jenkins\jobs\Audit - All Templates - All Acceptance\builds\471\archive\C:\Jenkins\workspace\Audit - All Templates - All Acceptance\triggeredjobvars.properties
      	at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
      	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
      	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
      	at sun.nio.fs.WindowsPath.parse(Unknown Source)
      	at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
      	at java.io.File.toPath(Unknown Source)
      	at jenkins.util.VirtualFile$FileVF.isIllegalSymlink(VirtualFile.java:301)
      	at jenkins.util.VirtualFile$FileVF.isFile(VirtualFile.java:241)
      	at hudson.plugins.parameterizedtrigger.FileBuildParameters.extractAllValues(FileBuildParameters.java:120)
      	at hudson.plugins.parameterizedtrigger.FileBuildParameters.getAction(FileBuildParameters.java:108)
      	at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getBaseActions(BuildTriggerConfig.java:292)
      	at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform3(BuildTriggerConfig.java:378)
      	at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform3(BlockableBuildTriggerConfig.java:66)
      	at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:88)
      	at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71)
      	at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
      	at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
      	at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
      	at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:133)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      	at hudson.model.Build$BuildExecution.build(Build.java:205)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
      	at hudson.model.Run.execute(Run.java:1741)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      

      "C:\Program Files (x86)\Jenkins\jobs\Audit - All Templates - All Acceptance\builds\471\archive\" is coming seemingly out of nowhere

            oleg_nenashev Oleg Nenashev
            cwcam Cam Spencer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: