Hi Richard, The build cause doesn't work unfortunately because if the I manually start the build the cause is not SCM change. Also P4CHANGES variable is okay - but if one uses Git it won't work. I know that once the build is finished you can query the list of changes from the JSON or XML API. It's nested in the changeSet. Ideally I would like to be able to make a decision in the pipeline to execute or not execute a certain step based on whether or not there has been a change.
On Wednesday, 21 December 2016 13:49:24 UTC, Richard Ginga wrote: > > Peter, build cause = scm change will tell you. also many scm plugins > produce environment variables. Perforce produces P4CHANGES > > On Wed, Dec 21, 2016 at 7:11 AM, 'Peter Teichner' via Jenkins Users < > [email protected] <javascript:>> wrote: > >> Yeah - ideally at runtime in a pipeline or any other way of determining >> whether there was a code change or not? I'm aware of a variable which is >> the build cause - that could be code change but if the build was started by >> a timer or even manually than the build cause will be different. However I >> would still like to be able to find out if there was an SCM change. Any >> ideas? >> >> On Wednesday, 21 December 2016 10:51:14 UTC, Daniel Beck wrote: >>> >>> When the SCM changelog isn't empty? Or what are you asking for exactly? >>> >>> > On 21.12.2016, at 11:34, 'Peter Teichner' via Jenkins Users < >>> [email protected]> wrote: >>> > >>> > Hi there, >>> > >>> > Is anyone aware of a variable or flag that indicates whether or not >>> there has been a code change on a build? Thanks >>> > >>> > -- >>> > 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/388691f8-2db5-429b-a535-cf032a045d92%40googlegroups.com. >>> >>> >>> > 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 [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/1f086a16-7a8b-4d64-86e7-2396878739e3%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/1f086a16-7a8b-4d64-86e7-2396878739e3%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Dick Ginga > Build Engineer > [email protected] <javascript:> > > -- 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/afa6002f-31d6-4f29-83a7-50c140927ac6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
