Skip to content

Commit

Permalink
Fix DevEx and IDDP builds (#3093)
Browse files Browse the repository at this point in the history
* Fix build

* Nuget authenticate without source

* resilience to jobs

* Cleaner way to remove the external feed and add the internal one

* Adding a display
  • Loading branch information
jmprieur authored Oct 19, 2024
1 parent ef06ec5 commit d803d1b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
5 changes: 0 additions & 5 deletions build/template-install-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#template-install-dependencies.yaml
parameters:
authenticateForFeed: 'true'

#install dotnet core

Expand Down Expand Up @@ -48,9 +46,6 @@ steps:

- task: NuGetAuthenticate@1
displayName: NuGet Authenticate
condition: eq('${{ parameters.authenticateForFeed }}', 'true')
inputs:
nuGetServiceConnections: 'IDDP Feed'

- powershell: |
$kvSecretBytes = [System.Convert]::FromBase64String('$(LabAuth)')
Expand Down
2 changes: 0 additions & 2 deletions build/template-onebranch-release-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ steps:

# Bootstrap the build
- template: template-install-dependencies.yaml
parameters:
authenticateForFeed: 'false'

# Nuget Restore and Build Microsoft.Identity.Web.sln
- template: template-restore-build-MSIdentityWeb.yaml
Expand Down
2 changes: 0 additions & 2 deletions build/template-pack-nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ steps:
nobuild: '${{parameters.NoBuild}}'
packagesToPack: '${{ parameters.ProjectRootPath }}\${{ parameters.AssemblyName }}.csproj'
IncludeSymbols: true
feedsToUse: 'config'
nugetConfigPath: NuGet.config
verbosityPack: normal
packDirectory:
arguments: '--configuration ${{ parameters.BuildConfiguration }}'
17 changes: 8 additions & 9 deletions build/template-restore-build-MSIdentityWeb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@ steps:
dotnet workload restore $(IdWebSourceDir)tests\DevApps\blazorwasm-b2c\blazorwasm2-b2c.csproj
displayName: 'Install wasm-tools'

- task: NuGetAuthenticate@1
displayName: NuGet Authenticate
inputs:
nuGetServiceConnections: 'IDDP Feed'

- script: dotnet nuget update source NuGet --source https://identitydivision.pkgs.visualstudio.com/_packaging/IDDP/nuget/v3/index.json --configfile "$(Build.SourcesDirectory)\Nuget.config"
displayName: 'Add NuGet Source for MISE'
- powershell: |
$nugetSourceIsExternal = (dotnet nuget list source --format Short).Contains("https://api.nuget.org/v3/index.json")
if ($nugetSourceIsExternal) {
dotnet nuget remove source NuGet
dotnet nuget add source https://identitydivision.pkgs.visualstudio.com/_packaging/IDDP/nuget/v3/index.json -n IDDP
dotnet nuget list source
}
displayName: 'Remove external "NuGet" Source and add "IDDP artifacts" as a NuGet Source, if needed.'

- task: DotNetCoreCLI@2
displayName: 'Build solution Microsoft.Identity.Web.sln'
inputs:
command: 'custom'
custom: 'build'
projects: '$(IdWebSourceDir)Microsoft.Identity.Web.sln'
feedsToUse: 'config'

This comment has been minimized.

Copy link
@kllysng

kllysng Oct 24, 2024

Contributor

Why did we remove these two lines from the build task and not from the subsequent dotnetCoreCLI@2 tasks?

This comment has been minimized.

Copy link
@jmprieur

jmprieur Oct 24, 2024

Author Collaborator

that's a good question. Not sure I should have removed them actually

nugetConfigPath: NuGet.config
arguments: '-p:configuration=${{ parameters.BuildConfiguration }} -p:RunCodeAnalysis=true -p:MicrosoftIdentityWebVersion=${{ parameters.MicrosoftIdentityWebVersion }} -p:SourceLinkCreate=true'

# This task is needed so that the 1CS Rolsyn analyzers task works.
Expand Down

0 comments on commit d803d1b

Please sign in to comment.