Skip to content
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

Add publish pipeline #344

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Add publish pipeline #344

merged 1 commit into from
Sep 25, 2024

Conversation

davidmrdavid
Copy link
Member

This PR adds a package publishing pipeline to automate releases to ADO and NuGet

@davidmrdavid davidmrdavid merged commit e0b54b8 into main Sep 25, 2024
4 checks passed
@davidmrdavid davidmrdavid deleted the dajusto/add-publish-pipeline branch September 25, 2024 18:46
Copy link
Member

@jviau jviau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why you used the task approach instead of output?

command: push
nuGetFeedType: external
publishFeedCredentials: 'DurableTask org NuGet API Key'
packagesToPush: '$(System.DefaultWorkingDirectory)/drop/Microsoft.DurableTask.Abstractions.*.nupkg;!$(System.DefaultWorkingDirectory)/**/*.symbols.nupkg' # Despite this being a custom command, we need to keep this for 1ES validation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!$(System.DefaultWorkingDirectory)/**/*.symbols.nupkg needs to be included?Weird - I don't believe we produce those. Instead we produce.snupkg` (which I believe will automatically be included when a nupkg is pushed)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /**/*.symbols.nupkg bit appears here because the default value for packagesToPush includes it, and I was just modifying that default template. You're right, we should be able to remove it; let me know into that

targetPath: $(System.DefaultWorkingDirectory)/drop
steps:
- task: 1ES.PublishNuget@1
displayName: 'NuGet push (Microsoft.DurableTask.Client)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splitting these all into separate jobs looks quite cumbersome, especially now we will need to edit this every time a new project is added.

In legacy release, I worked around this by using the dotnet CLI for pushing to nuget.org. Did you try using useDotNetTask: true and allowPackageConflicts: true?

Hopefully with those 2 inputs this can be consolidated down to a single job.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I don't recall seeing a useDotNetTask option, perhaps that's what I need. I can give it a go.
The key issue is that the 1ES nuget release task has a limitation of not allowing package conflicts, so if this setting allows me to go back to the original nuget release task, then this would be it


extends:
template: v1/1ES.Official.PipelineTemplate.yml@1es
parameters:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding:

Suggested change
parameters:
parameters:
featureFlags:
sdlNugetPathOptimization: true

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tell me a bit more about what this does? I'd like to include some context as an inline comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what it all does exactly. SDL is something 1ES team controls and their nuget release docs recommended adding it. Its probably fine to omit though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants