#How to run these commands
curl -L https://raw.github.com/gist/3085368/_base-setup.sh | sudo bash -s sudo su -l jenkins curl -L https://raw.github.com/gist/3085368/_jenkins-user-setup.sh | bash -s
#How to run these commands
curl -L https://raw.github.com/gist/3085368/_base-setup.sh | sudo bash -s sudo su -l jenkins curl -L https://raw.github.com/gist/3085368/_jenkins-user-setup.sh | bash -s
#!/usr/bin/env bash | |
# | |
# Invoke this bootstrap using: | |
# bash < <(curl -s -L https://raw.github.com/gist/5813672/bootstrap-ansible.sh) | |
# (this should be run as root) | |
# | |
# move to working dir. | |
cd /tmp | |
#Creates a new issue with custom fields | |
curl -D- -u uname:pass -X POST --data "{\"fields\": {\"project\": { \"id\": \"10430\" },\"summary\": \"This is a test issue\", \"description\": \"Description\",\"issuetype\": { \"id\" : \"1\"}, \"components\" : [{\"id\":\"10731\"}], \"customfield_10711\" : [{\"id\":\"10500\"}] } }" -H "Content-Type: application/json" http://localhost:8080/jira/rest/api/2/issue/ | |
#Returns all information for all versions | |
curl -D- -u uname:pass -X PUT -d "Content-Type: application/json" http://localhost:8080/jira/rest/api/2/project/AN/versions? | |
#Returns all issues in a version | |
#This URL requires the version ID of a single version which is provided by the above query | |
curl -D- -u uname:pass -X PUT -d "Content-Type: application/json" http://localhost:8080/jira/rest/api/2/search?jql=project="AN"+AND+fixVersion='12345' |
Host github.com | |
User git | |
HostName ssh.github.com | |
Port 443 | |
ProxyCommand /usr/bin/connect -S socks.yourdomain.com:port %h %p | |
IdentityFile ~jenkins/.ssh/id_rsa |
/*** BEGIN META { | |
"name": "List GIT Branches", | |
"comment": "You can use this to fill up a dynamic list parameter with branches. Optionally, you can filter the branches to show.", | |
"parameters": [ 'FILTER', 'REMOTE' ], | |
"core": "1.580", | |
"authors": [ | |
{ name : "Jan Vansteenkiste" } | |
] | |
} END META**/ |
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
def triggeredBy = "---" | |
def iterateCause(b) { | |
upstreamcause = b.getCause(hudson.model.Cause.UpstreamCause.class) | |
if (upstreamcause != null) { | |
job = Jenkins.getInstance().getItemByFullName(upstreamcause.getUpstreamProject(), hudson.model.Job.class) | |
if (job != null) { | |
upstream = job.getBuildByNumber(upstreamcause.getUpstreamBuild()) | |
if (upstream != null) { | |
iterateBuild(upstream) |
#!groovy | |
/* | |
Automatically configure the docker cloud in Jenkins. | |
Tested with: | |
- {name: 'docker-plugin', ver: '0.16.0'} | |
*/ | |
import jenkins.model.*; |
$files = Get-ChildItem "app*.config" -Recurse | |
$find = 'some-string-to-find' | |
$replace = 'some-string-to-replace-with' | |
Get-ChildItem $files -Recurse | | |
select -ExpandProperty fullname | | |
foreach { | |
If(Select-String -Path $_ -SimpleMatch $find -quiet){ |