-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Create new node #15
Create new node #15
Conversation
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.
Additional deskside review
static final String WGET_SLAVE_JAR = "\"wget -q --no-check-certificate -O slave.jar ${SLAVE_JAR_LOCATION} ; java -jar slave.jar\""; | ||
static final String SSH_COMMAND = "ssh -C -i ${SSH_KEY_LOCATION} <userName/>@"; | ||
static final String SSH_KEY_LOCATION = ""; | ||
} |
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.
Please add a new line at the end of the file.
Jenkins_jobs/CreateNewNode.groovy
Outdated
List<String> newMachines = new ArrayList<String>(); | ||
|
||
node { | ||
stage('jenkins made me do it') { |
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.
Perhaps a more descriptive stage name?
Jenkins_jobs/CreateNewNode.groovy
Outdated
// This will be used to get the names of machines that need to have description updated | ||
newMachines.add(newMachineName); | ||
} else { | ||
echo "Machine(${machines[index]}) already exists." |
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.
Please reverse this if
to have the error at the start
Jenkins_jobs/CreateNewNode.groovy
Outdated
if (launcher.getClass().toString().contains("slaves.CommandLauncher")) { | ||
for (ScriptApproval.PendingScript script : scriptSet) { | ||
// TODO: Search for entire string instead of a part | ||
if (script.script.contains("ssh -C -i /data/jenkins/J9_Build/home/.ssh/j9build.key j9build@" + machineIPs[index])) { |
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.
I don't like this string hardcoded here, shouldn't we be using the Constants file?
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.
Still missing new line at end of Contstants.groovy, other than that lgtm
- Added CreateNewNode job - Updated readme file to include the new job - Moved string constants to the vars directory of the Node helper API - added a input parameter for SSH key id in CreateNewNode issue adoptium#10 Signed-off-by: Shubham Verma <[email protected]>
I have added create new node part of NodeMaintaince job. This is a standalone job that calls the API to add new node. Along with the new job I have also fixed a few bugs in NodeHelper API.