Skip to content

Commit

Permalink
Update README.md (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbazhenoff authored Feb 17, 2024
1 parent 572e3e1 commit 3a7c4fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ Some common things that makes writing Jenkins pipelines easier.
CommonFunctions = new org.alx.commonFunctions() as Object
// your pipeline code and call this object by 'CommonFunctions.<functionName>', e.g:
CommonFunctions.cleanSshHostsFingerprints(env.IP_LIST.split(' ').toList())
CommonFunctions.cleanSshHostsFingerprints(env.IP_LIST.tokenize(' '))
// where IP_LIST is a space separated string IP list which is defined by pipeline
// parameter IP_LIST
}
```
To use GitLab related functions (e.g. runAnsible) you should set GitCredentialsID variable, which can be defined in
`OrgCfGlobals()` class:
`OrgAlxGlobals()` class:
```groovy
@Library('jenkins-shared-library')
node('master') {
CommonFunctions = new org.alx.commonFunctions() as Object // shout be placed before GlobalConstants
GlobalConstants = new org.company.OrgCfGlobals() as Object
// Then use constants from OrgCfGlobals
GlobalConstants = new org.alx.OrgAlxGlobals() as Object
// Then use constants from OrgAlxGlobals
}
```
Expand Down

0 comments on commit 3a7c4fd

Please sign in to comment.