@@ -76,72 +76,72 @@ Include the `submitSigningRequest` and optionally, the `getSignedArtifact` steps
7676#### Example: Submit a synchronous signing request
7777
7878``` scala
79- stage(' Sign with SignPath ') {
80- steps {
81- submitSigningRequest(
82- projectSlug : " ${PROJECT_SLUG}" ,
83- signingPolicySlug : " ${SIGNING_POLICY_SLUG}" ,
84- artifactConfigurationSlug : " ${ARTIFACT_CONFIGURATION_SLUG}" ,
85- inputArtifactPath : " build-output/my-artifact.exe" ,
86- outputArtifactPath : " build-output/my-artifact.signed.exe" ,
87- waitForCompletion : true
88- )
89- }
90- }
79+ stage(' Sign with SignPath ') {
80+ steps {
81+ submitSigningRequest(
82+ projectSlug : " ${PROJECT_SLUG}" ,
83+ signingPolicySlug : " ${SIGNING_POLICY_SLUG}" ,
84+ artifactConfigurationSlug : " ${ARTIFACT_CONFIGURATION_SLUG}" ,
85+ inputArtifactPath : " build-output/my-artifact.exe" ,
86+ outputArtifactPath : " build-output/my-artifact.signed.exe" ,
87+ waitForCompletion : true
88+ )
89+ }
90+ }
9191```
9292
9393#### Example: Submit an asynchronous signing request with parameters
9494
9595``` scala
96- stage(' Sign with SignPath ') {
97- steps {
98- script {
99- signingRequestId = submitSigningRequest(
100- projectSlug : " ${PROJECT_SLUG}" ,
101- signingPolicySlug : " ${SIGNING_POLICY_SLUG}" ,
102- artifactConfigurationSlug : " ${ARTIFACT_CONFIGURATION_SLUG}" ,
103- inputArtifactPath : " build-output/my-artifact.exe" ,
104- outputArtifactPath : " build-output/my-artifact.signed.exe" ,
105- waitForCompletion : false ,
106- parameters : [
107- " version" : " 1.0" ,
108- " my-param" : " another param"
109- ]
110- )
111- }
112- }
113- }
114- stage(' Download Signed Artifact ') {
115- input {
116- id " WaitForSigningRequestCompleted"
117- message " Has the signing request completed?"
118- }
119- steps{
120- getSignedArtifact(
121- signingRequestId : " ${signingRequestId}" ,
122- outputArtifactPath : " build-output/my-artifact.exe"
123- )
124- }
96+ stage(' Sign with SignPath ') {
97+ steps {
98+ script {
99+ signingRequestId = submitSigningRequest(
100+ projectSlug : " ${PROJECT_SLUG}" ,
101+ signingPolicySlug : " ${SIGNING_POLICY_SLUG}" ,
102+ artifactConfigurationSlug : " ${ARTIFACT_CONFIGURATION_SLUG}" ,
103+ inputArtifactPath : " build-output/my-artifact.exe" ,
104+ outputArtifactPath : " build-output/my-artifact.signed.exe" ,
105+ waitForCompletion : false ,
106+ parameters : [
107+ " version" : " 1.0" ,
108+ " my-param" : " another param"
109+ ]
110+ )
125111 }
112+ }
113+ }
114+ stage(' Download Signed Artifact ') {
115+ input {
116+ id " WaitForSigningRequestCompleted"
117+ message " Has the signing request completed?"
118+ }
119+ steps{
120+ getSignedArtifact(
121+ signingRequestId : " ${signingRequestId}" ,
122+ outputArtifactPath : " build-output/my-artifact.exe"
123+ )
124+ }
125+ }
126126```
127127
128128#### Example: Submit a signing request, but download the unsigned artifact from a HTTPS URL
129129
130130``` scala
131- stage(' Sign with SignPath ') {
132- steps {
133- submitSigningRequest(
134- projectSlug : " ${PROJECT_SLUG}" ,
135- signingPolicySlug : " ${SIGNING_POLICY_SLUG}" ,
136- artifactConfigurationSlug : " ${ARTIFACT_CONFIGURATION_SLUG}" ,
137- inputArtifactPath : " build-output/my-artifact.exe" ,
138- outputArtifactPath : " build-output/my-artifact.signed.exe" ,
139- waitForCompletion : true ,
140- inputArtifactRetrievalUrl : " https://my.download.share.com/my-artifact.exe" ,
141- inputArtifactRetrievalHttpHeaders : [
142- " Authorization" : " Bearer mysupersecretauth"
143- ]
144- )
145- }
146- }
131+ stage(' Sign with SignPath ') {
132+ steps {
133+ submitSigningRequest(
134+ projectSlug : " ${PROJECT_SLUG}" ,
135+ signingPolicySlug : " ${SIGNING_POLICY_SLUG}" ,
136+ artifactConfigurationSlug : " ${ARTIFACT_CONFIGURATION_SLUG}" ,
137+ inputArtifactPath : " build-output/my-artifact.exe" ,
138+ outputArtifactPath : " build-output/my-artifact.signed.exe" ,
139+ waitForCompletion : true ,
140+ inputArtifactRetrievalUrl : " https://my.download.share.com/my-artifact.exe" ,
141+ inputArtifactRetrievalHttpHeaders : [
142+ " Authorization" : " Bearer mysupersecretauth"
143+ ]
144+ )
145+ }
146+ }
147147```
0 commit comments