Build Strategy

jezz.santos's Avatar

jezz.santos

01 Jan, 2016 10:31 AM

Design question - regarding AZ build definitions.

We have three build flavors that we use in our product today:

  • Debug - used on our desktops, we run tests and we have test code in the codebase for testing only purposes, and debug output and can debug it etc.
  • Release - used on CI server, we run tests and we have test code in the codebase for testing only purposes.
  • ReleaseNoTestDeploy - used on CI server, no running tests, no testing code in codebase, ready for production.

As we do today already, we run MSBUILD in the build_script step, and then execute all our tests in a test_script step on CI server using the 'Release' flavor.
Now, if that is all successful (build succeeds and all tests pass), we would want to rebuild in the 'ReleaseNoTestDeploy' flavor and then publish from same build definition. Which would imply that we would run MSBUILD again in the after_test step of the same build definition with a different flavor than before.

Does that sound like the right way to use AV build definitions?
Or is there a better approach? one where we build the ReleaseNoTestDeploy flavor only if all tests pass.

  1. Support Staff 1 Posted by Feodor Fitsner on 01 Jan, 2016 08:35 PM

    Feodor Fitsner's Avatar

    If you don't use automatic tests discovery then I think you can run everything in build_script.

  2. 2 Posted by jezz.santos on 01 Jan, 2016 09:50 PM

    jezz.santos's Avatar

    OK, sounds good, but I still need to fail the whole thing if any tests fail, and NOT execute the second build and nuget push step.

    So, should I do the second MSBUILD and nuget push in the after_test step?

  3. Support Staff 3 Posted by Feodor Fitsner on 01 Jan, 2016 10:08 PM

    Feodor Fitsner's Avatar

    Yes, you can. A failed command in any step will fail entire build.

    -Feodor

  4. jezz.santos closed this discussion on 02 Jan, 2016 11:00 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac