I am not sure the stages you are talking about are same as what Jenkins Pipelines calls stages.
Jenkins, at its core, is a job server. In Pipelines, a stage is a segment of a job. Stages of a build job would be something like "Build Binaries" or "Upload Build Artifacts" - something that is part of one logical job. What you are talking is a deployment process which is really a separate job from a build job, and not really a "stage" of build. So, my approach would be (and is, in some cases): * Set up a Pipeline build for the develop branch * Make sure the build job archives either deployment artifact(s) or pointer to them - something that can be used for deployment. * Set up a separate deployment job (can also be Pipeline) that takes in parameters for a build run and target environment (stage, QA, UA, PreProd, Production, whatever), and grabs artifacts/pointers from the selected run and performs a deployment Now, if you want to get fancy, you make that first "build" job a MultiBranch job that builds both develop and some versions of the feature branches (I've used /feature/build/* pattern) and then modify the selection of the job run to select from multiple branches (need to write a Groovy based Parameter selector for that) - and now you can deploy builds from feature branches for testing BEFORE they are merged into develop HTH, -M On Wednesday, October 26, 2016 at 4:21:23 AM UTC-7, Sathyakumar Seshachalam wrote: > > New to Jenkins pipeline. > > My process is that developers work off of develop branch (Feature branches > and merges of-course). > At any point in time, a release branch is branched off of develop and > then deployed to a stage environment, Once Accepted/approved, the same > release branch is deployed into prod. (All immutable deployments). > > So am looking at atleast two stages that are only conditionally and > manually entered - stages being deploy to stg, deploy to prod and > condition being the branch prefix. (Each stage will have build steps like > deploy binaries, launch, run functional tests etc.,) and an automatic stage > that is triggered only once per day (nightly) with build steps like deploy > binaries, lunch, run and tear down). > > Is this kind of a workflow feasible with pipelines. If yes, Are there any > recommendations/suggestions/pointers. > > Thanks, > Sathya > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8cfea0f2-bd05-4aac-ab89-21ce5cf21cda%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
