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
| @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 | |
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
| 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 |
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
| 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() |
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
| 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: |
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
| */terraform.tfvars | |
| */terraform.tfstate | |
| */terraform.tfstate.backup | |
| */.terraform | |
| */mykey* |
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
| rsync -h -v -r -P -t -l /var/lib/jenkins/ /vagrant/forVm/jenkins/ |
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
| /* | |
| * site healthcheck to slack notification pipeline | |
| * | |
| */ | |
| pipeline { | |
| agent any | |
| triggers { | |
| pollSCM('H/10 * * * *') // every 10 min | |
| } | |
| environment { |
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 { | |
| agent any | |
| environment { | |
| VAULT_TOKEN = 'YOUR_VAULT_TOKEN' | |
| VAULT_API_ADDR = 'YOUR_VAULT_URL/v1' | |
| } | |
| stages { | |
| stage("read vault"){ | |
| steps { | |
| 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
| def MIN = 500 // minimum count | |
| Jenkins.instance.getAllItems(AbstractProject.class).sort{ it.builds.size() }.reverse().findAll{ it.builds.size() > MIN }.each{ | |
| println it.absoluteUrl + "," + it.builds.size() | |
| } | |
| return |
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
| ############################################################################### | |
| # Helpful Docker commands and code snippets | |
| ############################################################################### | |
| ### CONTAINERS ### | |
| docker stop $(docker ps -a -q) #stop ALL containers | |
| docker rm -f $(docker ps -a -q) # remove ALL containers | |
| docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
| # exec into container |
OlderNewer