-
Notifications
You must be signed in to change notification settings - Fork 3
Jenkins to CloudBees
bootstraponline edited this page May 26, 2016
·
3 revisions
1. Visit job config, check Trigger builds remotely (e.g., from scripts), provide an authentication token, then Save
2. Visit https://YOURACCOUNT.ci.cloudbees.com/me/configure and press Show API Token...
3. URL encode your email address via Chrome dev tools console.
encodeURIComponent("test+test@gmail.test")
"test%2Btest%40gmail.test"
4. Construct curl command. Replace 000 with your API token. Replace email and your account with your email and cloudbees subdomain.
export CLOUDBEES="https://test%2Btest%40gmail.test:00000000000000000000000000000000@YOURACCOUNT.ci.cloudbees.com"
export JOB_TOKEN=123
export COMMIT=456
curl -X POST "$CLOUDBEES/job/your-job-name/build?token=$JOB_TOKEN&cause=$COMMIT" -v
File.open('/tmp/jobs.txt', 'w') do |txt|
Dir.glob('/path/to/.jenkins/jobs/*/*') do |f|
puts "File: #{f}"
txt.puts f if ['config.xml', 'nextBuildNumber'].include? File.basename(f)
end
endtar czPf jobs.tar -T /tmp/jobs.txt scp username@the.example.com:/tmp/jobs.tar .The OPE must be set the -persistent flag to be configurable with the Nodes Plus plugin.