Skip to content

Instantly share code, notes, and snippets.

View consoledotblog's full-sized avatar

consoledotblog

View GitHub Profile
@consoledotblog
consoledotblog / jenkins_jobs.ini
Created January 14, 2016 20:08 — forked from jamesggraf/jenkins_jobs.ini
Configure Jenkins Job Builder
[job_builder]
ignore_cache=True
keep_descriptions=False
include_path=.
recursive=False
allow_duplicates=False
[jenkins]
user=YOUR_USER_NAME
password=YOUR_PASSWORD_OR_API_KEY
@consoledotblog
consoledotblog / hello_world.yml
Created January 14, 2016 20:08 — forked from jamesggraf/hello_world.yml
Example Hello World Jenkins Job Builder Definition
---
- job:
name: my_hello_world_job
parameters:
- string:
name: Message
default: Hello World
description: A message to echo
builders:
- shell: "echo $Message"
@consoledotblog
consoledotblog / jjb_execution.sh
Created January 14, 2016 20:09 — forked from jamesggraf/jjb_execution.sh
Execute your jenkins job builder job
#!/usr/bin/env bash
sudo jenkins-jobs update hello_world.yml
@consoledotblog
consoledotblog / hello-world.dsl
Created January 14, 2016 20:09 — forked from jamesggraf/hello-world.dsl
Job DSL Hello World
job {
name 'hello-world'
steps {
shell('echo "Hello World!"')
}
}
//IMPORTANT NOTE!!!: Name this file "job-generation.dsl". Github's gist tool uses the file extension to establish syntax highlighting rules
@GrabResolver(name="repo.jenkins-ci.org",root='http://repo.jenkins-ci.org/public/')
@Grapes([
@Grab(group='org.kohsuke', module='github-api', version='1.59')
])
import static hudson.security.ACL.SYSTEM
import com.cloudbees.plugins.credentials.CredentialsProvider
@consoledotblog
consoledotblog / job-generator.yml
Last active January 14, 2016 20:09 — forked from jamesggraf/job-generator.yml
Jenkins Job Builder with Job DSL
---
- job:
name: job-generator
builders:
- dsl:
script-text:
!include-raw hello-world.dsl
@consoledotblog
consoledotblog / collection_init.java
Created February 26, 2016 19:23 — forked from jmccance/collection_init.java
Overcoming Immutability in Scala
final List<String> fullNames = new ArrayList<>();
for (Name name : names) {
fullNames.add(String.format("%s %s", name.getFirst(), name.getLast()));
}