You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DevOps-Bash-tools/setup/jenkins-test-sleep-job.xml

63 lines
2.2 KiB
XML

<?xml version='1.1' encoding='UTF-8'?>
<project>
<actions/>
<description>Runs a sleep job to allow testing parallelization and auto-scaling of Jenkins agents on Kubernetes</description>
<keepDependencies>false</keepDependencies>
<properties>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>7</daysToKeep>
<numToKeep>100</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</strategy>
</jenkins.model.BuildDiscarderProperty>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>UNIQUE_VALUE</name>
<description>Enter anything unique to queue multiple copies of this job to force parallelization</description>
<defaultValue>default value</defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.ChoiceParameterDefinition>
<name>SLEEP_MINUTES</name>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>10</string>
<string>5</string>
<string>1</string>
<string>20</string>
<string>30</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>true</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>echo Environment:
echo
env | sort
echo
echo Starting
echo &quot;UNIQUE_VALUE=$UNIQUE_VALUE&quot;
SLEEP_SECONDS=&quot;$(($SLEEP_MINUTES * 60))&quot;
echo &quot;Sleeping for $SLEEP_MINUTES minutes ($SLEEP_SECONDS seconds)&quot;
sleep &quot;$SLEEP_SECONDS&quot;
echo Finished</command>
<configuredLocalRules/>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>