A custom step for Jenkins pipelines that allows scaling a task n times in parallel, specifying parameters for each thread
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
C:\Windows\System32\bash.exe -c "echo '%~dp0' | sed -e 's|\\\\|/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/mnt/\L\1\E/\2|' | cd && %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
if (env.BRANCH_NAME == "master") { | |
properties([ | |
pipelineTriggers([ | |
pollSCM("H/5 * * * *") | |
]) | |
]) | |
} | |
pipeline { | |
agent none |
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 | |
queueName="sns-queue" | |
endpointUrl="http://localhost:4576" | |
queueUrl="${endpointUrl}/queue/${queueName}" | |
queueLogFile="sqs_${queueName}.log" | |
queueErrorLogFile="sqs_${queueName}_err.log" | |
jsonLoadFromStdIn="json.load(sys.stdin)" | |
doJsonOperation() { |
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 | |
if [ ! `command -v "vagrant"` ]; then | |
>&2 echo "ERROR: Script $0 requires vagrant, it was not found in the path" | |
exit 1 | |
fi | |
vagrantProvider=${VAGRANT_PROVIDER:-virtualbox} | |
providerAwkString="[${vagrantProvider:0:1}]${vagrantProvider:1}" | |
vagrant-status() { |
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 | |
jsonLoadFromStdIn="json.load(sys.stdin)" | |
loopOverItems=false | |
loopJsonOperation="" | |
__doJsonOperation() { | |
json="$1" | |
operation="$2" | |
operationWithJsonLoad=${operation/__JSON__/$jsonLoadFromStdIn} |
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 | |
######################################################################################################################## | |
# # | |
# Jenkins API client written in Bash using the `wget` and `curl` commands # | |
# ----------------------------------------------------------------------- # | |
# See: https://gist.github.com/djfdyuruiry/71714479b3a5f7eb1e714df5d3499665 # | |
# # | |
# Using global configuration: # | |
# # | |
# export JENKINS_URL="https://my- |
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 | |
if [ "$#" -lt 1 ] || [ -z "$1" ]; then | |
>&2 echo "Usage: $0 searchTerm [searchResultLimit] # default searchResultLimit is 5" | |
exit 1 | |
fi | |
if [ -z "$(command -v python)" ]; then | |
>&2 echo "$0 requires python to be installed and in the current PATH" | |
exit 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
from datetime import datetime, timedelta | |
from requests import get, post | |
GRAFANA_DATE_FORMAT = '%Y-%m-%d %H:%M:%S' | |
GRAFANA_CREDS = ('user', 'password') | |
dashboardResponse = get('https://grafana.host/api/dashboards/a/dashboard', auth = GRAFANA_CREDS) | |
dashboard = dashboardResponse.json()['dashboard'] |
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
MAX_ID_LENGTH = 10 | |
local generatePseudoUniqueId = function() | |
local threadAddress = tostring({}):sub(10) | |
local threadAddressLetters = threadAddress:gsub("%d", "") | |
local threadAddressNumbers = threadAddress:gsub("[a-z]", "") | |
local threadAddressNumber = tonumber(threadAddressNumbers) | |
local maxNumberWidth = MAX_ID_LENGTH - threadAddressLetters:len() |
OlderNewer