Skip to content

Instantly share code, notes, and snippets.

rsync -h -v -r -P -t -l /var/lib/jenkins/ /vagrant/forVm/jenkins/
*/terraform.tfvars
*/terraform.tfstate
*/terraform.tfstate.backup
*/.terraform
*/mykey*
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
# This name uniquely identifies the PVC. Will be used in deployment below.
name: minio-pv-claim
labels:
app: minio-storage-claim
spec:
# Read more about access modes here: http://kubernetes.io/docs/user-guide/persistent-volumes/#access-modes
accessModes:
import jenkins.model.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import hudson.plugins.sshslaves.*;
domain = Domain.global()
store = Jenkins.instance.getExtensionList('com.cloudbees.plugins.credentials.SystemCredentialsProvider')[0].getStore()
@lepffm
lepffm / gist:a538f4db9186e73a1e46165b6e38abc9
Created May 1, 2018 01:40 — forked from int128/gist:14255ff1b1ed11ce1f661a7d35954c2b
How to execute a remote command on the Jenkins Script Console
import hudson.util.RemotingDiagnostics;
def node = 'node-name'
def command = 'uname -a'
println RemotingDiagnostics.executeGroovy("""
def p = '$command'.execute()
p.waitFor()
println p.in.text
@lepffm
lepffm / init-git-hook-script.cmd
Last active October 25, 2017 12:52
git pre-push hook script for windows
@echo off
@rem init script for git pre-hook ( run findbugs )
@rem writer xxx@xxx.com
@rem check git hook available ( for eclipse )
set CYG_FILE=cygpath.exe
set HOOK_FILE=".git\hooks\pre-push"
@for %%i in (%CYG_FILE%) do @if NOT "%%~$PATH:i"=="" GOTO WRITE_HOOK