upload-to-onedrive
This task uploads the specified artifact to a user folder on the OneDrive server.
Parameters
driveClientId: The Application (client) ID in the Azure application.driveClientSecret: The value under Certificates & secrets in the Azure application.driveTenantId: The Directory (tenant) ID in the Azure application.driveOwner: The email address of the user account where files will be uploaded.
For each artifact listed in inputArtifacts, a path for saving the file must be specified as follows:
"<artifact_name>": "<remote_path>"
If the path includes subfolders, the handler checks for their existence and attempts to create them if necessary. For example:
"design": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/source-design-{{project.id}}"
Artifact Group Processing
The task supports processing artifact groups. The * symbol indicates the insertion point for the artifact index in the file path. For example:
"result*": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/print-file-*-{{project.id}}"
Overriding the path for a specified artifact in the group is also supported. For example:
"result1": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/override-name-for-the-first-result"
All parameter values support argument interpolation following the common rules.
Example
{
"description": "Upload to OneDrive",
"name": "upload-to-onedrive",
"type": "upload-to-onedrive",
"inputArtifacts": [
"hires-design-pdf"
],
"parameters": {
"driveClientId": "1234",
"driveClientSecret": "1234",
"driveTenantId": "1234",
"driveOwner": "j.wood@example.com",
"hires-design-pdf": "TestFolder/Test/hires-{{project.id}}"
},
"outputArtifacts": []
}