-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a .NET Core version of the Azure DevOps (vsts) build/release task. #1499
Added a .NET Core version of the Azure DevOps (vsts) build/release task. #1499
Conversation
Thank you for the contribution. That will be a great step to support the Unix agents on Azure DevOps. |
@arturcic the build steps have failed because I added a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arturcic the build steps have failed because I added a new
VsixNetCoreOutputFilePath
parameter.
This parameter should be also included in the paths.cake
as this parameter is later used for Publishing
build.cake
Outdated
@@ -276,6 +281,37 @@ Task("Pack-Tfs") | |||
}); | |||
}); | |||
|
|||
Task("Pack-Tfs-NetCore") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the Pack tasks for TFS as a single task, similar to the way nuget packages are create. The packaging logic could be moved to a method in utils.cake and you just pass some arguments for mono based and dotnet core based version, and within the Pack-Tfs task you call the method for both variants
build.cake
Outdated
@@ -238,6 +238,11 @@ Task("Copy-Files") | |||
CopyFileToDirectory(portableDir + "/" + "GitVersion.exe", tfsPath); | |||
CopyDirectory(portableDir.Combine("lib"), tfsPath.Combine("lib")); | |||
|
|||
// Vsix dotnet core | |||
var tfsNetCorePath = new DirectoryPath("./src/GitVersionTfsTask.NetCore/GitVersionTask"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to have the second TFS task in the same ./src/GitVersionTfsTask
root folder, but in a different GitVersionNetCoreTask
child folder, just to keep everything related to TFS in the same root folder. That means we need to change a little the structure of the GitVersionTfsTask folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll find the time to rework the folders this week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, you can have as inspiration the way here it is structured
hey @arturcic , |
@yohanb, I'll have a look soon, thanks |
Would love to see this merged :) |
@arturcic done making the changes. |
Looks great! I have run the build locally and it seems the paths to the vsix (the ones used for publishing) differ from the actual paths Can you update the path here? https://github.com/GitTools/GitVersion/pull/1499/files#diff-faf8aebe07f0c09fe65d5a4be490bb83R43 |
there is one missing line you should add so that the new vsix file is published to AppVeyor and to the marketplace https://github.com/GitTools/GitVersion/blob/master/build/parameters.cake#L106, Please add the netcore path as well. |
done |
@yohanb Looks great to me. Can we prepare it for merge by squashing all the commits as one commit? Then you can rebase it on master, to keep the commit history clean? Thanks |
@arturcic do you mean rebase on my forked master and create another PR for yohanb:master -> gittools:master ? |
looks like a simple squash is not possible as you have merged the master already, So all the commits after the master merge commit can be squashed. Need to think about |
it should be possible to simply squash and commit the PR according to the docs: |
ok then, give it a try. |
|
here is the way you can do that in terminal
|
@arturcic everything is clean and rebased on my forked master. How do you wish to commit the changes upstream to this repo? |
@yohanb first of all you should push (forced) to your origin, this way it will appear on your origin master branch and it will automatically appear here. So the history will be overwritten. |
11f697d
to
0e4c3fd
Compare
ok thanks, I forgot to force push on this feature branch. Not used to rewriting git history 🤣 |
@yohanb. I have fixed the rebase conflict and ran the build. The changes are ready for merging. I'll merge the PR. Thanks for the contribution and the patience. |
Awesome work guys! |
My pleasure. Hopefully this will enable greater adoption of GitVersion no matter the platform! |
@arturcic Looks like the new extension version isn't yet available on the Marketplace. Is there a manual step still involved to make that happen? |
that's right, and that's because the marketplace does not allow to publish pre-release versions, and we'll get a new version on marketplace when we have a stable version released |
I see. Do you have an idea when that will happen? We could greatly benefit from this since we would no longer have to delay our macOS and Linux builds for the Windows builds to finish. |
As far as I know we don't have a well defined milestones structure with issues that need to be included in one release or another. I guess we need that, @gep13 , @JakeGinnivan , @asbjornu - do you have anything to add? |
Perhaps a preview version of the Azure DevOps extension could be useful as well. I'm developing an open source extension myself as well and from our CI pipeline we build and package the preview version of the extension and we just monotonically increase the patch version number. Then when we ship we use the GitVersion generated version as the version number. This allows us to dogfood the extension ourselves and we could even share the preview extension with specific accounts if we want. |
We don't have a well defined process for stable releases, no. Is it so that this particular PR is impossible to actually test without it being published to Azure DevOps, which we can't do until it has a stable version number? |
It is possible to test locally the tasks as they are nodejs apps, but to check how they work on Azure DevOps as part of the build you need to install it as far as I know |
@arturcic @asbjornu Yes, you can only test an Azure DevOps extension by uploading it to the Marketplace and as far as I know it only supports major.minor.patch versions and no -prerelease tags. However as I mentioned you can have a separate extension (with a different id in the vss-extension.json) that can be marked as preview and can even be private (as in, only available in your own account or shared with specific accounts). You can then simply increment the patch version every time you build and upload the extension automatically. Then when you're ready to ship you can change the ID of the extension to the original one and use the appropriate version number. I'm currently using this extension to automate that inside of my CD pipeline. |
@jmezach: That sounds like a neat solution. How do we set up something like that and who can do it? I don't use Azure DevOps, so I don't even know where to start. |
@jmezach thanks for suggestion. I'll think about this, and probably we'll have a separate extension for pre-release - something like GitVersion-beta or similar.
Are you talking about this ? |
So the way that I've set this up currently is the the vss-extension.json in our source repository uses the ID augurk.augurk-preview. We process that through our CI pipeline to generate a .vsix with the -preview tag. We upload that .vsix as an artifact associated with a particular build. Then in our release pipeline (not sure if you can actually see this, but I hope so ;)) we've defined two stages: staging and production. In the staging stage we use tasks from the extension I mentioned earlier to determine the version of the preview extension that's currently on the Marketplace. We then increase the patch number, repackage the VSIX and upload it to the Marketplace. Once that's done we are able to try out the extension within our own Azure DevOps account, but it's not visible to other accounts unless we explicitly share it with them. When we're ready to ship (which usually means merging the changes to the master branch) we process it through the same pipeline and then promote it to production. In that stage we repackage the extension and remove the -preview tag and also stamp the correct version number (as generated by GitVersion) into it. After that anyone can use the new version of the extension. @arturcic Yes, that is exactly what I'm talking about. In fact, you could even have a stage where the extension is just private and marked as preview, then a public version that's marked as preview and a public version that is the released version. That's not what we're doing, but it's definitely an option. |
Thanks for explanation. I guess we can have a |
Sounds like a great plan. Looking forward to trying it out. |
@arturcic: That sounds like a great plan. How do we implement it? Do you have the required time and expertise to do it? |
I don't have much time, but will try to find some. The implementation is just in the build script - we check if it's stable release or pre-release, and we add the suffix or not in the vss-extension.json. Basically we change this json file depending on the type of the release. |
happy to see things moving here! 👍 |
until GitTools/GitVersion#1499 is released. Also follow: GitTools/GitVersion#1527
* Integrate with GitVersion for SemVer * Adding mono-complete and libcurl3 to ubuntu build * Attempt to fix yml issues * Disabling SemVer in linux build until GitTools/GitVersion#1499 is released. Also follow: GitTools/GitVersion#1527
Hi,
Here's a PR for the following request change:
#1496
I create a separate task specifically for .NET Core so it doesn't interfere with the current portable version.
I tested the task on my personal Azure DevOps account on a hosted Ubuntu agent and it works! It requires for .NET Core 2.0+ to be installed on the agent.
Let me know if I can do anything else to get this thing out in the wild.
Cheers.