Hi,

there are two problems left writing job configurations
programmatically via groovy for me. The first is to configure the
EnvInjectBuildWrapper plugin. I need the following, but I cannot find
the appropriate constructor, even by browsing the plugin sources. I
want to achieve the following:

  <buildWrappers>
    <EnvInjectBuildWrapper>
      <info>
        
<propertiesContent>CCRoot=${WORKSPACE}/JobNightlyDebug</propertiesContent>
        <loadFilesFromMaster>false</loadFilesFromMaster>
      </info>
    </EnvInjectBuildWrapper>
  </buildWrappers>

I added something where the sub-types are somehow generated by magic,
but this is only half of the stuff:

  job.getBuildWrappersList().add(new
org.jenkinsci.plugins.envinject.EnvInjectInfo("","CCRoot=\${WORKSPACE}/JobNightlyDebug"))

    <org.jenkinsci.plugins.envinject.EnvInjectInfo>
      <propertiesContent>CCRoot=${WORKSPACE}/JobNightlyDebug</propertiesContent>
    </org.jenkinsci.plugins.envinject.EnvInjectInfo>

The same applies to the xunit plugin, I cannot find a constructor to xunit.

  <publishers>
     <xunit>
      <types>
        <MSTestJunitHudsonTestType>
          <pattern>TestResults\${JOB_NAME}.trx</pattern>
          <faildedIfNotNew>true</faildedIfNotNew>
          <deleteOutputFiles>true</deleteOutputFiles>
          <stopProcessingIfError>false</stopProcessingIfError>
        </MSTestJunitHudsonTestType>
      </types>
      <thresholds>
        <org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
          <unstableThreshold></unstableThreshold>
          <unstableNewThreshold></unstableNewThreshold>
          <failureThreshold></failureThreshold>
          <failureNewThreshold></failureNewThreshold>
        </org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
        <org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
          <unstableThreshold></unstableThreshold>
          <unstableNewThreshold></unstableNewThreshold>
          <failureThreshold></failureThreshold>
          <failureNewThreshold></failureNewThreshold>
        </org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
      </thresholds>
    </xunit>
  </publishers>

Any help very appreciated.:-)

Thanks
Dirk
-- 
Never trust a short-haired guru

Reply via email to