Skip to content

Instantly share code, notes, and snippets.

Andrew Bayer abayer

Block or report user

Report or block abayer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
abayer / check-updates
Last active Sep 28, 2018 — forked from rtyler/check-updates
A simple script to update a pom.xml for the latest updates
View check-updates
#!/usr/bin/env bash
DEPENDS=$(xmlstarlet sel -N x='' \
-t -m x:project/x:dependencies/x:dependency \
-v x:artifactId -o ' ' \
if [ ! -f update-center.actual.json ]; then
View gist:5d02d5a41efcf234db33dd05e6709901
// assume this is some list of things you're going to do something with
def someList
def parallelBranches = someList.collectEntries { n ->
[(n): {
throttle('category') {
node('some-node') {
// do some things with n
abayer / Jenkinsfile
Created Mar 16, 2017
New Declarative Pipeline features in 1.1
View Jenkinsfile
pipeline {
agent {
// "node" is a new agent type that works the same as "label" but allows
// additional parameters, such as "customWorkspace" below.
node {
label "some-label"
// This is equivalent to the "ws(...)" step - sets the workspace on the
// agent to a hard-coded path. If it's not an absolute path, it'll be
// relative to the agent's workspace root.
customWorkspace "/use/this/path/instead"
abayer / Jenkinsfile
Created Feb 15, 2017
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
View Jenkinsfile
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
View fullDeclarativeSyntax0.8.1.groovy
// This is the full syntax for Jenkins Declarative Pipelines as of version 0.8.1.
pipeline {
// Possible agent configurations - you must have one and only one at the top level.
agent any
agent none
agent {
label "whatever"
abayer / examplePipeline.groovy
Last active Jun 9, 2018 — forked from rsandell/examplePipeline.groovy
Example declarative pipeline
View examplePipeline.groovy
pipeline {
agent none
environment {
MAVEN_OPTS = "-Xmx1024m"
parameters {
stringParam(defaultValue: "install", description: "What Maven goal to call", name: "MAVEN_GOAL")
abayer /
Last active Oct 16, 2019
Example of a script for backing up Jenkins config in git.
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
set -ex
if [ $# -ne 2 ]; then
echo usage: $0 root_dir jenkins_master
abayer /
Created Jan 20, 2014
Integration test for job-dsl-plugin context
package javaposse.jobdsl.plugin;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import static hudson.model.Result.SUCCESS;
import static javaposse.jobdsl.plugin.RemovedJobAction.IGNORE;
View gist:5035000
http-bio-8080-exec-6" daemon prio=5 tid=10b847800 nid=0x118b8d000 runnable [118b86000]
java.lang.Thread.State: RUNNABLE
at java.util.WeakHashMap.get(
at com.springsource.loaded.ri.ReflectiveInterceptor.getRType(
at com.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetAnnotation(
- locked <7eb3eeed8> (a
View gist:5007200
2013-02-21 10:16:32,681 [i/o thread 1] ERROR handlers.BackoffLimitedRetryHandler - Cannot retry after server error, command has exceeded retry limit 5: [method=VirtualMachi
neAsyncClient.deployVirtualMachineInZone, request=GET
da&templateid=240937c8-d695-419c-9908-5c7b2a07e6f1&serviceofferingid=c376102e-b683-4d43-b583-4eeab4627e65&displayname=bousa-4&name=bousa-4 HTTP/1.1]
2013-02-21 10:16:32,691 [pool-1-thread-98] ERROR reporting.InstanceProvisionerJob - provisionWithRetry error: org.jclouds.http.HttpResponseException: command: GET HTTP/1.1 failed with response: HTTP/1.1 534 null; content: [{ "deployvirtualmachineresponse" : {"uuidList
You can’t perform that action at this time.