jenkinsci / jenkins-multijob-plugin

A new multijob plugin was created by Tikal ALM team. Using this job you can add full hierarchy of Jenkins jobs that will be executed in sequence or in parallel.
https://plugins.jenkins.io/jenkins-multijob-plugin/
MIT License
71 stars 134 forks source link

Result env variables are empty #166

Closed misery closed 7 months ago

misery commented 5 years ago

Since some time ago the env variables of a job is not defined anymore.

We have a multijob that starts some downstream jobs in parallel and waits until they are finished. After that the multijob posts the results and the build number to a Review Board. But the variables are empty.

JOB1_BUILD_RESULT
JOB1_BUILD_NUMBER
...
JOB2_BUILD_RESULT
JOB2_BUILD_NUMBER

Only BUILD_NAME is defined.

misery commented 4 years ago

Since we added another phase "Sub-Packages" all BUILD_RESULTs and BUILD_NUMBERs of the phase "General" and "Packages" are empty now. What is the problem here?

job

env

misery commented 4 years ago

Config.xml

  <concurrentBuild>true</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>mkdir build; mkdir tmp</command>
      <configuredLocalRules/>
    </hudson.tasks.Shell>
    <hudson.plugins.descriptionsetter.DescriptionSetterBuilder plugin="description-setter@1.10">
      <regexp/>
      <description>${review.url}</description>
    </hudson.plugins.descriptionsetter.DescriptionSetterBuilder>
    <hudson.tasks.Shell>
      <command>cd source; hg import --no-commit ../patch.diff</command>
      <configuredLocalRules/>
    </hudson.tasks.Shell>
    <com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
      <phaseName>General</phaseName>
      <phaseJobs>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Formatting</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Source</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Docs</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
      </phaseJobs>
      <continuationCondition>UNSTABLE</continuationCondition>
      <executionType>PARALLEL</executionType>
      <quietPeriodGroovy>index &lt; 5 ? 0 : 2 * 60</quietPeriodGroovy>
    </com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
    <com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
      <phaseName>Packages</phaseName>
      <phaseJobs>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Android_AAR</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Android_APK_armeabi-v7a</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Android_APK_arm64-v8a</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Win32_GNU_MSI</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Win32_MSVC_MSI</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_MacOS_DMG</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_iOS_IPA</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_iOS_Framework</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_iOS_Simulator_Framework</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
      </phaseJobs>
      <continuationCondition>UNSTABLE</continuationCondition>
      <executionType>PARALLEL</executionType>
      <quietPeriodGroovy>index &lt; 5 ? 0 : 2 * 60</quietPeriodGroovy>
    </com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
    <com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
      <phaseName>Sub-Packages</phaseName>
      <phaseJobs>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_iOS_SwiftPackage</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs>
            <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters plugin="parameterized-trigger@2.39">
              <properties>iOS_Framework_Build=${DEFAULT_REVIEW_IOS_FRAMEWORK_BUILD_NUMBER}
iOS_Simulator_Framework_Build=${DEFAULT_REVIEW_IOS_SIMULATOR_FRAMEWORK_BUILD_NUMBER}</properties>
              <textParamValueOnNewLine>false</textParamValueOnNewLine>
            </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
          </configs>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
      </phaseJobs>
      <continuationCondition>UNSTABLE</continuationCondition>
      <executionType>PARALLEL</executionType>
      <quietPeriodGroovy>index &lt; 5 ? 0 : 2 * 60</quietPeriodGroovy>
    </com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
    <com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
      <phaseName>Unit Tests</phaseName>
      <phaseJobs>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Linux</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Linux_Integrated</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_Win32_GNU</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_MacOS</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_MacOS_Integrated</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
        <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
          <jobName>default_Review_FreeBSD</jobName>
          <jobAlias/>
          <currParams>true</currParams>
          <aggregatedTestResults>false</aggregatedTestResults>
          <exposedSCM>false</exposedSCM>
          <disableJob>false</disableJob>
          <parsingRulesPath/>
          <maxRetries>0</maxRetries>
          <enableRetryStrategy>false</enableRetryStrategy>
          <enableCondition>false</enableCondition>
          <abortAllJob>false</abortAllJob>
          <condition/>
          <configs class="empty-list"/>
          <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
          <buildOnlyIfSCMChanges>false</buildOnlyIfSCMChanges>
          <applyConditionOnlyIfNoSCMChanges>false</applyConditionOnlyIfNoSCMChanges>
        </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
      </phaseJobs>
      <continuationCondition>SUCCESSFUL</continuationCondition>
      <executionType>PARALLEL</executionType>
      <quietPeriodGroovy>index &lt; 5 ? 0 : 2 * 60</quietPeriodGroovy>
    </com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
  </builders>
misery commented 4 years ago

@yorammi Do you see any mistake here? Is it a bug?

yorammi commented 4 years ago

I will try to look into it.

Yoram

בתאריך יום ו׳, 6 בנוב׳ 2020, 10:49, מאת André Klitzing ‏< notifications@github.com>:

@yorammi https://github.com/yorammi Do you see any mistake here? Is it a bug?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jenkinsci/tikal-multijob-plugin/issues/166#issuecomment-722957461, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASZBEUUYMNRPF6F3S7MEHTSOO2CTANCNFSM4GI2KSOA .

misery commented 3 years ago

Thanks! Did you find something? How can I help?

misery commented 3 years ago

Interesting here..... if I ABORT a job before the "new phase" is reached the env variables are NOT empty. Seems they will be flushed later.

Screenshot_20201120_160152