This file contains hidden or 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
#!/bin/bash | |
function checkport { | |
if nc -zv -w30 $1 $2 <<< '' &> /dev/null | |
then | |
echo "[+] Port $1/$2 is open" | |
else | |
echo "[-] Port $1/$2 is closed" | |
fi | |
} |
This file contains hidden or 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
pipeline { | |
// run on jenkins nodes tha has java 8 label | |
agent { label 'java8' } | |
// global env variables | |
environment { | |
EMAIL_RECIPIENTS = '[email protected]' | |
} | |
stages { | |
stage('Build with unit testing') { |
This file contains hidden or 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
#!/bin/bash | |
REPO_URL="https://repository.xxx.net/repository/" | |
USER="admin" | |
PASSWORD="datpassword" | |
BUCKET="portal-docker" | |
KEEP_IMAGES=10 | |
IMAGES=$(curl --silent -X GET -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -u ${USER}:${PASSWORD} "${REPO_URL}${BUCKET}/v2/_catalog" | jq .repositories | jq -r '.[]' ) |
This file contains hidden or 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
#!/bin/bash | |
#title :createenvironment-elk.sh | |
#description :shell script to create environments (elasticsearch,logstash and kibana) | |
#date :2018-04-19 | |
#usage :sudo ./elk.sh | |
#used version :6.2.4 | |
#tested-version :1.2.0 | |
#tested-distros :CentOS 7.4 | |
# Checking whether user has enough permission to run this script |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.define "puppet" do |puppet| | |
puppet.vm.box = "centos/7" | |
puppet.vm.network "private_network", ip: "192.168.33.100" | |
puppet.vm.hostname = "puppet" | |
puppet.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "4096"] |
This file contains hidden or 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
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
/* | |
Please make sure to add the following environment variables: | |
HEROKU_PREVIEW=<your heroku preview app> | |
HEROKU_PREPRODUCTION=<your heroku pre-production app> | |
HEROKU_PRODUCTION=<your heroku production app> |
This file contains hidden or 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
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
/* | |
Please make sure to add the following environment variables: | |
HEROKU_PREVIEW=<your heroku preview app> | |
HEROKU_PREPRODUCTION=<your heroku pre-production app> | |
HEROKU_PRODUCTION=<your heroku production app> |
This file contains hidden or 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 bash | |
# Repository | |
REPOSITORY="username/project.git" | |
# GIT CLONE DIRECTORY | |
DIRECTORY="myproject" | |
# Path to project parent dir | |
PROJECT_PATH="path/to/project" |
This file contains hidden or 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
def getProjectName() { | |
return 'JenkinsPipeline' | |
} | |
def getJDKVersion() { | |
return 'jdk1.8.0_101' | |
} | |
def getMavenConfig() { | |
return 'maven-config' |
This file contains hidden or 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 python | |
import subprocess | |
import fnmatch | |
import os | |
import os.path | |
from string import Template | |
from optparse import OptionParser | |
import webbrowser | |
import string | |
import datetime |
OlderNewer