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
class MyRunnable implements Runnable { | |
// Create class properties we can set | |
private String message; | |
// Create Constructor - can customise | |
// what's set when we create a new instance | |
public MyRunnable(String message) { | |
// Set class properties y | |
// when we create the a new instance of the class |
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
String agentList = "" | |
String agentPrefix = "Ubuntu" | |
Integer total = 0 | |
Integer oftype = 0 | |
Integer deleted = 0 | |
// Go through nodes and build a list of agents matching the supplied online/offline booleans | |
Jenkins.instance.nodes.each { | |
//println "Checking agent: $it.nodeName" | |
if (it.nodeName.contains(agentPrefix)){ |
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
String agentList = "" | |
String agentPrefix = "example" | |
Integer agentTotal = 0 | |
Integer ofType = 0 | |
Integer ofDeleted = 0 | |
// Go through nodes and build a list of agents matching the supplied online/offline booleans | |
Jenkins.instance.nodes.each { | |
//println "Checking agent: $it.nodeName" | |
if (it.nodeName.contains(agentPrefix)){ |
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 jenkinsci/jnlp-slave | |
USER root | |
RUN apt-get update && apt-get install whatever | |
USER jenkins | |
ENTRYPOINT ["jenkins-slave"] |
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
package com.example.jenkins.agents | |
void example(){ | |
echo "example running" | |
} | |
return this |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.define "workstation" do |ws| | |
ws.vm.hostname = "workstation" | |
ws.vm.network "private_network", type: "dhcp", virtualbox__intnet: "lab" |
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
import org.yaml.snakeyaml.Yaml | |
Yaml yaml = new Yaml() | |
def plugins = Jenkins.instance.pluginManager.plugins | |
def output = [] | |
def dependencies = [] | |
plugins.each { p -> | |
// println p.getProperties().toString() | |
def name = p.shortName | |
def version = p.version |
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
import org.jenkinsci.plugins.saml.* | |
def sr = Jenkins.getInstance().getSecurityRealm() | |
println sr.loadUserByUsername("keyser.soze") | |
println sr.dump() |
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 python | |
import os | |
import json | |
import argparse | |
from pprint import pprint | |
from ConfigParser import SafeConfigParser | |
HOME = os.environ['HOME'] | |
PROFILE = os.environ['AWS_DEFAULT_PROFILE'] |
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
ephemeral_block_device { | |
device_name = "xvdb" | |
virtual_name = "ephemeral0" | |
} |
NewerOlder