Hello. I wiant than bamboo commit changes after build. So I add script file like this:
'git commit -a -m "${bamboo.buildKey} ${bamboo.buildNumber}"
git push origin development'
But iot's not do it. Error is [detached HEAD 8943e60] So. This is simply question. How can i commit changes in bamboo task script job?
I wrote this guide specifically for tagging a commit and pushing back to Stash (BitBucket), but it should be easily adaptable. https://almfirst.wordpress.com/tagging-from-bamboo/
It's surprisingly not as simple as you'd think, as far as I've been able to figure out, because of the somewhat funky way that Bamboo does git and because the build may actually be running on an agent that doesn't share the SSH set up that the server itself uses.
Ok. In the actual source? Usually I've seen that as just tags, but I can see the use case for wanting it to be in the source as well.
I wrote a guide to tagging a commit and pushing it back to BitBucket. I'll page a link as an answer - I think it should be easily adaptable to your situation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not bad practice. Release version and build number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That sounds like generally bad practice - what changes are you making to your source within your build that you want to commit back into source control?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.