Skip to content

Commit a1d31f8

Browse files
author
Paul Savoie
committed
updates README and removes trigger
1 parent a98b35b commit a1d31f8

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
# Using SignPath with GitHub Actions
1+
# Using SignPath with GitHub Actions or Azure DevOps
22

3-
This project demonstrates signing artifacts using [SignPath](https://about.signpath.io) from GitHub Actions workflows.
3+
This project demonstrates signing artifacts using [SignPath](https://about.signpath.io) from GitHub Actions workflows or Azure DevOps pipelines.
4+
5+
## GitHub
46

57
Signing is invoked in the `sign` step of [.github/workflows/build-and-sign.yml](.github/workflows/build-and-sign.yml).
68

7-
See [github.com/SignPath/github-actions](https://github.com/SignPath/github-actions) for a full documentation of SignPath actions.
9+
See [the documentation](https://about.signpath.io/documentation/trusted-build-systems/github) for a full documentation of the integration.
10+
11+
## Azure DevOps
12+
13+
Signing is invoked in the `Sign` step of [azure-pipelines.yml](azure-pipelines.yml).
14+
15+
See [the documentation](https://about.signpath.io/documentation/trusted-build-systems/azure-devops) for a full documentation of the integration.
816

917
## Policy demonstrations
1018

@@ -22,14 +30,21 @@ To use this demo with your own SignPath subscription, you need to get access to
2230
* In your SignPath organization, create a project with
2331
* Slug: `Demo_Application`
2432
* Repository URLs: Your forked GitHub repository, e.g. `https://github.com/my/github-actions-demo`
25-
* Trusted Build Systems: Link _GitHub.com_
33+
* Trusted Build Systems: Link _GitHub.com_ or _AzureDevOps.com_ respectively
2634
* Add the following artifact configuration as default: [.signpath/artifact-configurations/default.xml](.signpath/artifact-configurations/default.xml)
2735
* Add a `test-signing` signing policy
2836
* Add a `release-signing` signing policy with origin verification enabled and restricted to `main` and `release/*` branches
37+
38+
### GitHub configuration
39+
2940
* Create an [API token] in SignPath and add it as a GitHub Actions secret `SIGNPATH_API_TOKEN` (make sure the user is a submitter in your signing policies)
3041
* Add your SignPath _Organization ID_ as a GitHub Actions variable `SIGNPATH_ORGANIZATION_ID` (click your organization's name at the upper right corner)
3142
* Enable Actions for your GitHub repository
3243

44+
### Azure DevOps configuration
45+
46+
* Install the extension and add a service connection to your project
47+
3348

3449
[signing policy]: https://about.signpath.io/documentation/projects#signing-policies
3550
[artifact configuration]: https://about.signpath.io/documentation/projects#artifact-configurations

azure-pipelines.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# see /README.md
22

3-
trigger:
4-
- main
3+
trigger: none
54

65
pool:
76
vmImage: windows-2022
@@ -27,20 +26,24 @@ jobs:
2726
filePath: './sbom/Create-SBOM.ps1'
2827

2928
- task: PublishBuildArtifacts@1
29+
displayName: Upload unsigned artifact
3030
inputs:
3131
PathtoPublish: '$(Build.SourcesDirectory)/_BuildResult-unsigned'
3232
ArtifactName: 'unsigned-artifact'
3333

3434
- task: SubmitSigningRequest@1
35+
displayName: Sign
3536
inputs:
3637
serviceConnectionName: 'SignPath Demo'
3738
projectSlug: 'Demo_Application'
3839
signingPolicySlug: 'release-signing'
40+
artifactConfigurationSlug: 'azure-devops'
3941
azureDevOpsArtifactName: 'unsigned-artifact'
4042
waitForCompletion: true
4143
outputArtifactDirectory: '$(Build.SourcesDirectory)/demo-application-signed'
4244

4345
- task: PublishBuildArtifacts@1
46+
displayName: Upload signed artifact
4447
inputs:
4548
PathtoPublish: '$(Build.SourcesDirectory)/demo-application-signed'
4649
ArtifactName: 'signed-artifact'

0 commit comments

Comments
 (0)