This file contains hidden or 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 | |
useradd -s /bin/bash -m unprivileged | |
cp -rf ~/.ssh ~unprivileged/ | |
chown -R unprivileged:unprivileged ~unprivileged/.ssh/ |
This file contains hidden or 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 -eu | |
# Load SWF functions | |
source /home/swfcommons/bin/swfcommons-functions.sh | |
# Initialize our script | |
swf_init_script $0 | |
swf_init_var | |
# Get config (use this for environment specific settings) | |
swf_load_env |
This file contains hidden or 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
# Needs to match the linux version used in jenkins-master | |
FROM debian:jessie | |
MAINTAINER Robert Watkins | |
# user 1000 must match the user id for the jenkins user in jenkins-master | |
RUN useradd -d "/var/jenkins_home" -u 1000 -m -s /bin/bash jenkins | |
RUN mkdir -p /var/log/jenkins | |
RUN chown -R jenkins:jenkins /var/log/jenkins |
This file contains hidden or 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
#!groovy | |
// imports | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.Domain | |
import com.cloudbees.plugins.credentials.impl.* | |
import hudson.util.Secret | |
import java.nio.file.Files |
This file contains hidden or 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 com.cloudbees.hudson.plugins.folder.* | |
import com.cloudbees.hudson.plugins.folder.properties.* | |
import com.cloudbees.hudson.plugins.folder.properties.FolderCredentialsProvider.FolderCredentialsProperty | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey | |
/* Let's see if the key is ed25518 */ | |
boolean checkKey(def key) { | |
boolean found = false |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
My friend Michael Jackson turned off github issues on one of his smaller projects. It got me thinking...
Maintainers getting burned out is a problem. Not just for the users of a project but the mental health of the maintainer. It's a big deal for both parties. Consumers want great tools, maintainers want to create them, but maintainers don't want to be L1 tech support, that's why they
This file contains hidden or 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
#!groovy | |
node { | |
// Need to replace the '%2F' used by Jenkins to deal with / in the path (e.g. story/...) | |
// because tests that do getResource will escape the % again, and the test files can't be found | |
ws("workspace/${env.JOB_NAME}/${env.BRANCH_NAME}".replace('%2F', '_')) { | |
// Mark the code checkout 'stage'.... | |
stage 'Checkout' | |
checkout scm | |
// Mark the code build 'stage'.... |
This file contains hidden or 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 net.harniman.workflow.jenkins | |
//import org.apache.commons.httpclient.* | |
//import org.apache.commons.httpclient.auth.* | |
import org.apache.commons.httpclient.Header | |
import org.apache.commons.httpclient.HostConfiguration | |
import org.apache.commons.httpclient.HttpClient | |
import org.apache.commons.httpclient.NameValuePair | |
import org.apache.commons.httpclient.methods.GetMethod |
NewerOlder