-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP : Feature nxbt 2619 update busy slaves #40
base: master
Are you sure you want to change the base?
Conversation
for slave in ${availableSlaves}; do | ||
slave=\${slave/[/} && slave=\${slave/]/} && slave=\${slave/,/} | ||
echo "\$slave" | ||
ssh jenkins@qa-ovh0"\${i}".nuxeo.com "bash -s -- \${slave}" < . ../common/check.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|| true
or set +e
rather than removing the whole error-on-exit behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove the remote ssh with a local call to
docker -H qa-ovh01.nuxeo.com:4243 ps -f name=itslave01 --format '{{.ID}}'
or
docker -H tcp://swarm-qa.nuxeo.org:4000 info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(alternate way could have been to retrieve the SH output in a Groovy variable for later treatment)
availableSlaves = [] | ||
results = readFile ('result.txt'.trim()); | ||
result = results.readLines(); | ||
for (validatedSlave in result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
results = readFile('result.txt'.trim()).readLines();
for (validatedSlave in results) {
result = results.readLines(); | ||
for (validatedSlave in result) { | ||
for (slave in staticSlaves) { | ||
if (validatedSlave == slave.getDisplayName()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validatedSlave => slaveToUpdate for instance
// trigger this job again if we have set slaves offline | ||
if (onlineBusySlaves.size() > 0) { | ||
build job: 'update_static_slaves', propagate: false, quietPeriod: 3600 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -61,8 +105,10 @@ def update_static_slaves(boolean doConfirm=false) { | |||
} | |||
} | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here, the updated slaves need to be put online back
the start Shell recreates the slave, so it is online by default, the default one being actually deleted.
329b349
to
2ad9c8c
Compare
5945404
to
c30bf37
Compare
341bdcf
to
c74cf56
Compare
c464e5b
to
4ea9723
Compare
WIP DO NOT MERGE