Skip to content
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

Users/mizho/dropplugins #7610

Merged
merged 4 commits into from
Jul 6, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Tasks/Checkout/task.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this file, this is an example for you, not for final check-in :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

"id" : "c61807ba-5e20-4b70-bd8c-3683c9f74003",
"name" : "checkout",
"friendlyName" : "Get Source",
"description" : "Get Source",
"helpMarkDown" : "",
"category" : "Utility",
"visibility" : ["Build", "Release"],
"runsOn" : ["Agent", "DeploymentGroup"],
"author" : "Microsoft Corporation",
"version" : {
"Major" : 1,
"Minor" : 0,
"Patch" : 1
},
"inputs" : [{
"name" : "repository",
"type" : "string",
"label" : "Repository",
"required" : true,
"defaultValue" : "self",
}, {
"name" : "clean",
"type" : "boolean",
"label" : "Clean",
"defaultValue" : "true",
"required" : false,
}
],
"execution" : {
"AgentPlugin" : {
"target" : "Agent.Plugins.Repository.CheckoutTask, Agent.Plugins"
}
},
"postjobexecution" : {
"AgentPlugin" : {
"target" : "Agent.Plugins.Repository.CleanupTask, Agent.Plugins"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"loc.friendlyName": "Download Build Drop",
"loc.helpMarkDown": "",
"loc.description": "Download Build Drop",
"loc.instanceNameFormat": "Download Build Drop",
"loc.input.label.buildid": "The specific build to download from",
"loc.input.help.buildid": "The build to download from. Target the current build if left blank.",
"loc.input.label.artifactname": "The name of artifact to download.",
"loc.input.help.artifactname": "The name of artifact to download. The artifact must be a build drop.",
"loc.input.label.targetpath": "Path to download to",
"loc.input.help.targetpath": "The folder path to download the artifact to. This can be a fully-qualified path or a path relative to the root of the repository. Wildcards are not supported. [Variables](https://go.microsoft.com/fwlink/?LinkID=550988) are supported. Example: $(Build.DropDownloadingDirectory)"
}
48 changes: 48 additions & 0 deletions Tasks/DownloadBuildDropV0/task.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

mark this task as preview

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"id": "61F2A582-95AE-4948-B34D-A1B3C4F6A737",
"name": "DownloadBuildDrop",
"friendlyName": "Download Build Drop",
"description": "Download Build Drop",
"helpMarkDown": "",
Copy link
Contributor

Choose a reason for hiding this comment

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

you might want to fill out helpMarkDown

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"category": "Utility",
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 137,
"Patch": 0
},
"groups": [],
"demands": [],
Copy link
Contributor

@TingluoHuang TingluoHuang Jul 2, 2018

Choose a reason for hiding this comment

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

you need demand min agent version for your new tasks to prevent your task landed on an agent that doesn't have your plugin implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it something like this?

"minimumAgentVersion": "1.91.0",

But what version should I use?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

you might want to target next agent release. do 2.138.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

"inputs": [
{
"name": "buildid",
"type": "string",
"label": "The specific build to download from",
"required": false,
"helpMarkDown": "The build to download from. Target the current build if left blank."
},
{
"name": "artifactname",
"type": "string",
"label": "The name of artifact to download.",
"required": true,
"helpMarkDown": "The name of artifact to download. The artifact must be a build drop."
},
{
"name": "targetpath",
"type": "filePath",
"label": "Path to download to",
"defaultValue": "$(Build.DropDownloadingDirectory)",
Copy link
Contributor

Choose a reason for hiding this comment

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

why default to this variable? is this a predefined variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

"required": true,
"helpMarkDown": "The folder path to download the artifact to. This can be a fully-qualified path or a path relative to the root of the repository. Wildcards are not supported. [Variables](https://go.microsoft.com/fwlink/?LinkID=550988) are supported. Example: $(Build.DropDownloadingDirectory)"
}
],
"instanceNameFormat": "Download Build Drop",
"execution": {
"AgentPlugin": {
"target": "Agent.Plugins.BuildDrop.DownloadBuildDropTask, Agent.Plugins"
}
},
"messages": {
}
}
47 changes: 47 additions & 0 deletions Tasks/DownloadBuildDropV0/task.loc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"id": "61F2A582-95AE-4948-B34D-A1B3C4F6A737",
"name": "DownloadBuildDrop",
"friendlyName": "ms-resource:loc.friendlyName",
"description": "ms-resource:loc.description",
"helpMarkDown": "ms-resource:loc.helpMarkDown",
"category": "Utility",
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 137,
"Patch": 0
},
"groups": [],
"demands": [],
"inputs": [
{
"name": "buildid",
"type": "string",
"label": "ms-resource:loc.input.label.buildid",
"required": false,
"helpMarkDown": "ms-resource:loc.input.help.buildid"
},
{
"name": "artifactname",
"type": "string",
"label": "ms-resource:loc.input.label.artifactname",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.artifactname"
},
{
"name": "targetpath",
"type": "filePath",
"label": "ms-resource:loc.input.label.targetpath",
"defaultValue": "$(Build.DropDownloadingDirectory)",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.targetpath"
}
],
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
"execution": {
"AgentPlugin": {
"target": "Agent.Plugins.BuildDrop.DownloadBuildDropTask, Agent.Plugins"
}
},
"messages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"loc.friendlyName": "Publish Build Drop",
"loc.helpMarkDown": "",
"loc.description": "Publish Build Drop",
"loc.instanceNameFormat": "Publish Build Drop",
"loc.input.label.artifactname": "The name of this artifact",
"loc.input.help.artifactname": "The name of this artifact.",
"loc.input.label.targetpath": "Path to publish",
"loc.input.help.targetpath": "The folder or file path to publish. This can be a fully-qualified path or a path relative to the root of the repository. Wildcards are not supported. [Variables](https://go.microsoft.com/fwlink/?LinkID=550988) are supported. Example: $(Build.DropStagingDirectory)"
}
42 changes: 42 additions & 0 deletions Tasks/PublishBuildDropV0/task.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

mark as preview

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"id": "ECDC45F6-832D-4AD9-B52B-EE49E94659BE",
"name": "PublishBuildDrop",
"friendlyName": "Publish Build Drop",
"description": "Publish Build Drop",
"helpMarkDown": "",
Copy link
Contributor

Choose a reason for hiding this comment

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

you might want to fill out helpMarkDown

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

"category": "Utility",
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 137,
"Patch": 0
},
"groups": [],
"demands": [],
Copy link
Contributor

Choose a reason for hiding this comment

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

min agent version demands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"inputs": [
{
"name": "artifactname",
"type": "string",
"label": "The name of this artifact",
"defaultValue": "",
Copy link
Contributor

Choose a reason for hiding this comment

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

i thought we have a default artifact name "drop" today, do we?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

"required": true,
"helpMarkDown": "The name of this artifact."
},
{
"name": "targetpath",
"type": "filePath",
"label": "Path to publish",
"defaultValue": "$(Build.DropStagingDirectory)",
Copy link
Contributor

Choose a reason for hiding this comment

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

is this variable exist? who populate it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

"required": true,
"helpMarkDown": "The folder or file path to publish. This can be a fully-qualified path or a path relative to the root of the repository. Wildcards are not supported. [Variables](https://go.microsoft.com/fwlink/?LinkID=550988) are supported. Example: $(Build.DropStagingDirectory)"
}
],
"instanceNameFormat": "Publish Build Drop",
"execution": {
"AgentPlugin": {
"target": "Agent.Plugins.BuildDrop.PublishBuildDropTask, Agent.Plugins"
}
},
"messages": {
}
}
41 changes: 41 additions & 0 deletions Tasks/PublishBuildDropV0/task.loc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"id": "ECDC45F6-832D-4AD9-B52B-EE49E94659BE",
"name": "PublishBuildDrop",
"friendlyName": "ms-resource:loc.friendlyName",
"description": "ms-resource:loc.description",
"helpMarkDown": "ms-resource:loc.helpMarkDown",
"category": "Utility",
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 137,
"Patch": 0
},
"groups": [],
"demands": [],
"inputs": [
{
"name": "artifactname",
"type": "string",
"label": "ms-resource:loc.input.label.artifactname",
"defaultValue": "",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.artifactname"
},
{
"name": "targetpath",
"type": "filePath",
"label": "ms-resource:loc.input.label.targetpath",
"defaultValue": "$(Build.DropStagingDirectory)",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.targetpath"
}
],
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
"execution": {
"AgentPlugin": {
"target": "Agent.Plugins.BuildDrop.PublishBuildDropTask, Agent.Plugins"
}
},
"messages": {}
}