Skip to content

Sort out CD #1445

Closed
Closed

Description

@dazinator
  1. Can anyone help with the following tasks:
  • We need to get cake build script to build the gem package as it isn't built at present.
  • We need to get cake build script to build the tfs task as it isn't build at present.
  1. We need to get all of the build assets being pushed automatically to their respective deployment channels, on every commit push. Can we agree on the following strategy:
  • In order to issue a "stable" release, we will tag a commit on master with a stable number.
  • Every other commit not tagged with a stable number, and irrespective of branch, will produce an "Unstable" release.

If so we need to:

  • Configure gitversion to produce stable / unstable version numbers as per the above.
  • Amend the build so that stable assets (i.e of the back of a stable build) are pushed to their stable deployment channels (i.e nuget.org etc)
  • Ament the build so that "unstable" assets (everything that isn't a stable build are pushed to their unstable / pre-release deployment channels (i.e appveyor ci nuget feed etc)

Note: There appears to be a cake script for deployments` that does a lot of what we need already, but it's not clear to me when this runs or if someone executes it manually or something. Perhaps someone could clarify whether its still used and how.

We have PR's waiting in the wings, and issues because people can't find the latest packages where they are expecting, and this is because we haven't been able to get a handle on the release process or are too reliant on manual intervention.

See several of the bottom comments here for background.

The assets we need to be pushing (Please amend appropriately) are as seen here:

  • NuGetCommandLineBuild --> NuGet.org
  • NuGetRefBuild --> NuGet.org
  • NuGetExeDotNetCoreBuild --> NuGet.org
  • NuGetTaskBuild --> NuGet.org
  • NuGetExeBuild --> Chocolatey.org
  • GemBuild --> ?
  • GitVersionTfsTaskBuild--> ?
  • zip --> Docker Hub
  • zip-dotnetcore --> Docker Hub

Activity

  1. self-assigned this
    on Jul 23, 2018
  2. dazinator commented on Jul 23, 2018

    @dazinator
    ContributorAuthor

    @JakeGinnivan @asbjornu @gep13 @pascalberger please feel free to chime in

  3. gep13 commented on Jul 24, 2018

    @gep13
    Member

    Not in a position to help directly, but I can review/answer questions if there are any.

    There are addin's Cake.Gem and Cake.Tfx that might be able to help with the work that needs to be done.

  4. asbjornu commented on Jul 24, 2018

    @asbjornu
    Member

    I think #1338 might have some information on how the current release process works. Missing from the release list is Homebrew, but since that requires a pull request, I'm not sure we can fully automate that? Or can we?

  5. gep13 commented on Jul 24, 2018

    @gep13
    Member

    Or can we?

    Automatically creating a PR is something that certainly "can" be done. We have thought about doing this for Cake, as that is also pushed to homebrew, but for now, we do this as a manual step.

  6. dazinator commented on Jul 24, 2018

    @dazinator
    ContributorAuthor

    @gep13

    There are addin's Cake.Gem and Cake.Tfx that might be able to help with the work that needs to be done.

    That sounds like an excellent place to start, thanks

  7. removed their assignment
    on Jul 24, 2018
  8. jnevins-gcm commented on Aug 8, 2018

    @jnevins-gcm

    The support for netstandard has been underway for about 8 months and we are at the point of evaluating whether GitVersion(Task) is a viable solution for use in a new project. Is there any expectation of when a release may come or any advice that can be offered by the maintainers of this project? I realize and appreciate that there is a lot of pre-work required for this support - I'm just trying to evaluate whether it makes sense to use this tool right now.

  9. dazinator commented on Aug 9, 2018

    @dazinator
    ContributorAuthor

    @jnevins-gcm afaik there is no reason why you cant consume the gitversiontask nuget package from the netstandard PR. You just need to add the appveyor nuget feed because its not released to nuget.org yet. Instructions should be at the top of the netstandard PR. If you hit problems let us know.

  10. jnevins-gcm commented on Aug 10, 2018

    @jnevins-gcm

    That's what we're doing (with mostly success). The problem is redistributing the custom NuGet.config to all of our repos and build agents. Also, there is an issue with that PR that generates TONS of warnings in our builds and slow down build times by 4x (presumably due to the NuGet package restores that occur on every single project that gets versioned due to the newly introduced use of the MSBuild helper library for resolving dependent packages instead of including dependent dlls directly). Our build output looks like this:

    
        10>GetVersion:
             INFO [08/10/18 9:37:22:56] IsDynamicGitRepository: False
             INFO [08/10/18 9:37:22:56] Returning Project Root from DotGitDirectory: D:\gitrepo\.git - D:\gitrepo
             INFO [08/10/18 9:37:22:56] Project root is: D:\gitrepo
             INFO [08/10/18 9:37:22:56] DotGit directory is: D:\gitrepo\.git
             INFO [08/10/18 9:37:22:56] IsDynamicGitRepository: False
             INFO [08/10/18 9:37:22:56] Returning Project Root from DotGitDirectory: D:\gitrepo\.git - D:\gitrepo
        13>WriteVersionInfoToBuildLog:
             INFO [08/10/18 9:37:22:57] IsDynamicGitRepository: False
             INFO [08/10/18 9:37:22:58] Returning Project Root from DotGitDirectory: D:\gitrepo\.git - D:\gitrepo
             INFO [08/10/18 9:37:22:58] Project root is: D:\gitrepo
             INFO [08/10/18 9:37:22:58] DotGit directory is: D:\gitrepo\.git
             INFO [08/10/18 9:37:22:58] IsDynamicGitRepository: False
             INFO [08/10/18 9:37:22:58] Returning Project Root from DotGitDirectory: D:\gitrepo\.git - D:\gitrepo
        10>GetVersion:
             INFO [08/10/18 9:37:22:60] Begin: Loading version variables from disk cache
               INFO [08/10/18 9:37:22:60] Begin: Deserializing version variables from cache file D:\gitrepo\.git\gitversion_cache\DB52FF94A455E845DE32CE7BD871A0ABE8FC594C.yml
        13>WriteVersionInfoToBuildLog:
             INFO [08/10/18 9:37:22:62] Begin: Loading version variables from disk cache
               INFO [08/10/18 9:37:22:62] Begin: Deserializing version variables from cache file D:\gitrepo\.git\gitversion_cache\DB52FF94A455E845DE32CE7BD871A0ABE8FC594C.yml
        10>GetVersion:
               INFO [08/10/18 9:37:22:68] End: Deserializing version variables from cache file D:\gitrepo\.git\gitversion_cache\DB52FF94A455E845DE32CE7BD871A0ABE8FC594C.yml (Took: 77.13ms)
             INFO [08/10/18 9:37:22:68] End: Loading version variables from disk cache (Took: 77.93ms)
    
    

    with tons of these

    10>MSBUILD : Task factory warning NMSBT010: There is a mismatch between SDK NuGet version (4.7.0) and the NuGet version the task factory was compiled against (4.6.0). There might occur some exotic errors. [D:\gitrepo\src\Web\Web.csproj]

    Also, our builds sporadically fail due to concurrency issues (which we having seen previously with other builds of GitVersionTask). MSBuild is building in parallel and it seems there are locking issues:
    WARN [08/10/18 7:40:00:51] Could not determine assembly version: LibGit2Sharp.LockedFileException: failed to lock file 'D:/gitrepo/.git/config.lock' for writing:

  11. dazinator commented on Aug 10, 2018

    @dazinator
    ContributorAuthor

    @jnevins-gcm
    Could the parrallel build / locking issue you are seeing be anything related to: #1381

    In terms of the additional restores slowing builds down, thats certainly something we could investigate, feel free to open a more specific issue, with more details about the csproj etc or a repro or link to a build etc. I would expect nuget packages to hit the cache when restored for the first time, so wouldn't expect too much of a slow down in this area.

    With respect to the MSBUILD : Task factory warnings - what version of the dotnet sdk are you building with and what gitversiontask nuget package are you referencing?

    Lastly, I tend not to use gitversiontask much these days. I usually just execute gitversion at the start of my build either the .exe directly, or if on a dotnet core platform, you can now also run it via the dotnet command, or if you have access to a docker host, you can invoke it via a docker image. This will give you the version number back, and I usually pass that in to msbuild via /p:PackageVersion. Not sure if this kind of approach would work better for you than the GitVersionTask so just mentioning it just in case.

  12. jnevins-gcm commented on Aug 10, 2018

    @jnevins-gcm

    This is great help - thanks!

    We will switch to the CLI for GitVersion. How is this runnable via the dotnet command?

    Also, any reason you are passing in /p:PackageVersion vs. /p:Version?

    Are there any other pieces of functionality that would be missing? (aside from appveyor/build server support which could be implemented pretty easily using the command line for their build worker api)?

  13. dazinator commented on Aug 10, 2018

    @dazinator
    ContributorAuthor

    RE the cli, there are instructions at the top of here: #1269

    And Nope package version was sufficient for my case. Let me know how /p:Version works out though.

  14. jnevins-gcm commented on Aug 10, 2018

    @jnevins-gcm

    Thanks.

    And how do you distribute the command line version with your builds since the PackageReference isn't the one installing GitVersion anymore?

    Also - tried the command line - blows up here:
    https://github.com/GitTools/GitVersion/blob/master/src/GitVersionCore/OutputVariables/VersionVariables.cs

    due to

    
    #if NETDESKTOP
                    return typeof(VersionVariables).GetProperty(variable).GetValue(this, null) as string;
    #else
                    throw new NotImplementedException();
                    //  return typeof(VersionVariables).GetTypeInfo().GetProperty(variable).GetValue(this, null) as string;
    #endif
    
  15. 104 remaining items

  16. arturcic commented on Oct 12, 2018

    @arturcic
    Member

    Looks like all supported channels have been updated.

    For chocolatey we'll have to fix the requirements for approval https://chocolatey.org/packages/GitVersion.Portable/4.0.0

  17. asbjornu commented on Oct 12, 2018

    @asbjornu
    Member

    I kept the format for pre-release version like this as 4.0.0-beta0015-1644 as chocolatey and rubygem does not support the + and nuget is showing warnings.

    Ok, so neither Chocolatey nor RubyGems supports SemVer 2.0, then. That's a shame.

  18. arturcic commented on Oct 12, 2018

    @arturcic
    Member

    Ok, so neither Chocolatey nor RubyGems supports SemVer 2.0, then. That's a shame.

    and nuget clients < 4.3 I think

  19. asbjornu commented on Oct 12, 2018

    @asbjornu
    Member

    OK.

    For chocolatey we'll have to fix the requirements for approval

    How do we fix this? I've got the Chocolatey credentials, but I can't find anywhere to adjust this in ther interface. If I try to "Edit Package", I'm only presented with this error message:

    To edit the metadata for a package, please upload an updated version of the package.

    NuGet currently does not allow updating package metadata on the website. This helps ensure that the package itself (and the source used to build the package) remains the one true source of package metadata.

    This does require that you increment the package version.

  20. arturcic commented on Oct 12, 2018

    @arturcic
    Member

    I could run manually the pack for chocolatey and push it from local as I have the API key.

  21. asbjornu commented on Oct 12, 2018

    @asbjornu
    Member

    I could run manually the pack for chocolatey and push it from local as I have the API key.

    So you can fix the approval requirements locally and push them somehow? Or did you have something else in mind?

  22. arturcic commented on Oct 12, 2018

    @arturcic
    Member

    That's exactly what I mean

  23. asbjornu commented on Oct 12, 2018

    @asbjornu
    Member

    Do it

  24. arturcic commented on Oct 12, 2018

    @arturcic
    Member

    I have pushed the nuget package with the missing files - VERIFICATION.txt and LICENSE.txt. Waiting for moderation

  25. arturcic commented on Oct 12, 2018

    @arturcic
    Member

    Looks like the chocolatey was approved.
    Hooray!! We have version 4.0.0 published to all supported channels, except Vsts. We can close this issue

  26. jmezach commented on Oct 12, 2018

    @jmezach
  27. arturcic commented on Oct 12, 2018

    @arturcic
    Member

    Actually we can manually update to latest as we already have an issue registered for build script vsts publish

  28. dazinator commented on Oct 12, 2018

    @dazinator
    ContributorAuthor

    @arturcic excellent news. I'll close this, and we can track VSTS under the issue you created :-)
    Thank you!

  29. arturcic commented on Oct 12, 2018

    @arturcic
    Member

    @jmezach I haved updated to latest version on VSTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions