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
<?xml version="1.0" encoding="UTF-8"?> | |
<ivy-settings> | |
<settings defaultResolver="downloadGrapes" /> | |
<resolvers> | |
<ibiblio name="ibiblio-maven2" m2compatible="true"/> | |
<ibiblio name="java-net-maven2" root="http://download.java.net/maven/2/" m2compatible="true" /> | |
<ibiblio name="maven" root="http://mvnrepository.com/artifact/" m2compatible="true" /> | |
<chain name="downloadGrapes"> | |
<resolver ref="maven"/> | |
<resolver ref="ibiblio-maven2"/> |
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
import hudson.model.* | |
def q = Jenkins.instance.queue | |
q.items.each { | |
if (it =~ /deploy-to/) { | |
q.cancel(it.task) | |
} | |
} |
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
Jenkins.instance.getView('All').getBuilds().each { it.delete() } |
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
workspace: | |
base: /build | |
pipeline: | |
build-image: | |
image: docker | |
commands: | |
# Build development target, which includes xdebug. | |
# Tag with both api-build:<build_number> and api-build:latest. |
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
{ | |
/* | |
//Please click VSCode -> Preferences -> User Snippets -> groovy | |
//Then copy and paste this into groovy.json | |
*/ | |
/* | |
// Place your snippets for Groovy here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: |
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
#!/bin/zsh | |
#### Uses the-silver-surfer (ag) and zsh | |
touch rotatelogdone.txt | |
ag -L logRotator --nocolor | xargs ls -1 > rotatelogdone.txt | |
ARRAY=($(cat rotatelogdone.txt)) | |
for VAR in ${ARRAY[@]} |
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
#!/bin/bash | |
( set -o posix ; set ) > vars | |
sed -i '/BASHOPTS/d' vars | |
sed -i '/BASH_VERSINFO/d' vars | |
sed -i '/EUID/d' vars | |
sed -i '/PPID/d' vars | |
sed -i '/SHELLOPTS/d' vars | |
sed -i '/UID/d' vars |
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
package main | |
import "fmt" | |
import "sync" | |
func main() { | |
var wg sync.WaitGroup | |
count := 10 | |
wg.Add(count) |
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
abcs = ['a', 'b', 'c'] | |
node('master') { | |
stage('Test 1: loop of echo statements') { | |
echo_all(abcs) | |
} | |
stage('Test 2: loop of sh commands') { | |
loop_of_sh(abcs) | |
} | |
stage('Test 3: loop with preceding SH') { |
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
apiVersion: v1 | |
kind: Config | |
clusters: | |
{{- if eq (env "KUBE_ENVIRONMENT") "pr-kops" "pr" }} | |
{{- with secret (printf "secret/jenkins/kubernetes/%s" (env "KUBE_ENVIRONMENT"))}} | |
- cluster: | |
api-version: v1 | |
server: "{{ .Data.api }}" | |
{{- if .Data.token}} | |
insecure-skip-tls-verify: true |