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 hudson.model.* | |
import jenkins.model.* | |
/** This script attempts to disable ALL jobs ONLY ONCE | |
* It uses JENKINS_HOME/disableAllJobs.done as the control file | |
*/ | |
File controlFile = new File(Jenkins.instance.getRootDir(), "disableAllJobs.done") | |
if (controlFile.exists()) { | |
println("Disable All Jobs ALREADY completed: " + controlFile.getAbsolutePath() + " exists...") | |
} else { |
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 | |
############################################### | |
# | |
# This script compare plugin name and versions | |
# between a local installation of Jenkins | |
# and the CCI Update Center versions | |
# | |
############################################## |
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
podTemplate(name: 'continous-infra-slave', label: 'continous-infra-slave', cloud: 'openshift', | |
containers: [ | |
// This adds the custom slave container to the pod. Must be first with name 'jnlp' | |
containerTemplate(name: 'jnlp', | |
image: '172.30.1.1:5000/continuous-infra/jenkins-continuous-infra-slave', | |
ttyEnabled: false, | |
args: '${computer.jnlpmac} ${computer.name}', | |
command: '', | |
workingDir: '/tmp'), | |
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
podTemplate(name: 'some-slave', label: 'some-slave', cloud: 'openshift', serviceAccount: 'jenkins', | |
containers: [ | |
// This adds the custom slave container to the pod. Must be first with name 'jnlp' | |
containerTemplate(name: 'jnlp', | |
image: '172.30.1.1:5000/continuous-infra/jenkins-continuous-infra-slave:latest', | |
ttyEnabled: false, | |
args: '${computer.jnlpmac} ${computer.name}', | |
command: '', | |
workingDir: '/tmp'), | |
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
def map = readProperties file: 'fedmsg_properties.txt' | |
def fedmsg_properties = map.collect { key, value -> return key+'='+value } | |
withEnv(fedmsg_properties) { | |
echo "${env.SCOTT}" | |
} |
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
apiVersion: v1 | |
kind: BuildConfig | |
metadata: | |
annotations: | |
openshift.io/generated-by: OpenShiftNewApp | |
creationTimestamp: 2017-08-10T18:54:27Z | |
labels: | |
app: rpmbuild-builder | |
template: rpmbuild-builder | |
name: rpmbuild |
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
# install httpie | |
# determine delta in secs...2 days == 172800 | |
# http get https://apps.fedoraproject.org/datagrepper/raw topic=="org.fedoraproject.prod.git.receive" delta==172800 contains=="d1d2322" --timeout 3600 | |
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.scriptsecurity.scripts.* | |
ScriptApproval sa = ScriptApproval.get(); | |
//Add a signature to the list | |
signature = "staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods last java.lang.Iterable" | |
ScriptApproval.PendingSignature s = new ScriptApproval.PendingSignature(signature, false, ApprovalContext.create()) | |
sa.approveSignature(s.signature); |
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 hudson.model.User; | |
import jenkins.security.ApiTokenProperty; | |
import hudson.util.Secret; | |
// Get the actual token | |
u = User.get("system_serviceaccount_rhproduct_jenkins-admin") | |
tokprop = u.getProperty(ApiTokenProperty.class) | |
actual_token = tokprop.getApiTokenInsecure() |
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
<html> | |
<body> | |
<div style="font-family: Courier; | |
padding: 5px; | |
background-color: #00008B; | |
color: white; | |
font-size: xx-large; | |
margin-bottom: 15px; | |
font-weight: bold; |
OlderNewer