-
Notifications
You must be signed in to change notification settings - Fork 757
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
msbuild task and cli nugets #1992
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,109 @@ stages: | |
official: ${{ parameters.official }} | ||
rid: osx-x64 | ||
|
||
- job: packages_windows | ||
dependsOn: bicep_windows | ||
pool: | ||
type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs | ||
|
||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)/out' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts | ||
# https://aka.ms/obpipelines/sdl | ||
ob_sdl_binskim_enabled: true # you can disable sdl tools in non-official build | ||
ob_sdl_binskim_break: false # always break the build on binskim issues. You can disable it by setting to 'false' | ||
ob_sdl_binskim_scanOutputDirectoryOnly: true | ||
ob_sdl_roslyn_break: true | ||
# ob_sdl_suppression_suppressionFile: $(Build.SourcesDirectory)\.gdn\job.gdnsuppress | ||
steps: | ||
- template: Packages.yml | ||
parameters: | ||
official: ${{ parameters.official }} | ||
rid: win-x64 | ||
artifactSuffix: windows | ||
|
||
- job: packages_linux | ||
dependsOn: bicep_linux | ||
pool: | ||
# signing must happen on Windows | ||
type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs | ||
|
||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)/out' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts | ||
# https://aka.ms/obpipelines/sdl | ||
ob_sdl_binskim_enabled: true # you can disable sdl tools in non-official build | ||
ob_sdl_binskim_break: false # always break the build on binskim issues. You can disable it by setting to 'false' | ||
ob_sdl_binskim_scanOutputDirectoryOnly: true | ||
ob_sdl_roslyn_break: true | ||
# ob_sdl_suppression_suppressionFile: $(Build.SourcesDirectory)\.gdn\job.gdnsuppress | ||
steps: | ||
- template: Packages.yml | ||
parameters: | ||
official: ${{ parameters.official }} | ||
rid: linux-x64 | ||
artifactSuffix: linux | ||
|
||
- job: packages_osx | ||
dependsOn: bicep_osx | ||
pool: | ||
# signing must happen on Windows | ||
type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs | ||
|
||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)/out' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts | ||
# https://aka.ms/obpipelines/sdl | ||
ob_sdl_binskim_enabled: true # you can disable sdl tools in non-official build | ||
ob_sdl_binskim_break: false # always break the build on binskim issues. You can disable it by setting to 'false' | ||
ob_sdl_binskim_scanOutputDirectoryOnly: true | ||
ob_sdl_roslyn_break: true | ||
# ob_sdl_suppression_suppressionFile: $(Build.SourcesDirectory)\.gdn\job.gdnsuppress | ||
steps: | ||
- template: Packages.yml | ||
parameters: | ||
official: ${{ parameters.official }} | ||
rid: osx-x64 | ||
artifactSuffix: osx | ||
|
||
- job: packages_test_windows | ||
dependsOn: packages_windows | ||
pool: | ||
type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs | ||
|
||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)/out' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts | ||
# https://aka.ms/obpipelines/sdl | ||
ob_sdl_binskim_enabled: true # you can disable sdl tools in non-official build | ||
ob_sdl_binskim_break: false # always break the build on binskim issues. You can disable it by setting to 'false' | ||
ob_sdl_binskim_scanOutputDirectoryOnly: true | ||
ob_sdl_roslyn_break: true | ||
# ob_sdl_suppression_suppressionFile: $(Build.SourcesDirectory)\.gdn\job.gdnsuppress | ||
steps: | ||
- template: PackagesTest.yml | ||
parameters: | ||
official: ${{ parameters.official }} | ||
rid: win-x64 | ||
artifactSuffix: windows | ||
|
||
- job: packages_test_linux | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sadly no osx image in the internal pipeline, which means no E2E tests :( We do have them on the GH side, though. |
||
dependsOn: packages_linux | ||
pool: | ||
# signing must happen on Windows | ||
type: linux # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs | ||
|
||
variables: | ||
ob_outputDirectory: '$(Build.SourcesDirectory)/out' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts | ||
# https://aka.ms/obpipelines/sdl | ||
ob_sdl_binskim_enabled: true # you can disable sdl tools in non-official build | ||
ob_sdl_binskim_break: false # always break the build on binskim issues. You can disable it by setting to 'false' | ||
ob_sdl_binskim_scanOutputDirectoryOnly: true | ||
ob_sdl_roslyn_break: true | ||
# ob_sdl_suppression_suppressionFile: $(Build.SourcesDirectory)\.gdn\job.gdnsuppress | ||
steps: | ||
- template: PackagesTest.yml | ||
parameters: | ||
official: ${{ parameters.official }} | ||
rid: linux-x64 | ||
artifactSuffix: linux | ||
|
||
- job: vsix | ||
dependsOn: bicep_windows | ||
pool: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
parameters: | ||
- name: official | ||
type: boolean | ||
- name: rid | ||
type: string | ||
- name: artifactSuffix | ||
type: string | ||
|
||
steps: | ||
- task: UseDotNet@2 | ||
displayName: Setup .NET Core | ||
continueOnError: true | ||
inputs: | ||
packageType: 'sdk' | ||
useGlobalJson: true | ||
performMultiLevelLookup: true | ||
|
||
# downloads to $(Pipeline.Workspace)/{artifact} | ||
- download: current | ||
displayName: Download Bicep CLI | ||
artifact: drop_build_bicep_${{ parameters.artifactSuffix }} | ||
|
||
- task: CopyFiles@2 | ||
displayName: Copy Bicep CLI for packaging | ||
inputs: | ||
sourceFolder: '$(Pipeline.Workspace)/drop_build_bicep_${{ parameters.artifactSuffix }}/bicep-Release-${{ parameters.rid }}' | ||
contents: '*' | ||
targetFolder: '$(Build.SourcesDirectory)/src/Bicep.Cli.Nuget/tools' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: Build Package | ||
inputs: | ||
command: build | ||
projects: $(Build.SourcesDirectory)/src/Bicep.Cli.Nuget/nuget.proj | ||
arguments: '--configuration $(BuildConfiguration) /p:PublicRelease=${{ parameters.official }} /p:RuntimeSuffix=${{ parameters.rid }}' | ||
|
||
- task: CopyFiles@2 | ||
displayName: Copy Package to output | ||
inputs: | ||
sourceFolder: '$(Build.SourcesDirectory)/src/Bicep.Cli.Nuget/' | ||
contents: '*.nupkg' | ||
targetFolder: '$(Build.SourcesDirectory)/out/' | ||
|
||
# test signing fails on .nupkg files | ||
- ${{ if eq(parameters.official, 'true') }}: | ||
- task: onebranch.pipeline.signing@1 | ||
displayName: Sign Nuget Packages | ||
inputs: | ||
command: 'sign' | ||
signing_profile: 'external_distribution' | ||
files_to_sign: '**/*.nupkg' | ||
search_root: '$(Build.SourcesDirectory)\out\' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Packages have to be signed on a Windows container (limitations of the current infra), but tests have to run on the right OS as separate jobs. This is different than the GH build.