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
local function getTempPath() | |
local directorySeperator = package.config:match("([^\n]*)\n?") | |
local exampleTempFilePath = os.tmpname() | |
-- remove generated temp file | |
pcall(os.remove, exampleTempFilePath) | |
local seperatorIdx = exampleTempFilePath:reverse():find(directorySeperator) | |
local tempPathStringLength = #exampleTempFilePath - seperatorIdx |
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
// A new UUID must be generated for the first run and re-used for your Job DSL, the plugin updates jobs based on ID | |
UUID uuid = UUID.fromString("dd847135-8391-4f66-a54c-7f8781dc3119") // generate one @ https://www.uuidgenerator.net | |
multibranchPipelineJob("my_awesome_job") { | |
displayName "my awesome job" | |
description "multi-branch pipeline job thingy" | |
configure { | |
it / sources / 'data' / 'jenkins.branch.BranchSource' << { | |
source(class: 'jenkins.plugins.git.GitSCMSource') { | |
id(uuid) |
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
#!/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 | |
######################################################################################################################## | |
# # | |
# GitLab API client written in Bash using the `curl` command # | |
# ----------------------------------------------------------- # | |
# See: https://gist.github.com/djfdyuruiry/9eecf631e3b43fce2a4393d23e03c1ce # | |
# # | |
# Using global configuration: # | |
# # | |
# export GITLAB_URL="https://my-g |
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} |
OlderNewer