afaik you can configure the git-plugin to checkout a commit passed as paramter, setting it as "branch"
2013/2/5 Johannes Schirrmeister <[email protected]> > Hi Nicolas, > > Thanks for getting back to me. My build flow is indeed triggered by SCM so > I could come up with this workaround for now: > > Using the build flow DSL, I first retrieve the GIT_COMMIT value and then > pass it as a parameter for all following builds. > revision = build.properties["environment"]["GIT_COMMIT"] > build("pipeline-start", GIT_COMMIT: revision) > [...] > > What makes this a little messy is the extra build step "git checkout > $GIT_COMMIT" I have to add for every job. Do you or anyone else on this > list see a chance to communicate the GIT_COMMIT value to the Git plugin > directly? (Somehow overwriting the GIT_COMMIT environment variable so the > plugin would checkout that revision before the build is executed...?) > > > On Tue, Feb 5, 2013 at 11:04 AM, nicolas de loof <[email protected] > > wrote: > >> if you configure the build-flow itself to be triggered by SCM you may >> pass GIT_COMMIT to triggered jobs, never tried this. >> >> I expected you could also retrieve this commit revision from >> SCMRevisionState action, but git-plugin don't use this API (sic) >> >> 2013/2/4 Johannes Schirrmeister <[email protected]> >> >>> Hi everyone, >>> >>> The Build Flow Plugin seems like a great way to orchestrate our build >>> pipelines. I would like to ask if there is any best practice on how to >>> ensure that all jobs in one pipeline checkout the same revisions of a Git >>> repository. >>> >>> I believe the Git plugin initially sets the GIT_COMMIT environment >>> variable and this value would have to be injected into the environments for >>> all builds before they are run. >>> >>> I'd greatly appreciate your feedback, thank you! >>> Johannes >>> >>> -- >>> 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]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> 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]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
