How to reset Kudu cached deployment on Azure
<p>I previously had a Node app on Azure Web App that is now a Go app. Problem is when I deploy I get this from Kudu:</p>

<p><code>Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --node --sitePath "D:\home\site\repository"').</code></p>

<p>This obviously complains later that no server/app.js file are found.</p>

<p>So I tried generating a deployment script for my app with <code>azure site deploymentscript --go</code>.</p>

<p>Even though I have the GO15VENDOREXPERIMENT=1 in the app's settings it was complaining about dependencies. All my dependencies are vendored in the /vendor folder.</p>

<p>I than set this variable inside the <code>deploy.cmd</code> file that were generated by the <code>azure site deploymentscript</code> command.</p>

<p>Still it's complaining that one dependencies is not there. Note that now it is searching into the local vendor tree, but the dependencies is there, I can see it in the Github repo and I see it locally as well.</p>

<p>I have other Go apps that deployed just fine with vendored dependencies on Azure, but this one, was a Node app previously is simply not working at all.</p>

<p>I even tried to comment the dependencies getter from the <code>deploy.cmd</code>, since all are local this steps is not required. But even that did not work, because the <code>go build</code> failed complaining about the dependency not being there. It's on the vendor folder and <code>GO15VENDOREEXPERIMENT</code> is set to 1 in the cmd file and in the app application settings.</p>

<p>So what are my option here?</p>

<p>How can I tell Kudu to use a Go default deployment, maybe the one from Azure will work, since my other app do not have local <code>.deployement</code> and <code>deploy.cmd</code> files.</p>

<p>Edit</p>

<p>I just did a test deploy to a completely new Azure web app, and the app is detected as a Node app by default. I would guess it's due to the presence of a package.json at the root, I also have a main.go that has <code>package main</code> as package name.</p>

<p>So maybe it's just the <code>deploy.cmd</code> that is generated by <code>azure site deploymentscript</code> that is not up-to-date or something? (I updated my verison of the azure-cli just FYI, since at first I did not had the --go flag).</p>

<p>Just for completeness here's the output of Kudu when deploying on a freshly created app, getting same error as the Node one:</p>

<p><code>
remote: Resolving dependencies
remote: # cd .; git clone https://github.com/org/mypkg D:\local\Temp\8d3397e1e014401\gopath\src\github.com\org\mypkg
remote: Building Go app to produce exe file
remote: Cloning into 'D:\local\Temp\8d3397e1e014401\gopath\src\github.com\org\mypkg'...
remote: fatal: could not read Username for 'https://github.com': Bad file descriptor
remote: package github.com/org/pkg/lib: exit status 128
remote: azureapp\main.go:3:8: cannot find package "github.com/org/pkg/lib" in any of:
remote:         D:\local\Temp\8d3397e1e014401\gopath\src\azureapp\vendor\github.com\org\pkg\lib (vendor tree)
remote: Copy files for deployment
remote:         D:\Program Files\Go\1.5.3\src\github.com\org\pkg\lib (from $GOROOT)
remote:         D:\local\Temp\8d3397e1e014401\gopath\src\github.com\org\pkg\lib (from $GOPATH)
remote: KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
remote: Could Not Find D:\home\site\repository\azureapp.exe
remote: Copy web.config
remote: web.config already existed. Skip
remote: Finished successfully.
remote: Running post deployment command(s)...
remote: Deployment successful.
</code></p>

<p>Why is it trying to clone the library, this line here [second line] is probably what cause the entire issue:</p>

<p><code>remote: # cd .; git clone https://github.com/org/mypkg</code></p>

<p>Why if <code>SET GO15VENDOREXPERIMENT=1</code> is set it is trying to clone the dependency? It's not doing that on my other Go app.</p>