Skip to content

Conversation

TravisEz13
Copy link
Member

@TravisEz13 TravisEz13 commented Nov 19, 2020

Add Pgp signing template

  • make it clear which json template ran
  • log the generated json

$fileName = $file.Name
Move-Item -Path "${{ parameters.buildOutputPath }}\$fileName" -Dest "$(Agent.TempDirectory)\$fileName"
Write-Host "##vso[artifact.upload containerfolder=signingReport;artifactname=signingReport]$(Agent.TempDirectory)\$fileName"
Copy-Item -Path ${{ parameters.buildOutputPath }}\* -Dest ${{ parameters.signOutputPath }}\ -Recurse -Force -Verbose
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the copy happen before the ESRP task so we can have unsigned files still in buildOutputPath?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a behavior change. I can work on this after I get this work done.

I think this makes sense

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing, is we might end up with unsigned files in the signed folder.

Copy link
Contributor

@JamesWTruher JamesWTruher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this looks fine

Write-Host "##$vstsCommandString"
displayName: Generate signing JSON
displayName: Generate Authenticode signing JSON
condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], ''))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be the same calculation as in EsrpSign. Is there someway to have only a single instance of this calculation be shared between files?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best I can think of is to pass it in as parameter and it causes issues. I'll file a feature request for step templates to be conditional.

https://developercommunity.visualstudio.com/idea/1262508/allow-specifying-a-condition-for-a-set-of-template.html

Write-Verbose -Message ("sending " + $vstsCommandString) -Verbose
Write-Host "##$vstsCommandString"
displayName: Generate PGP signing JSON
condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], ''))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep - and here is that calculation again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately, we tried doing the calculation one time and it causes issues

@TravisEz13 TravisEz13 merged commit 79b23b1 into master Nov 20, 2020
@TravisEz13 TravisEz13 deleted the pgp branch November 20, 2020 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants