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
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: nfs-client-provisioner | |
spec: | |
replicas: 1 | |
strategy: | |
type: Recreate | |
template: | |
metadata: |
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: ServiceAccount | |
metadata: | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
app: cluster-autoscaler | |
name: cluster-autoscaler | |
namespace: kube-system | |
--- |
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
for (cause in currentBuild.rawBuild.getCauses()) { | |
if (cause instanceof Cause.UpstreamCause) { | |
def upstreamProjectName = cause.getUpstreamProject() | |
echo upstreamProjectName | |
def job = hudson.model.Hudson.instance.getItem(upstreamProjectName) | |
def build = job.getBuildByNumber(cause.getUpstreamBuild()) | |
echo build.buildVariableResolver.resolve("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 com.cloudbees.opscenter.analytics.reporter.items.AnalyticsJobProperty | |
def createdDateCompare = Date.parse("MM/dd/yyyy","05/25/2016") | |
jobs = Jenkins.instance.getAllItems(); | |
def numberOfWorkflowJobs = 0 | |
jobs.each { j -> | |
if (j instanceof org.jenkinsci.plugins.workflow.job.WorkflowJob) { | |
def analyticsJobProperty = (AnalyticsJobProperty)j.getProperty(AnalyticsJobProperty.class) | |
if(analyticsJobProperty != null && analyticsJobProperty.created < createdDateCompare.time) { |
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
#!/bin/bash | |
set -e | |
UPDATES_URL="http://updates.jenkins-ci.org/download/plugins/" | |
if [ $# -lt 2 ]; then | |
echo "USAGE: $0 plugin-list-file destination-directory" | |
exit 1 | |
fi |
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
/*** BEGIN META { | |
"name" : "Count executors", | |
"comment" : "Shows the total number of nodes and executors on Jenkins", | |
"parameters" : [ ], | |
"core": "1.350", | |
"authors" : [ | |
{ name : "Andy Pemberton" } | |
] | |
} END META**/ | |
import jenkins.model.Jenkins |
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
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
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
/* | |
Author: Gary Clayburg | |
This file allows IntelliJ IDEA to perform basic syntax checking and code completion for | |
Jenkins workflow groovy scripts. https://github.com/jenkinsci/workflow-plugin | |
These methods are supported | |
sh | |
readFile | |
node | |
echo |
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.* | |
def payloadString = build.buildVariableResolver.resolve("payload") | |
payloadObject = new groovy.json.JsonSlurper().parseText(payloadString) | |
targetCommit = payloadObject.pull_request.head.sha | |
build.addAction(new ParametersAction(new StringParameterValue('targetCommit', targetCommit))) |