-
Bug
-
Resolution: Incomplete
-
Major
-
None
-
Jenkins 1.620
jdk7
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.2 (Santiago)
Release: 6.2
Codename: SantiagoJenkins 1.620 jdk7 LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 6.2 (Santiago) Release: 6.2 Codename: Santiago
This setup consists of master and secondary job
Master job is setup using 'Active Choices Parameter' to choose a host as parameter. It also lists maven artifact versions to pass the artifact as a parameter to secondary job as well.
The build step is to 'execute shell' which executes the secondary job remotely with a curl command
e.g.
for i in $(echo $HOSTS | sed -e 's/,/ /g'); do
/usr/bin/curl --data-urlencode "HOST=$i" --data-urlencode "BUILD_URL=${BUILD_URL}" ${JENKINS_URL}job/testing_deploy/buildWithParameters?token=
done
The secondary job takes those parameters and runs an ssh command for the host that was passed
e.g.
ssh -o RequestTTY=force
{user}@${HOST} <<EOF
set -xe
service jboss-as-standalone stop
mkdir -p /tmp/${JOB_NAME}/${BUILD_NUMBER}
cd /tmp/${JOB_NAME}/${BUILD_NUMBER}
wget -O st.ear $BUILD_URL
chown -v jboss:jboss /tmp/${JOB_NAME}/${BUILD_NUMBER}/
mv -vf /tmp/${JOB_NAME}/${BUILD_NUMBER}/{artifact id}
/usr/share/jbossas/standalone/deployments/
{artifact id} service jboss-as-standalone start
exit 0
EOF
So the goal is on the master job we can multi select hostnames. If two hostnames are selected from one master job it fires two secondary jobs. This works great. The only issue is that when the secondary jobs are triggered they run serially instead of in parallel.
The secondary job is setup to use throttle concurrent build plugin
Max Total concurrent builds = 8
Max total per node = 2
We have 4 slaves running, with two executors. So 8 builds should be able to run at once, with two per node. This works on other projects we have but not this.
It seems if builds have different parameters they are not honoring throttle concurrent builds parameters.