-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add Jenkins shared library #259
Comments
I have been working on a shared library. It has the below functionalities for Linux, Windows, OS X, AIX and z/OS
I'll open a pull request in couple of days |
@gdams I went through your PR and yes it does do a bunch of stuff. However, we want to do the machine maintenance on a regular schedule and It didn't make sense to couple Jenkins with Ansible. So we decided that we were better off with a library that resides solely on Jenkins. The end goal is to have one job that runs weekly and keeps the machine labels updated. Other reason behind this is that the test team wanted the ability to get machine stats in real time, directly from the machine instead of labels. |
Ahh okay, that makes sense. So we can use ansible to get the machines into jenkins and then let your scripts handle the labels etc |
Except, we may not always want to Ansible a machine. Also, the solution will be an API not a script; anyone who wants to use it will have to create a Jenkins job. I did create a Jenkins job but at the moment it's too specific to be checked in here. I'll add some use cases as comments in the API (or somewhere else). |
I think I'm going to have to see the PR to understand what this is trying to achieve over and above ansible. |
The class NodeHelper partially addresses feature requests in adoptium#259 - Add machines to Jenkins: addNewNode() - Determine machine stats - getCpuCount(String computerName) - getLocation(String computerName) - getOsPatchLevel(String computerName) - getMemory(String computerName) - getSpaceLeftInGb(String computerName) - getTotalSpace(String computerName) - Set machine description based on machine stats - Machine stats retrieved from the above functions are used for the description - Determine machine capabilities - getEndian(String computerName) - getOsArch(String computerName) - getOsInfo(String computerName) - Add labels to nodes based on machine capabilities - addLabel(String computerName, String label) - Overwrites the labels with the ones in the arguments - weekly maintaince job will call this function with labels from the inventory file plus labels returned from constructLabels(String computerName) - appendLabel(String computerName, String label) - does only an append - Other useful functions - constructLabels(String computerName) - this function returns a string containing the default labels - as of right now, it only returns OS, arch and Endian (only if it is ppc running linux) - here is a list of labels which have been implemented so far: - constructOsLabel(String computerName) - constructCPULabel(String computerName) - constructMemoryLabel(String computerName) - constructEndianLabel(String computerName) - constructPlatformLabel(String computerName) - constructArchLabel(String computerName) - constructKernelLabel(String computerName) - Few side notes: - computerName: is what the node name on Jenkins - getComputer(String computerName) - This was created with the intention to have computer name validations in one place. At the moment it's very basic but it can be extended to enforce a standardized naming convention
@VermaSh can this be closed? |
yes |
We want the library to be able to automate adding and maintaining machines on Jenkins. Here is a list of desired features
The text was updated successfully, but these errors were encountered: