-
Notifications
You must be signed in to change notification settings - Fork 64
CI check signatures #382
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
CI check signatures #382
Changes from all commits
b586f71
e55a773
bacef55
f955850
c556640
1bce5d5
04816fd
6c935ec
946298c
97d39bc
0ec94bc
5339172
75b75c7
9eccc84
163f336
67397d1
b34234f
3575f9a
9590912
f0715de
00d5143
bfd0450
6cc3d2c
017d845
70b35ab
8be0823
a2dc6fc
f4d08c3
04dbba6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ extends: | |
| stages: | ||
| - stage: build | ||
| displayName: Build | ||
|
|
||
| jobs: | ||
| - template: /eng/common/templates-official/jobs/jobs.yml@self | ||
| parameters: | ||
|
|
@@ -99,8 +100,6 @@ extends: | |
| - name: _OfficialBuildArgs | ||
| value: '' | ||
| steps: | ||
| - checkout: self | ||
| clean: true | ||
| - script: eng\common\cibuild.cmd | ||
| -configuration $(_BuildConfig) | ||
| -prepareMachine | ||
|
|
@@ -112,11 +111,16 @@ extends: | |
| inputs: | ||
| sourceFolder: 'artifacts/packages/$(_BuildConfig)/Shipping/' | ||
| contents: '*.msi' | ||
| targetFolder: '$(Build.ArtifactStagingDirectory)' | ||
| targetFolder: '$(Build.ArtifactStagingDirectory)\artifacts' | ||
|
Contributor
Author
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. Added artifacts dir to isolate from other files when doing signing verification in the next step |
||
| - task: MicroBuildCodesignVerify@3 | ||
| inputs: | ||
| TargetFolders: '$(Build.ArtifactStagingDirectory)\artifacts' | ||
| ExcludeSNVerify: true | ||
|
Member
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. What does ExcludeSNVerify do? May you provide the link to where this task is documented, I couldn't find it on the web.
Contributor
Author
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.
Member
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. Thank you :) |
||
| ApprovalListPathForCerts: eng\SignVerifyIgnore.txt | ||
| - task: 1ES.PublishBuildArtifacts@1 | ||
| condition: and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release')) | ||
| inputs: | ||
| PathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
| PathtoPublish: '$(Build.ArtifactStagingDirectory)\artifacts' | ||
| ArtifactName: 'drop-windows' | ||
| publishLocation: 'Container' | ||
| parallel: true | ||
|
|
@@ -132,28 +136,35 @@ extends: | |
| _RID: osx-arm64 | ||
| X64: | ||
| _RID: osx-x64 | ||
| variables: | ||
| - name: _BuildConfig | ||
| value: Release | ||
| - name: _SignType | ||
| value: real | ||
| steps: | ||
| - checkout: self | ||
| clean: true | ||
| - script: eng/common/cibuild.sh | ||
| --sign | ||
| --configuration Release | ||
| -sign | ||
| --configuration $(_BuildConfig) | ||
| --prepareMachine | ||
| -p:RID=$(_RID) -p:DotNetSignType=real -p:TeamName=$(TeamName) -p:OfficialBuildId=$(Build.BuildNumber) | ||
| -p:RID=$(_RID) -p:DotNetSignType=$(_SignType) -p:TeamName=$(TeamName) -p:OfficialBuildId=$(Build.BuildNumber) | ||
| displayName: Build | ||
| - script: | | ||
| codesign -dv --verbose=4 artifacts/layout/dotnet-core-uninstall/dotnet-core-uninstall | ||
| name: VerifySignature | ||
| displayName: Verify Signature | ||
| - task: ArchiveFiles@2 | ||
| condition: eq(variables['system.pullrequest.isfork'], false) | ||
| inputs: | ||
| rootFolderOrFile: 'artifacts/layout/dotnet-core-uninstall/' | ||
| includeRootFolder: false | ||
| archiveType: 'tar' | ||
| tarCompression: 'gz' | ||
| archiveFile: '$(Build.ArtifactStagingDirectory)/dotnet-core-uninstall.tar.gz' | ||
| archiveFile: '$(Build.ArtifactStagingDirectory)/artifacts/dotnet-core-uninstall.tar.gz' | ||
| replaceExistingArchive: true | ||
| - task: 1ES.PublishBuildArtifacts@1 | ||
| condition: eq(variables['system.pullrequest.isfork'], false) | ||
| inputs: | ||
| PathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
| PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts' | ||
| ArtifactName: 'drop-$(_RID)' | ||
| publishLocation: 'Container' | ||
| parallel: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| **\*.xml,ignore unsigned .xml | ||
| **\cab*.cab.cab,ignore unsigned .cab |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,12 @@ | ||
| <Project> | ||
| <!-- Entitlements are needed but not automatically added for macOS. See https://github.com/dotnet/runtime/issues/113707 --> | ||
| <!-- This generates an ad-hoc signature that will later be resigned, but keeps the entitlements. --> | ||
| <Target Name="AddMacEntitlements" AfterTargets="GenerateLayout"> | ||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="$(MicrosoftVisualStudioEngMicroBuildCoreVersion)" /> | ||
| </ItemGroup> | ||
| <Target Name="AddMacEntitlements" | ||
| BeforeTargets="SignFiles" | ||
| AfterTargets="GenerateLayout"> | ||
|
Comment on lines
+4
to
+9
Contributor
Author
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. Important so that this runs before MicroBuild signing |
||
| <Exec Command="codesign -s - -f --entitlements $(MSBuildThisFileDirectory)entitlements.plist $(ArtifactsDir)layout/dotnet-core-uninstall/dotnet-core-uninstall" /> | ||
| </Target> | ||
| </Project> | ||
Uh oh!
There was an error while loading. Please reload this page.