Any thoughts on why I am getting an error in build

gep13's Avatar

gep13

17 Sep, 2014 09:05 PM

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

  1. Support Staff 1 Posted by Feodor Fitsner on 17 Sep, 2014 09:25 PM

    Feodor Fitsner's Avatar

    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. 2 Posted by gep13 on 18 Sep, 2014 05:34 AM

    gep13's Avatar

    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. 3 Posted by gep13 on 18 Sep, 2014 07:45 AM

    gep13's Avatar

    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

  4. Support Staff 4 Posted by Feodor Fitsner on 18 Sep, 2014 02:32 PM

    Feodor Fitsner's Avatar

    No worries, will take a look!

    -Feodor

  5. Support Staff 5 Posted by Feodor Fitsner on 18 Sep, 2014 04:47 PM

    Feodor Fitsner's Avatar

    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. 6 Posted by gep13 on 18 Sep, 2014 06:26 PM

    gep13's Avatar

    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.

    git fetch -q origin +refs/pull/143/merge:
    

    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. 7 Posted by gep13 on 18 Sep, 2014 06:27 PM

    gep13's Avatar

    The pull request in question is this one:

    https://github.com/chocolatey/ChocolateyGUI/pull/143

    Gary

  8. Support Staff 8 Posted by Feodor Fitsner on 18 Sep, 2014 06:37 PM

    Feodor Fitsner's Avatar

    Do you have custom Clone folder set on project settings?

  9. 9 Posted by gep13 on 18 Sep, 2014 06:41 PM

    gep13's Avatar

    Not knowingly, no.

    I created the project in AppVeyor, and then immediately started using the appveyor.yml file.

    Gary

  10. 10 Posted by gep13 on 18 Sep, 2014 06:43 PM

    gep13's Avatar
  11. 11 Posted by gep13 on 18 Sep, 2014 06:50 PM

    gep13's Avatar

    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. 12 Posted by gep13 on 18 Sep, 2014 08:03 PM

    gep13's Avatar

    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?

  13. Support Staff 13 Posted by Feodor Fitsner on 18 Sep, 2014 08:10 PM

    Feodor Fitsner's Avatar

    Interesting. Will take a look.

    -Feodor

  14. 14 Posted by gep13 on 18 Sep, 2014 08:13 PM

    gep13's Avatar

    More info in this build output:

    https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....

    I have just tried:

     if(Test-Path -Path "C:\projects\chocolateygui\Tools\NuGet\NuGet.exe") {
            Write-Output "Found NuGet using absolute path"
        }
        else {
            Write-Output "Not Found NuGet using absolute path"
        }
        
        if(Test-Path -Path $nugetExe) {
            Write-Output "Found NuGet using relative path"
        }
        else {
            Write-Output "Not Found NuGet using relative path"
        }
    

    And each one comes back with:

    Not Found NuGet using absolute path
    Not Found NuGet using relative path
    

    Yet the exact same code, for an exe in an adjacent folder, comes back with:

    Found GitVersion using absolute path
    Found GitVersion using relative path
    

    Thanks for all your help!

  15. 15 Posted by ferventcoder on 18 Sep, 2014 08:31 PM

    ferventcoder's Avatar

    What's the name of the folder for GitVersion?

  16. 16 Posted by gep13 on 18 Sep, 2014 08:35 PM

    gep13's Avatar

    Line 199 in Build Output:

    https://ci.appveyor.com/project/GaryEwanPark/chocolateygui/build/1....

    C:\projects\chocolateygui\Tools\GitVersion\GitVersion.exe
    

    i.e. almost exactly same path as NuGet.exe. In the Tools folder, same folder depth, etc.

  17. 17 Posted by ferventcoder on 18 Sep, 2014 08:36 PM

    ferventcoder's Avatar

    What does &Where.exe nuget get you?

  18. 18 Posted by gep13 on 18 Sep, 2014 08:45 PM

    gep13's Avatar

    In answer to your question:

    Running Rob's magic tool... 
    C:\Tools\NuGet\nuget.exe 
    Magic tool completed
    
  19. 19 Posted by gep13 on 18 Sep, 2014 09:11 PM

    gep13's Avatar

    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....

    C:\projects\chocolateygui\Tools\Gep13NuGet\NuGet.exe
    

    Any ideas what could be stopping PowerShell from being able to access the NuGet.exe in my repo?

    Gary

  20. 20 Posted by gep13 on 18 Sep, 2014 09:22 PM

    gep13's Avatar

    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. 21 Posted by gep13 on 18 Sep, 2014 09:33 PM

    gep13's Avatar

    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

  22. Support Staff 22 Posted by Feodor Fitsner on 18 Sep, 2014 10:41 PM

    Feodor Fitsner's Avatar
  23. 23 Posted by gep13 on 19 Sep, 2014 06:39 AM

    gep13's Avatar

    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

  24. Support Staff 24 Posted by Feodor Fitsner on 19 Sep, 2014 06:46 PM

    Feodor Fitsner's Avatar

    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.

  25. Support Staff 25 Posted by Feodor Fitsner on 19 Sep, 2014 07:00 PM

    Feodor Fitsner's Avatar

    OK, if I run the following sequence on my dev machine I have "NuGet" folder in tools with nuget.exe in it:

    git clone -q https://github.com/chocolatey/ChocolateyGUI.git C:\projects\ChocolateyGUI
    git fetch -q origin +refs/pull/143/merge:
    git checkout -qf FETCH_HEAD
    

    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. 26 Posted by gep13 on 19 Sep, 2014 07:04 PM

    gep13's Avatar

    I could fork your version, and create a pull request to your repo.

    Would that work?

    Sent from my Windows Phone
    ________________________________

  27. Support Staff 27 Posted by Feodor Fitsner on 19 Sep, 2014 07:06 PM

    Feodor Fitsner's Avatar

    Sure, let's give it a try.

  28. 28 Posted by gep13 on 19 Sep, 2014 07:09 PM

    gep13's Avatar

    Away from computer just now, but I will try as soon as I can.

    Sent from my Windows Phone
    ________________________________

  29. 29 Posted by gep13 on 20 Sep, 2014 07:45 AM

    gep13's Avatar

    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. 30 Posted by gep13 on 20 Sep, 2014 09:24 AM

    gep13's Avatar

    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

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

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM