Skip to content
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

Open
wants to merge 58 commits into
base: master
Choose a base branch
from

Conversation

alexistimic
Copy link
Contributor

WIP DO NOT MERGE

@nuxeojenkins
Copy link

View issue in JIRA

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
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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) {
Copy link
Contributor

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()) {
Copy link
Contributor

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
}
Copy link
Contributor

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) {
}
}
}
Copy link
Contributor

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.

@jcarsique jcarsique force-pushed the feature-NXBT-2619-update-busy-slaves branch from 329b349 to 2ad9c8c Compare January 2, 2019 14:05
@alexistimic alexistimic force-pushed the feature-NXBT-2619-update-busy-slaves branch 2 times, most recently from 5945404 to c30bf37 Compare January 3, 2019 14:57
@jcarsique jcarsique force-pushed the feature-NXBT-2619-update-busy-slaves branch from 341bdcf to c74cf56 Compare January 14, 2019 17:50
@jcarsique jcarsique force-pushed the feature-NXBT-2619-update-busy-slaves branch from c464e5b to 4ea9723 Compare January 22, 2019 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants