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

Update build-test-nuget.yml for Azure Pipelines #3404

Open
wants to merge 1 commit into
base: previews/v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions vsts/build-test-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,64 @@ jobs:
testRunTitle: "Linux Tests ($(FRAMEWORK)) (Attempt $(System.JobAttempt))"
condition: always()


### Upload the unsigned packages to E4K feed ###
- job: Upload_to_E4K_Feed
displayName: Upload Nuget Packages to E4K Feed
timeoutInMinutes: 15

condition: and(succeeded(), eq(variables['UPLOAD_TO_E4K_FEED'], 'true'))
dependsOn:
- Build_Packages

pool:
vmImage: windows-2022

variables:
NUGET_PACKGE_FOLDER: $[ dependencies.Build_Packages.outputs['BUILD_PKG.NUGET_PKG_DATE'] ]
Copy link
Contributor

Choose a reason for hiding this comment

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

What about using parameters?


steps:
Copy link
Contributor

@andyk-ms andyk-ms Dec 11, 2023

Choose a reason for hiding this comment

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

Possible to simply the full steps and only add a single parameter controlled task before or after line 574?
We also want a condition on line 518 default parameter "true" to control the nuget feed copy.

- task: DownloadPipelineArtifact@2
displayName: 'Download nuget packages from pipeline artifacts'
inputs:
buildType: 'current'
artifactName: 'unsigned_nuget_packages'
itemPattern: '**/*.*nupkg'
targetPath: '$(Build.SourcesDirectory)/bin'

- task: PowerShell@2
displayName: 'Downloaded nuget package files checkpoint'
inputs:
targetType: 'inline'
script: |
Write-Host "Download contents:"
gci -Path $(Build.SourcesDirectory)/bin/nuget -Recurse -Force

- task: PowerShell@2
displayName: 'Rename Packages for Partner Release Pipeline'
inputs:
targetType: 'inline'
script: |
Write-Host ""
Rename-Item $(Build.SourcesDirectory)/bin/nuget $(Build.SourcesDirectory)/bin/pkgs_$(NUGET_PACKGE_FOLDER)
Write-Host " "
Write-Host "Package contents (renamed):"
gci -Path $(Build.SourcesDirectory)/bin -Recurse -Force

- task: NuGetAuthenticate@0
displayName: 'NuGet Authenticate'
inputs:
nuGetServiceConnections: 'nugetServiceConnection-tmahmood' # Update with the name of your NuGet service connection
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a generic authentication account?


- task: NuGetCommand@2
displayName: 'NuGet Push'
inputs:
command: 'push'
packagesToPush: '$(Build.SourcesDirectory)/bin/pkgs_$(NUGET_PACKGE_FOLDER)/*.nupkg'
nuGetFeedType: 'external'
publishFeed: 'https://pkgs.dev.azure.com/e4k-sdk/SdkLite/_packaging/sdklite-previews/nuget/v3/index.json'
versioningScheme: 'off'

### Upload unisgned packages for partner signing and release pipeline ###
- job: Upload_Packages
displayName: Upload Nuget Packages
Expand Down