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
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
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
#!/usr/bin/env bash | |
: ' Script to create self-signed certificate | |
' | |
# check if debug flag is set | |
if [ "${DEBUG}" = true ]; then | |
set -x # enable print commands and their arguments as they are executed. |
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
#!/usr/bin/env bash | |
: ' A simple MySQL dump script with optimized options | |
' | |
# check if debug flag is set | |
if [ "${DEBUG}" = true ]; then | |
set -x # enable print commands and their arguments as they are executed. |
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
#!/usr/bin/env bash | |
: ' A simple MySQL import script with optimized options | |
' | |
# check if debug flag is set | |
if [ "${DEBUG}" = true ]; then | |
set -x # enable print commands and their arguments as they are executed. |
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
#!groovy | |
// imports | |
import jenkins.model.Jenkins | |
// parameters | |
def systemMessage = "Insert your Jenkins system message here." | |
// get Jenkins instance | |
Jenkins jenkins = Jenkins.getInstance() |
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
FROM python:3.7-slim-stretch | |
LABEL maintainer="Yevhen Lebid <yevhen.lebid@loopme.com>" | |
# Never prompts the user for choices on installation/configuration of packages | |
ENV DEBIAN_FRONTEND=noninteractive \ | |
TERM=linux | |
# Airflow | |
ARG AIRFLOW_VERSION=1.10.7 |
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
pipeline { | |
agent any | |
stages { | |
stage("Prepare environment") { | |
steps { | |
script { | |
sh "docker-compose -f docker-compose.yaml down --remove-orphans --volumes" | |
} | |
} |
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
@Grab(group='org.yaml', module='snakeyaml', version='1.18') | |
import jenkins.model.* | |
import hudson.model.* | |
import hudson.triggers.* | |
import hudson.tasks.LogRotator | |
import hudson.plugins.git.* | |
import hudson.plugins.git.extensions.* | |
import hudson.plugins.git.extensions.impl.* | |
import org.jenkinsci.plugins.workflow.job.WorkflowJob | |
import org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition |
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
$ cat `which helm` | |
#!/usr/bin/env bash | |
set -x | |
docker run --rm \ | |
-e KUBECONFIG=${KUBECONFIG//$HOME/\/root} \ | |
-v ~/.kube:/root/.kube/:ro \ | |
-v ~/.helm:/root/.helm/:rw \ | |
helm "$@" |
NewerOlder