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
| Jenkins.instance.getItemByFullName("group/pipeline") | |
| .getBuildByNumber(8094) | |
| .finish(hudson.model.Result.ABORTED, new java.io.IOException("Aborting build")); |
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 org.jenkinsci.plugins.workflow.actions.LabelAction; | |
| import org.jenkinsci.plugins.workflow.cps.CpsThread; | |
| pipeline { | |
| agent any | |
| stages { | |
| stage('Hello') { | |
| 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
| "\U$(printf '%3x' 128$(date +%u)$(( $RANDOM % 99 )) )" |
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
| cat json.flie | jq 'path(..) | [.[] | tostring ] | join("/") ' |
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
| function _cache() { | |
| HASH=$(echo $@ | md5 ) | |
| CACHE_FILE="/tmp/${HASH}" | |
| NOW=$(date +%s) | |
| if [[ ! -e $CACHE_FILE ]] || [[ $(($(date +%s)-$(date -r $CACHE_FILE +%s))) -ge 3600 ]]; then | |
| RESULT=$(eval "$@") | |
| echo "$RESULT" > /tmp/$HASH | |
| echo "$RESULT" | |
| else | |
| cat $CACHE_FILE |
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
| section: | |
| ls | |
| clean: | |
| rm -rf ./tagget | |
| something-else: | |
| kill-all-human.sh |
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
| kubectl get pods -o json | jq -r '.items[] | select(.status.conditions[] | select(.type == "Ready" and .status == "True") )| .metadata.name' |
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 | |
| # helper funciton for retry NUM_TRIES times with SLEEP_TIME delays between each | |
| function run_retry { | |
| local SLEEP_TIME=$1 | |
| local NUM_TRIES=$2 | |
| shift 2 | |
| local CMD=$* | |
| COUNT=0 | |
| echo "Running '$CMD'" |
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 | |
| set -e | |
| env='prod' | |
| team='common' | |
| svc='adm' | |
| declare -A IDS | |
| IDS=( | |
| # prod |
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
| set nocompatible | |
| set number | |
| set ruler | |
| syntax on | |
| " Set encoding | |
| set encoding=utf-8 | |
| " Whitespace stuff |
NewerOlder