Skip to content

Commit

Permalink
Merge pull request adoptium#11 from VermaSh/master
Browse files Browse the repository at this point in the history
Updated readme with useful information
  • Loading branch information
karianna authored Mar 24, 2018
2 parents 8a767cb + ff4b584 commit d4e03c3
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
# openjdk-jenkins-helper
Jenkins API label creator
The NodeHelper API contains helper functions to query basic machine stats in real time, add new machines, update/overwrite labels.

## Functions
* Get CPU count ```String getCpuCount(String computerName)```
* Get Installed memory ```Tuple getMemory(String computerName)```
* Get OS information ```Tuple getOsInfo(String computerName)```
* Get Kernel information ```Tuple getOsKernelInfo(String computerName)```
* Get Endian ```String getEndian(String computerName)```
* Get Location ```String getLocation(String computerName)```
* Get Description ```String getDescription(String computerName)```
* Get Home directory ```String getHomeDirectoryPath(String computerName)```
* Get free space in the home directory ```String getSpaceLeftInGb(String computerName)```
* Get Total installed disk space ```String getTotalSpace(String computerName)```
* Get Labels ```String getLabels(String computerName)```
* Add new Node ```String addNewNode(String newNodeName,String newNodeDescription,String newNodeRemoteFS,int newNodeNumExecutors,Mode newNodeMode,String newNodeLabelString,def launcher)```
* Add Label ```String addLabel(String computerName, String label)```
* Append Label ```String appendlabel(String computerName, String label)```

## How-to

### Setup
[Here](https://jenkins.io/doc/book/pipeline/shared-libraries/) are the instructions on how to add the library to Jenkins

### Usuage
To use the API in a Jenkins job you'll need to add ```@Library('NodeHelper') _``` to import the API.

## TODOs
* A job that pulls machine list from a inventory file and validates the names with those already on Jenkins. It also adds any labels mentioned in the inventory file to the machine on Jenkins, [issue](https://github.com/AdoptOpenJDK/openjdk-jenkins-helper/issues/10)
* CPU Information for a ZOS, [issue](https://github.com/AdoptOpenJDK/openjdk-jenkins-helper/issues/9)
* Logic to get Hypervisor information, [issue](https://github.com/AdoptOpenJDK/openjdk-jenkins-helper/issues/4)
* Move strings out to a config file, [issue](https://github.com/AdoptOpenJDK/openjdk-jenkins-helper/issues/2)

0 comments on commit d4e03c3

Please sign in to comment.