I've got a git repository in Visual Studio Online. I set up an Azure Website and connected it to the git repository. This creates a build definition meaning that when I push changes to Visual Studio Online they are built and deployed to the Azure Website.
I now want to be able to redeploy an earlier build. I can view the deployments in the Azure portal, but when I click the redeploy button I get the following message:
"The build 'escc_CD_20131216.4' failed with '{1}'"
Then I click "details" and see:
"Cannot redeploy a build that was a gated check-in, private build, batched multiple requests, or with a source get version which is not a changeset."
- The build and deploy process runs automatically on push, so it's not a gated check-in.
- Private build seems to be a TFS thing where you build without checking in, but these are committed changes in git, so I don't think that's it either.
- It could be batched multiple requests but I'm not doing that deliberately. Could this mean multiple commits, or is it something different?
- A changeset again is TFS terminology. I think this means if you queue a build and then make further changes before the build actually starts, the "source get version" (ie what it found when it went to build) is not the original commit ("changeset"). But I'm doing one commit and build at a time, so I'm not sure how this would be the problem.
Can anyone help?
It's a smallish workaround, but the simplest way to do this would be to create a branch that points to the commit you're interested in and push that branch to VSO.
Once that's done either clone the build or adjust the existing build definition. Set the Source Settings and Default Branch values to use the new branch, i.e. refs/heads/YourBranchNameHere.