Skip to content

Instantly share code, notes, and snippets.

env.niceName = 'Build Name'
pipeline {
agent any
//agent { label "jenkins-node-1"}
triggers {
cron ()
}
stages {
stage ('Stage Name') {
@chrisice
chrisice / docroot.pl
Created October 9, 2014 20:22
Get document root
#!/usr/bin/perl
my $input = $ARGV[0];
if ($input !~ /.*@.*/) {
print "Please enter a valid email address.\n";
die("\n");
}
else{
@chrisice
chrisice / gist:85cd4d45ab161d1aeba1
Created October 1, 2014 19:28
Get a list of the ip addresses on a server with perl
#!/usr/bin/perl
use IO::Interface::Simple;
my @interfaces = IO::Interface::Simple->interfaces;
for my $interfaces (@interfaces) {
print $interfaces->address . "\n";
}
@chrisice
chrisice / gist:ff2dddba5d4a4c912025
Created October 1, 2014 19:07
Check if a domain resolves
#!/usr/bin/perl
use Net::DNS::Check;
sub check_domain_resolution {
my $domain = $ARGV[0];
if (!defined $domain) {
@chrisice
chrisice / gist:af51502866d573c59b5d
Created October 1, 2014 17:32
check-hostname.pl
#!/usr/bin/perl
use Sys::Hostname;
sub check_hostname{
my $host = hostname;
my $domain = $ARGV[0];
if ($domain eq $host) {