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

VONK-5414: Use a variable to control the restore via the GitHub package feed or not #2598

Merged
merged 14 commits into from
Sep 26, 2023
13 changes: 9 additions & 4 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@ stages:
inputs:
versionSpec: '6.4.0'

- template: restore.yml@templates
parameters:
nuGetServiceConnections: GitHubPackageGetFeed
nuGetSources: --source https://nuget.pkg.github.com/FirelyTeam/index.json
- ${{ if eq(variables.useGitHubPackageFeed, 'yes') }}:
- template: restore.yml@templates
parameters:
nuGetServiceConnections: GitHubPackageGetFeed
nuGetSources: --source https://nuget.pkg.github.com/FirelyTeam/index.json

- ${{ if eq(variables.useGitHubPackageFeed, 'no') }}:
- script: dotnet restore --source https://api.nuget.org/v3/index.json
displayName: 'Run dotnet restore'

- task: DotNetCoreCLI@2
displayName: Build
Expand Down
3 changes: 2 additions & 1 deletion build/pipeline-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
variables:
isTagBranch: $[startswith(variables['Build.SourceBranch'], 'refs/tags/v')]
GITHUB_PACKAGES_APIKEY: $(GitHubPushPackagesAPIKey) # key is set in variable group APIKeys
NUGET_APIKEY: $(NuGetSDKAPIKey) # key is set in variable group APIKeys
NUGET_APIKEY: $(NuGetSDKAPIKey) # key is set in variable group APIKeys
useGitHubPackageFeed: 'no' # possible values: 'yes', 'no'