-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Drop artifact to Publish and Download build artifacts… #2
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,6 +231,16 @@ async function main(): Promise<void> { | |
reject(reason); | ||
})); | ||
} | ||
else if (artifact.resource.type.toLowerCase() === "drop") { | ||
let properties = { | ||
artifacttype: artifact.resource.type, | ||
artifactname: artifact.name, | ||
itempattern: itemPattern, | ||
manifestid: artifact.resource.data | ||
}; | ||
|
||
tl.command("artifact.download", properties, downloadPath); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's why artifact.download needs to be removed |
||
} | ||
else { | ||
console.log(tl.loc("UnsupportedArtifactType", artifact.resource.type)); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ async function run() { | |
|
||
// upload or copy | ||
if (artifactType === "container") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is a good opportunity to rename the task value for "Visual Studio Team Services/TFS" to As far as people switching from v1 to v2: We're allowed to make breaking changes in new major versions, but we could check |
||
data["containerfolder"] = artifactName; | ||
data["uploadservice"] = "drop"; | ||
|
||
// add localpath to ##vso command's properties for back compat of old Xplat agent | ||
data["localpath"] = pathtoPublish; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,10 @@ | |
"Build" | ||
], | ||
"author": "Microsoft Corporation", | ||
"preview": true, | ||
"version": { | ||
"Major": 1, | ||
"Minor": 131, | ||
"Major": 2, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should take this opportunity to rename the task "PublishDropArtifact" since this should work in the future from a release as well |
||
"Minor": 0, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2.133.0 instead 2.0.0 :) |
||
"Patch": 0 | ||
}, | ||
"demands": [], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, we should not add this command permanently. When this command is used, I would have the command handler check the currently running task and verify the ID is your task otherwise fail. Customers should not be able to use this in their ad hoc scripts. Fire and forget command doesn't make sense for download, from user scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be just switch the entire drop download into C# when GA?