Any thoughts on why I am getting an error in build
Hello,
I am setting up a new build for the ChocolateyGUI project, and I am seeing an error reported in the build process:
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1.0.8
On line 41 of the build output.
Now, I know that NuGet is available on the Build Worker, but I like to include all dependencies in Source Code, hence why I am running NuGet from Tools folder. I am using psake to orchestrate the build steps, and I can see that this is working, as I call GitVersion.exe just before calling NuGet.exe, and this step succeeds, but for some reason, it can't find it.
Can you shed any light on why this is? Or a way to fault find this?
I have executed the build steps locally on my machine, and it works correctly.
Thanks in advance!
Gary
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
Support Staff 1 Posted by Feodor Fitsner on 17 Sep, 2014 09:25 PM
I haven't looked into build script yet, but at a glance path to nuget.exe looks weird. Shouldn't it be just ./Tools/Nuget/NuGet.exe?
-Feodor
2 Posted by gep13 on 18 Sep, 2014 05:34 AM
Hey,
That path is relative to where the build script is being run from, i.e. the BuildScripts folder, so I have to first go up a folder to find the Tools folder. I am using the same technique for the GitVersion.exe, and it is located correctly.
Gary
3 Posted by gep13 on 18 Sep, 2014 07:45 AM
I have tried a number of things to get this to work, but it is still refusing to see the NuGet.exe :-(
Is there any easy way to "see" the folder structure of the Build Worker working directory when the build is happening? It is almost as though the NuGet.exe hasn't been downloaded from GitHub. I can reproduce the error locally by deleting the NuGet.exe from that folder.
Thanks
Support Staff 4 Posted by Feodor Fitsner on 18 Sep, 2014 02:32 PM
No worries, will take a look!
-Feodor
Support Staff 5 Posted by Feodor Fitsner on 18 Sep, 2014 04:47 PM
I've made a form of the repo, but I can't see Nuget.exe in its tools folder:
https://github.com/FeodorFitsner/ChocolateyGUI/tree/develop/Tools
6 Posted by gep13 on 18 Sep, 2014 06:26 PM
Yes, but this is the part that I don't understand....
The Build was triggered as a result of a pull request, as you can see in the build output.
And the source branch for the Pull Request, does have that folder, even in your fork of the repo:
https://github.com/FeodorFitsner/ChocolateyGUI/tree/feature/Issue-1...
Am I reading the build output incorrectly? Or have I misconfigured something?
Thanks
Gary
7 Posted by gep13 on 18 Sep, 2014 06:27 PM
The pull request in question is this one:
https://github.com/chocolatey/ChocolateyGUI/pull/143
Gary
Support Staff 8 Posted by Feodor Fitsner on 18 Sep, 2014 06:37 PM
Do you have custom
Clone folder
set on project settings?9 Posted by gep13 on 18 Sep, 2014 06:41 PM
Not knowingly, no.
I created the project in AppVeyor, and then immediately started using the
appveyor.yml
file.Gary
10 Posted by gep13 on 18 Sep, 2014 06:43 PM
Sorry, no, I do:
https://github.com/gep13/ChocolateyGUI/blob/feature/Issue-142/appve...
Would that cause a problem?
11 Posted by gep13 on 18 Sep, 2014 06:50 PM
Just ran a build without the
clone folder
and it results in the same thing:https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....
12 Posted by gep13 on 18 Sep, 2014 08:03 PM
Ok, I am completely lost here.
I have modified the build script to output a list of all the files in the current directory, and I can see the NuGet.exe. Then I do a Test-Path, and it says it can't find the file, even though it has just printed out that it can find it?!?
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....
I must be doing something stoopid, but I can't see it.
Any ideas?
Support Staff 13 Posted by Feodor Fitsner on 18 Sep, 2014 08:10 PM
Interesting. Will take a look.
-Feodor
14 Posted by gep13 on 18 Sep, 2014 08:13 PM
More info in this build output:
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....
I have just tried:
And each one comes back with:
Yet the exact same code, for an exe in an adjacent folder, comes back with:
Thanks for all your help!
15 Posted by ferventcoder on 18 Sep, 2014 08:31 PM
What's the name of the folder for GitVersion?
16 Posted by gep13 on 18 Sep, 2014 08:35 PM
Line 199 in Build Output:
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....
i.e. almost exactly same path as NuGet.exe. In the Tools folder, same folder depth, etc.
17 Posted by ferventcoder on 18 Sep, 2014 08:36 PM
What does
&Where.exe nuget
get you?18 Posted by gep13 on 18 Sep, 2014 08:45 PM
In answer to your question:
19 Posted by gep13 on 18 Sep, 2014 09:11 PM
Ok, even if I change the path of the NuGet.exe to be something other, it still fails.
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....
Any ideas what could be stopping PowerShell from being able to access the NuGet.exe in my repo?
Gary
20 Posted by gep13 on 18 Sep, 2014 09:22 PM
If I change to straight up
nuget
the build gets slightly further:https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....
But then it tries to build the WiX Project, using DLL's in the Tools folder, and it also says it can't find them.
This wouldn't have something to do with my gitignore file would it (perhaps a bit of a stretch)? I currently have to force the additions of the exe's and dll's into the Tools folder, because git isn't picking them up, due to "something" in my gitignore file. I couldn't see anything obvious that would be stopping them from going in though.
It is just co-incidental that the files I have to force into the repo, are the ones that now can't be found.
On that note, I am going to test one more thing, and then I need to call it for the night...
21 Posted by gep13 on 18 Sep, 2014 09:33 PM
Ok, that thought process didn't result in anything. The WiX issue I am seeing is something different that I will need to dig into. The main issue is still the inability to run NuGet.exe from the repo folder.
Thanks
Support Staff 22 Posted by Feodor Fitsner on 18 Sep, 2014 10:41 PM
It works: https://ci.appveyor.com/project/appvyr/chocolateygui
Working
default.ps1
looks like: https://github.com/FeodorFitsner/ChocolateyGUI/blob/7856e8fd27cb332...23 Posted by gep13 on 19 Sep, 2014 06:39 AM
Hello,
Thank you for taking the time to look into this! However, I don't think that this is the end of the story :-(
You are correct, making the changes that you have made, result in a working build from the Issue-142 branch of your repository. In actual fact, if you were to initiate a build from the Issue-142 branch of your repository before you made any changes, I believe the build will also work.
The problem seems to lie in the merged branch that is built as a result of the Pull Request. Let me see if I can explain what I have done to demonstrate this.
I have created another project in AppVeyor that points at this repository (let's call it repository 1):
https://github.com/gep13/ChocolateyGUI
and I also have (the existing) an AppVeyor Project that points at this repository (let's call it repository 2):
https://github.com/chocolatey/ChocolateyGUI
NOTE: Repository 1 was forked from Repository 2.
I then added a commit to the Issue-142 branch of repository 1 (to add the publishing of artifacts to AppVeyor) and this results in a successful build:
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui-443/buil...
Now, I already have a Pull Request open between repository 1 and repository 2 which merges changes from the Issue-142 branch in repository 1 to the develop branch in repository 2. When the resulting build executes, it fails:
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....
The merge is a clean merge, with no conflicts, so I believe that it should work.
I am almost tempted to accept the pull request, to see if the build directly from the develop branch, rather than the pull request branch works, but I wanted you to see the current state of play before I do anything else.
Any thoughts? Thanks!
Gary
Support Staff 24 Posted by Feodor Fitsner on 19 Sep, 2014 06:46 PM
The problem is getting more and more interesting. Do you have an idea how I can emulate this sequence on my end? I mean having the same PR and being able to kick of a new build for it.
Support Staff 25 Posted by Feodor Fitsner on 19 Sep, 2014 07:00 PM
OK, if I run the following sequence on my dev machine I have "NuGet" folder in tools with nuget.exe in it:
But look at my first build. With original path to nuget.exe (
./../Tools/Nuget/NuGet.exe
) it fails:https://ci.appveyor.com/project/appvyr/chocolateygui/build/1.0.1
However, with changed path
.\..\Tools\NuGet\NuGet.exe
it worked:https://ci.appveyor.com/project/appvyr/chocolateygui/build/1.0.6
I believe this one has incorrect path to NuGet:
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....
26 Posted by gep13 on 19 Sep, 2014 07:04 PM
I could fork your version, and create a pull request to your repo.
Would that work?
Sent from my Windows Phone
________________________________
Support Staff 27 Posted by Feodor Fitsner on 19 Sep, 2014 07:06 PM
Sure, let's give it a try.
28 Posted by gep13 on 19 Sep, 2014 07:09 PM
Away from computer just now, but I will try as soon as I can.
Sent from my Windows Phone
________________________________
29 Posted by gep13 on 20 Sep, 2014 07:45 AM
I have just submitted a pull request to your fork of ChocolateyGUI from adnuguk\ChocolateyGUI, and unfortunately, the build failed:
https://ci.appveyor.com/project/appvyr/chocolateygui/build/1.0.9
Even though, the Issue-142 branch which I initiated the Pull Request from, passed successfully.
If you investigate this, would you mind accepting the Pull Request at some point? I would like to see whether the resulting build works, or if this is just an issue with Pull Requests.
Thanks!
30 Posted by gep13 on 20 Sep, 2014 09:24 AM
So, I went ahead and merged my Pull Request, even though AppVeyor said that the build failed, and once merged, everything worked successfully:
https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/0....
I have hoping that this is just a glitch in the matrix. I am away to start a new Pull Request, so will see what happens then.
Gary