Createing job through CLI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Createing job through CLI

mcraig88
Hello,

I am using the Jenkins CLI to pull down a list of 'template' jobs, search and replace for our release version, then "create" a job using the job XML which I have pulled from Jenkins.

The template job uses "promoted builds" plugin to have CI, "Directed Build", ReleaseCandidate, ReleasetoProduction promotion steps.

However, when I pull down the template job description, do my replace, and perform the Create, I'm not getting the Promoted Builds configuration included in the new job.

I have wrapped all of the Java CLI calls in Powershell, I'd be happy to send out the script if someone would like to look at it.

Otherwise, any ideas how I can get a New Job created and include the Promoted Builds configuration?

Note: To fix this I have manually copied the following folders from the template job to my new job:
promotions\CI-Complete
promotions\DirectedBuild
promotions\QA-Ready
promotions\Release
promotions\ReleaseCandidate
promotions\ReleaseToProduction
promotions\CI-Complete\config.xml
promotions\CI-Complete\nextBuildNumber
promotions\DirectedBuild\config.xml
promotions\DirectedBuild\nextBuildNumber
promotions\QA-Ready\config.xml
promotions\QA-Ready\nextBuildNumber
promotions\Release\config.xml
promotions\Release\nextBuildNumber
promotions\ReleaseCandidate\config.xml
promotions\ReleaseCandidate\nextBuildNumber
promotions\ReleaseToProduction\config.xml
promotions\ReleaseToProduction\nextBuildNumber

I would think the CLI Create command would do all of this.

Thank you.

Mike

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
jv
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Createing job through CLI

jv
copy-job and update-job. Copy-job will copy all promotions. This is what we are doing[1].

[1] https://github.com/hzh/create-job-cli

Am 02.07.2014 20:48, schrieb Mike Craig:
Hello,

I am using the Jenkins CLI to pull down a list of 'template' jobs, search and replace for our release version, then "create" a job using the job XML which I have pulled from Jenkins.

The template job uses "promoted builds" plugin to have CI, "Directed Build", ReleaseCandidate, ReleasetoProduction promotion steps.

However, when I pull down the template job description, do my replace, and perform the Create, I'm not getting the Promoted Builds configuration included in the new job.

I have wrapped all of the Java CLI calls in Powershell, I'd be happy to send out the script if someone would like to look at it.

Otherwise, any ideas how I can get a New Job created and include the Promoted Builds configuration?

Note: To fix this I have manually copied the following folders from the template job to my new job:
promotions\CI-Complete
promotions\DirectedBuild
promotions\QA-Ready
promotions\Release
promotions\ReleaseCandidate
promotions\ReleaseToProduction
promotions\CI-Complete\config.xml
promotions\CI-Complete\nextBuildNumber
promotions\DirectedBuild\config.xml
promotions\DirectedBuild\nextBuildNumber
promotions\QA-Ready\config.xml
promotions\QA-Ready\nextBuildNumber
promotions\Release\config.xml
promotions\Release\nextBuildNumber
promotions\ReleaseCandidate\config.xml
promotions\ReleaseCandidate\nextBuildNumber
promotions\ReleaseToProduction\config.xml
promotions\ReleaseToProduction\nextBuildNumber

I would think the CLI Create command would do all of this.

Thank you.

Mike

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Createing job through CLI

Adam Levine
In reply to this post by mcraig88
Promoted build has a special subfolder, promotions, in the same dir as the config.xml.  In the promotions directory, there is a directory for each promotion name/stage, each with a config.xml.   It's quite possible those subfolders are not being copied over because they're a one-off.



On Wednesday, July 2, 2014 at 1:48:35 PM UTC-5, Mike Craig wrote:
Hello,

I am using the Jenkins CLI to pull down a list of 'template' jobs, search and replace for our release version, then "create" a job using the job XML which I have pulled from Jenkins.

The template job uses "promoted builds" plugin to have CI, "Directed Build", ReleaseCandidate, ReleasetoProduction promotion steps.

However, when I pull down the template job description, do my replace, and perform the Create, I'm not getting the Promoted Builds configuration included in the new job.

I have wrapped all of the Java CLI calls in Powershell, I'd be happy to send out the script if someone would like to look at it.

Otherwise, any ideas how I can get a New Job created and include the Promoted Builds configuration?

Note: To fix this I have manually copied the following folders from the template job to my new job:
promotions\CI-Complete
promotions\DirectedBuild
promotions\QA-Ready
promotions\Release
promotions\ReleaseCandidate
promotions\ReleaseToProduction
promotions\CI-Complete\config.xml
promotions\CI-Complete\nextBuildNumber
promotions\DirectedBuild\config.xml
promotions\DirectedBuild\nextBuildNumber
promotions\QA-Ready\config.xml
promotions\QA-Ready\nextBuildNumber
promotions\Release\config.xml
promotions\Release\nextBuildNumber
promotions\ReleaseCandidate\config.xml
promotions\ReleaseCandidate\nextBuildNumber
promotions\ReleaseToProduction\config.xml
promotions\ReleaseToProduction\nextBuildNumber

I would think the CLI Create command would do all of this.

Thank you.

Mike

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1909616e-e371-4be6-b8d4-59d63923980e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Createing job through CLI

Adam Levine
In reply to this post by mcraig88
oops, didn't realize I posted on a 3yr old thread.

On Wednesday, July 2, 2014 at 1:48:35 PM UTC-5, Mike Craig wrote:
Hello,

I am using the Jenkins CLI to pull down a list of 'template' jobs, search and replace for our release version, then "create" a job using the job XML which I have pulled from Jenkins.

The template job uses "promoted builds" plugin to have CI, "Directed Build", ReleaseCandidate, ReleasetoProduction promotion steps.

However, when I pull down the template job description, do my replace, and perform the Create, I'm not getting the Promoted Builds configuration included in the new job.

I have wrapped all of the Java CLI calls in Powershell, I'd be happy to send out the script if someone would like to look at it.

Otherwise, any ideas how I can get a New Job created and include the Promoted Builds configuration?

Note: To fix this I have manually copied the following folders from the template job to my new job:
promotions\CI-Complete
promotions\DirectedBuild
promotions\QA-Ready
promotions\Release
promotions\ReleaseCandidate
promotions\ReleaseToProduction
promotions\CI-Complete\config.xml
promotions\CI-Complete\nextBuildNumber
promotions\DirectedBuild\config.xml
promotions\DirectedBuild\nextBuildNumber
promotions\QA-Ready\config.xml
promotions\QA-Ready\nextBuildNumber
promotions\Release\config.xml
promotions\Release\nextBuildNumber
promotions\ReleaseCandidate\config.xml
promotions\ReleaseCandidate\nextBuildNumber
promotions\ReleaseToProduction\config.xml
promotions\ReleaseToProduction\nextBuildNumber

I would think the CLI Create command would do all of this.

Thank you.

Mike

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/92e9bf95-5d1a-4820-ac50-10e20545eb3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...