If you're set on having the "git push" inside your build script, couldn't
you also use your build script to configure the master branch remote and
merge?

Alternately, you could include the setting of the remote into your "git
push" command line by adding the "--set-upstream" argument to the push
command.

The git plugin includes a git publisher post build action which can push
changes for you, if you'd rather use the plugin to perform the push.

Mark Waite

On Tue, Nov 18, 2014 at 3:11 PM, Rob Sargent <[email protected]> wrote:

> We would like to update the build number in our build.gradle file after
> each successful build.
>
> Unfortunately it appears that jenkins clone of the git repo does not
> include the branch block
> [branch "master"]
>  remote = origin
>  merge = refs/heads/master
> we find when we do a manual check out.
>
> As such, the 'git push' line in our post build script finishes with
>
> + git push
> Everything up-to-date
>  > git tag -l jenkins-jpsgcs-core-51 # timeout=10
>  > git tag -a -f -m Jenkins Build #51 jenkins-jpsgcs-core-51-SUCCESS # 
> timeout=10
> Finished: SUCCESS
>
> and the central repo is never updated. (The developers do not see an
> updated build.gradle.)
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" 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/d/optout.
>



-- 
Thanks!
Mark Waite

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" 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/d/optout.

Reply via email to