Reputation: 131
I'm trying to figure out how to configure TeamCity build steps to accomplish the following tasks:
That seems simple enough to do, but I the interaction between steps 1 and 2 is what I don't know how to do. If I use server-side checkout for step 2 it will pull the source from the server and not use my changes in step 1. If I user agent-side checkout, my understanding is that it will create a new workspace and pull the source from the server, again not using my changes in step 1.
Is there a way I can make step 2 build with the pending changes created in step 1? The only other option I can think of is to check in the changes after step 1 and rollback the changeset in step 4 if the build fails. In that case though, how would step 4 know the changeset to rollback?
Also I have one smaller question, how can I pass the success of the build as a parameter to step 4? I looked through the built-in parameters but I didn't one for build failure/success?
Thanks!
Upvotes: 1
Views: 2040
Reputation: 3739
It would be useful if you could give the VCS name you are using(Git/SVN). I see you question is mainly on 2 main points
So, in short your build steps can (1) checkout a branch, (2) merge another branch into it , (3) run build and db deploy, and then (4) commit your code /rollback your db changes if it fails based on a failure file.
For your second question, each teamcity step knows the success status of the entire build and the previous steps as mentioned here . The only step missing is " run step if any of the previous step failed"
Upvotes: 1