forked from dennyzhang/cheatsheet-jenkins-groovy-A4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55211d6
commit 188c588
Showing
16 changed files
with
165 additions
and
21 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
//------------------------------------------------------------------- | ||
// @copyright 2018 DennyZhang.com | ||
// Licensed under MIT | ||
// https://www.dennyzhang.com/wp-content/mit_license.txt | ||
// | ||
// File: get-ip-by-hostname.groovy | ||
// Author : Denny <https://www.dennyzhang.com/contact> | ||
// https://asoftwareguy.com/2014/04/17/get-the-ip-address-for-a-host-name-in-groovy/ | ||
// Link: https://cheatsheet.dennyzhang.com/cheatsheet-jenkins-groovy-a4 | ||
// -- | ||
// Created : <2018-04-20> | ||
// Updated: Time-stamp: <2019-02-16 22:04:40> | ||
//------------------------------------------------------------------- | ||
def hostname = 'google.com' | ||
println InetAddress.getByName(hostname).address.collect { it & 0xFF }.join('.') |
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
//------------------------------------------------------------------- | ||
// @copyright 2018 DennyZhang.com | ||
// Licensed under MIT | ||
// https://www.dennyzhang.com/wp-content/mit_license.txt | ||
// | ||
// File: print.groovy | ||
// Author : Denny <https://www.dennyzhang.com/contact> | ||
// Link: https://cheatsheet.dennyzhang.com/cheatsheet-jenkins-groovy-a4 | ||
// -- | ||
// Created : <2018-04-20> | ||
// Updated: Time-stamp: <2019-02-16 22:05:02> | ||
//------------------------------------------------------------------- | ||
String message = 'Hello from Groovy' | ||
println message | ||
println message |
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
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
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