Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
import jenkins.model.* | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.* | |
import com.cloudbees.plugins.credentials.impl.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import org.jenkinsci.plugins.plaincredentials.* | |
import org.jenkinsci.plugins.plaincredentials.impl.* | |
import hudson.util.Secret | |
import hudson.plugins.sshslaves.* |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
import org.csanchez.jenkins.plugins.kubernetes.* | |
import jenkins.model.* | |
def j = Jenkins.getInstance() | |
def k = new KubernetesCloud( | |
'jenkins-test', | |
null, | |
'https://130.211.146.130', | |
'default', |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: