tag:help.appveyor.com,2012-11-13:/discussions/problems/15902-ubuntu-image-builds-fail-when-git-history-rewrittenAppVeyor: Discussion 2018-10-19T08:18:52Ztag:help.appveyor.com,2012-11-13:Comment/459367372018-08-20T23:48:49Z2018-08-20T23:48:49ZUbuntu image builds fail when git history rewritten<div><p>Seems that it is a BitBucket Pull Request, right? And you are probably see this only on PR builds, correct?</p>
<p>Support for BitBucket PRs just recently implemented for Windows, Linux agent support is in test right now. We will deploy Linux support during next couple of weeks. Please watch <a href="https://github.com/appveyor/ci/issues/736">this</a> GitHub issue. Linux support is the only last thing which holds us from closing it.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459367372018-08-21T00:21:59Z2018-08-21T00:21:59ZUbuntu image builds fail when git history rewritten<div><p>Ah I see.<br>
Is there a way to disable Pull Request builds only for the linux image?</p></div>ztsmithtag:help.appveyor.com,2012-11-13:Comment/459367372018-08-21T01:46:37Z2018-08-21T01:46:37ZUbuntu image builds fail when git history rewritten<div><p>There is not clean way to do that, but you can forcibly terminate Linux PR build with success by adding the following PS script at <code>init</code> stage:<br></p>
<pre>
<code>if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $isLinux) {Exit-AppveyorBuild}</code>
</pre></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459367372018-08-21T01:53:46Z2018-08-21T01:53:46ZUbuntu image builds fail when git history rewritten<div><p>Update: if you have GitHub repos too (where PRs are fully supported), you may consider adding <code>APPVEYOR_REPO_PROVIDER</code> <a href="https://www.appveyor.com/docs/environment-variables/">environment variable</a> to the condition.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459367372018-08-22T23:09:34Z2018-08-22T23:09:34ZUbuntu image builds fail when git history rewritten<div><p>You can disable this workaround. BitBucket PR build should work on Ubuntu now.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459367372018-08-29T09:26:52Z2018-08-29T09:26:52ZUbuntu image builds fail when git history rewritten<div><p>Thanks, everything is working great, even with the workaround removed.</p></div>ztsmith