This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
/** | |
* Lists all enabled Jenkins jobs by name. | |
* @author thabet.amer@gmail.com | |
* @since Jenkins 2.204.1 | |
* @param Bool includeDisabled to include also disabled jobs, default false (No). | |
* @return String array of jenkins jobs names | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
/** | |
* Reads environment variables from a property file, and loads them into Jenkins ENV | |
* @author thabet.amer@gmail.com | |
* @since Jenkins 2.204.1 | |
* @param String path | |
* @return String array | |
* | |
* Example property file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
/** | |
* Gets last successful build number | |
* @author thabet.amer@gmail.com | |
* @since Jenkins 2.204.1 | |
* @param String job name | |
* @return String number of build number | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
/** | |
* List all Git branches of a repo. | |
* @author thabet.amer@gmail.com | |
* @since Jenkins 2.204.1 | |
* @params String url for Git repo URL, String credentialID, Bool activeChoice if ActiveChoice plugin used, String defaultBranch | |
* @return String array of branch names | |
* | |
* Dependencies: |
NewerOlder