Skip to content

Proposal for adding local filepath support#40

Open
little-fort wants to merge 3 commits intoStefanKert:masterfrom
little-fort:feature/local-file-support
Open

Proposal for adding local filepath support#40
little-fort wants to merge 3 commits intoStefanKert:masterfrom
little-fort:feature/local-file-support

Conversation

@little-fort
Copy link

As mentioned in issue #38, the code signing task is failing when adding a condition to the task. This seems to be caused by the pipeline's handling of secure file downloads, which prevents conditions from being applied successfully.

To create an alternative solution, these proposed changes would allow a user to manually configure the local filepath of the certificate that should be used for signing. This could allow a user to point to a cert store that already exists on the build machine, or to simply implement the DownloadSecureFile task separately.

Changes:

  • task.json: Added the secureFileLocation and secureFileLocalPath options. The idea is that the user can select whether the task should look for the cert in the Azure secure files library or a local filepath, determined by the secureFileLocation property. For UI-based configuration, the secureFileLocation option is presented as a radio button with Azure as the default choice. The UI will also show/hide the secureFileLocalPath and secureFileId controls based on which location is selected. This change required removing the "required": true flag on the secureFileId field, since the web page will still trigger validation even if the control is hidden.
  • precodesigning.ts: Using the added secureFileLocation input value, conditional logic is applied to determine how the SECURE_FILE_PATH task variable should be set. If the location was set to Azure, then the secure file will be downloaded using the same method as before. However, if the location was set to a specific filepath, then the task variable will be populated by the value configured in the secureFileLocalPath input. The rest of the task's logic can remain unchanged.

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.

1 participant