Skip to content

Commit

Permalink
Merge pull request #41 from nickdgriffin/feature/plat-man-pr11
Browse files Browse the repository at this point in the history
Load_Platform: Using ADOP_PLATFORM_MANAGEMENT_VERSION if specified
  • Loading branch information
dsingh07 authored Oct 13, 2017
2 parents cc78f7a + 8fa44d8 commit d493bff
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion resources/jobs/Load_Platform/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
<de.pellepelster.jenkins.walldisplay.WallDisplayJobProperty plugin="[email protected]"/>
<EnvInjectJobProperty plugin="[email protected]">
<info>
<loadFilesFromMaster>false</loadFilesFromMaster>
</info>
<on>true</on>
<keepJenkinsSystemVariables>true</keepJenkinsSystemVariables>
<keepBuildVariables>true</keepBuildVariables>
<overrideBuildParameters>false</overrideBuildParameters>
<contributors/>
</EnvInjectJobProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
Expand Down Expand Up @@ -81,7 +91,15 @@ fi
# Setup remote &amp; populate
git remote add adop ssh://jenkins@gerrit:29418/&quot;${target_repo_name}&quot;
git fetch adop
git push adop +refs/remotes/origin/*:refs/heads/*</command>
git push adop +refs/remotes/origin/*:refs/heads/*

# If a version has been specified, let&apos;s switch to it
if [ ! -z &quot;${ADOP_PLATFORM_MANAGEMENT_VERSION}&quot; ] &amp;&amp; [[ &quot;${ADOP_PLATFORM_MANAGEMENT_VERSION}&quot; =~ ^[a-fA-F0-9]{8,40}$ ]] &amp;&amp; [ &quot;$(git cat-file -t &quot;${ADOP_PLATFORM_MANAGEMENT_VERSION}&quot;)&quot; = &quot;commit&quot; ]; then
echo &quot;INFO - Checking out specified ADOP_PLATFORM_MANAGEMENT_VERSION &apos;${ADOP_PLATFORM_MANAGEMENT_VERSION}&apos;&quot;
git checkout &quot;${ADOP_PLATFORM_MANAGEMENT_VERSION}&quot;
else
echo &quot;WARNING - ADOP_PLATFORM_MANAGEMENT_VERSION is set to &apos;${ADOP_PLATFORM_MANAGEMENT_VERSION}&apos; which is not a valid Git commit hash - defaulting to &apos;master&apos;&quot;
fi</command>
</hudson.tasks.Shell>
<javaposse.jobdsl.plugin.ExecuteDslScripts plugin="[email protected]">
<targets>bootstrap/**/*.groovy</targets>
Expand Down

0 comments on commit d493bff

Please sign in to comment.