Tag build skiping because of ignored file

José Simões's Avatar

José Simões

26 Oct, 2018 02:19 PM

Hi,

For this project: https://ci.appveyor.com/project/nfbot/lib-corelibrary/history the build is being skipped when a tag is created because the previous commit is always an md file (a change log). Because md's are being ignored it seems that I can't have a build for a tag...
Can you please suggest a way out of this? Thanks!

  1. 1 Posted by Ilya Finkelshte... on 26 Oct, 2018 08:43 PM

    Ilya Finkelshteyn's Avatar

    Try set APPVEYOR_IGNORE_COMMIT_FILTERING_ON_TAG "tweak" environment variable to true. More details are here in the bottom of the page. We just recently added it by similar request from the other customer.

  2. 2 Posted by José Simões on 29 Oct, 2018 11:25 AM

    José Simões's Avatar

    That seems to have fixed it. The build isn't skipped anymore.

    Now I'm having an issue with gitversion... it's complaining about being a detached head... from what I could search about this it seems to be related with the way git is cloning it locally. Am I doing something wrong or missing any git config on AppVeyor to deal properly with tag builds?

  3. 3 Posted by Ilya Finkelshte... on 29 Oct, 2018 04:52 PM

    Ilya Finkelshteyn's Avatar

    Please send a link to the specific build with this error. I made a quick look at nfbot/lib-corelibrary build history and did not find those errors but maybe I did not look thoroughly enough.

    However I noticed that you are struggling with GitVersion installation. Do you really need it? GitVersion 3.6.2 is installed on all AppVeyor Windows images. If you need newer version, you are welcome to create an issue at https://github.com/appveyor/ci/issues.

  4. 4 Posted by José Simões on 29 Oct, 2018 05:04 PM

    José Simões's Avatar

    Hi Ilya,

    The last failed build is suffering from this. See here:
    https://ci.appveyor.com/project/nfbot/lib-corelibrary#L593

    Some pointers to what I've found:
    - https://coderwall.com/p/3ipx_a/gitversion-it-looks-like-the-branch-being-examined-is-a-detached-head-on-jenkins
    - https://github.com/GitTools/GitVersion/issues/553

    Regarding GitVersion, yes it seems that we need stuff that's only on 4.x. I've just noticed that 4.0 is now released. I've opened an issue there.

  5. 5 Posted by José Simões on 30 Oct, 2018 07:23 PM

    José Simões's Avatar

    Hi Ilya,

    Any update on this please? :)

  6. 6 Posted by Ilya Finkelshte... on 30 Oct, 2018 07:29 PM

    Ilya Finkelshteyn's Avatar

    Just tried to look at the link you sent (https://ci.appveyor.com/project/nfbot/lib-corelibrary#L593) and it seems to pointing to the empty log of cancelled build. Can you please send me a working link to this specific error?

  7. 7 Posted by José Simões on 30 Oct, 2018 08:32 PM

    José Simões's Avatar

    Please take a look here
    https://ci.appveyor.com/project/nfbot/lib-corelibrary/builds/19876068

    Line 593 has the error.

    This only occurs when building a tag.

    Thanks!

  8. 8 Posted by Ilya Finkelshte... on 31 Oct, 2018 10:27 AM

    Ilya Finkelshteyn's Avatar

    Did you try other versions of GitVersion? Just to rule out the chance that it is a problem with specific version of GitVersion? You can return to Chocolatey to try different versions of it.

    Side note: if you add appveyor-retry before choco install you will make it a little bit more tolerant to Chocolatey issues.

  9. 9 Posted by José Simões on 31 Oct, 2018 02:55 PM

    José Simões's Avatar

    I don’t think it’s related with gitversion.

      1. Replaced back the install from the official version
      2. run a build, OK
      3. tag commit, build fails

    Please check the history there, you’ll the last and the one before as I’ve described:
    https://ci.appveyor.com/project/nfbot/lib-nanoframework-hardware-stm32/history

    (it’s a different repo, but I can’t afford to keep making this tests on the other).

  10. 10 Posted by Ilya Finkelshte... on 01 Nov, 2018 01:24 AM

    Ilya Finkelshteyn's Avatar

    Sorry for delays, still looking at this.

  11. 11 Posted by Ilya Finkelshte... on 02 Nov, 2018 02:13 AM

    Ilya Finkelshteyn's Avatar

    I am unable to get this error with my simple repro (build settings are in UI but you can see it is very simple scenario).

    Do you have an idea what is different in your scenario? What I would try first is to move all those git commands from init to say install so they do not happen before clone stage. Can you try that?

    Also how do you create a tag? I created just in GitHub UI and maybe this is the difference?

  12. 12 Posted by Ilya Finkelshte... on 02 Nov, 2018 05:49 PM

    Ilya Finkelshteyn's Avatar

    Just realized that I used GitVersion.exe from default location. Changed to C:\ProgramData\chocolatey\bin\GitVersion.exe, still no repro. Please try things I suggested earlier and with calling your git commands after clone and let us know how it goes.

  13. 13 Posted by José Simões on 02 Nov, 2018 05:55 PM

    José Simões's Avatar

    I’ll be able to do this next Monday. Thank you for looking into it.

  14. 14 Posted by José Simões on 05 Nov, 2018 10:26 AM

    José Simões's Avatar

    No changes after moving that as you've suggested.
    I'm raising an issue with gitversion.

    (actually it seems that someone else has already reported what looks to me the same issue)
    https://github.com/GitTools/GitVersion/issues/1501

    Curious that you are not seeing this on you test repo. Wonder why...

  15. 15 Posted by Ilya Finkelshte... on 05 Nov, 2018 04:12 PM

    Ilya Finkelshteyn's Avatar

    If it is a GitHub issue, please CC @IlyaFinkelshteyn

  16. 16 Posted by José Simões on 07 Nov, 2018 06:22 PM

    José Simões's Avatar

    To update you this: failing to find the root cause and not getting help from the project we've decided to switch to another tool to manage versioning. It's working now and no more issues on builds (PRs, regular and tags).

    Thanks again for you assistance with this.

  17. José Simões closed this discussion on 07 Nov, 2018 06:22 PM.

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

 

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
20 Sep, 2024 05:50 PM