Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bypass cached repository when pushing

Magnus Granander November 7, 2013

Hi!

I'm having issues with doing Git push for both tags and commits when using a cached repository setup in Bamboo.

The scenario:

We are using a child plan that builds our application. During the bild we generate files and create tags. Both pushing the commits and the tags seem to work (no errors), but never show up in the logs at the remote (Stash). Found this in the logs:

build	08-Nov-2013 12:51:13	version  DONE pushing commit
build	08-Nov-2013 12:51:13	tagging  #################################################################
build	08-Nov-2013 12:51:13	tagging  Starting tagging
build	08-Nov-2013 12:51:13	tagging  
build	08-Nov-2013 12:51:13	tagging  -*- EXECUTING: git tag -a -mAuto-Release-Build-b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4-based-on-feature/DEV-10171-update-build-script-to-use-alternative b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4
build	08-Nov-2013 12:51:13	tagging  
build	08-Nov-2013 12:51:13	tagging  DONE creating vcs tag b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4
build	08-Nov-2013 12:51:13	tagging  
build	08-Nov-2013 12:51:13	tagging  -*- EXECUTING: git push --tags
build	08-Nov-2013 12:51:13	tagging  
error	08-Nov-2013 12:51:13	To file:///opt/atlassian/application-data/bamboo-agent/xml-data/build-dir/_git-repositories-cache/1c07087b9ce946f558f8dfc5679a2dbd3342378b
error	08-Nov-2013 12:51:13	 * [new tag]         b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4 -> b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4
build	08-Nov-2013 12:51:13	tagging  DONE pushing tag

The line with "To file://..." caught my eye. To me it looks like the push is done to the cache, and not to the actual remote.

So my question is this, is there a way to bypass/specify not to use the cache when pushing?

2 answers

1 vote
Manuel Mall November 8, 2013

We had what I think is a similar issue and the instructions in https://confluence.atlassian.com/display/BAMKB/Merging+and+pushing+to+remote+repository+fails did help us.

0 votes
Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 7, 2013

Have you tried specifying repository url? as in: git push <options> [repositoryUrl]

See also: https://www.kernel.org/pub/software/scm/git/docs/git-push.html

You can get repository url from variable: ${bamboo.planRepository.<repositoryNumber>.repositoryUrl}

where repositoryNumber is position of the repo in plan's repository list. (you can omit this for default repository)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events