-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[New task] To create a dynamic resource on runtime (#11530)
* [New task] To create a dynamic resource on runtime * updating package * Renaming task to ReviewAppV0 * Resolving comments
- Loading branch information
1 parent
1ae43e3
commit f907e16
Showing
18 changed files
with
3,986 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
Tasks/ReviewAppV0/Strings/resources.resjson/en-US/resources.resjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"loc.friendlyName": "Review App", | ||
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=613735)", | ||
"loc.description": "Use this task under deploy phase provider to create a resource dynamically", | ||
"loc.instanceNameFormat": "Dynamic Resource created using - $(resourceName)", | ||
"loc.releaseNotes": "Use this task under deploy phase provider to create a resource dynamically", | ||
"loc.input.label.resourceName": "Resource name", | ||
"loc.input.help.resourceName": "Name of an existing resource in the environment which will be used for resource type information", | ||
"loc.input.label.baseEnvironmentName": "Environment name", | ||
"loc.input.label.reviewResourceName": "Review Resource Name", | ||
"loc.messages.CreatedDynamicResource": "A dynamic resource is created using %s" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "dynamic-resource-task", | ||
"version": "1.0.0", | ||
"description": "Azure Pipelines Dynamic Resource Task", | ||
"main": "run.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Microsoft/azure-pipelines-tasks.git" | ||
}, | ||
"author": "Microsoft Corporation", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Microsoft/azure-pipelines-tasks/issues" | ||
}, | ||
"homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme", | ||
"dependencies": { | ||
"azure-pipelines-task-lib": "2.9.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
import * as tl from 'azure-pipelines-task-lib'; | ||
import * as path from 'path'; | ||
|
||
async function run() { | ||
try { | ||
tl.setResourcePath(path.join(__dirname, 'task.json')); | ||
const source = tl.getInput('resourceName', true); | ||
console.log(tl.loc('CreatedDynamicResource', source)); | ||
} catch (err) { | ||
tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed', true); | ||
} | ||
} | ||
|
||
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"id": "DEEAFED4-0B18-4F58-968D-86655B4D2CE9", | ||
"name": "ReviewApp", | ||
"friendlyName": "Review App", | ||
"description": "Use this task under deploy phase provider to create a resource dynamically", | ||
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=613735)", | ||
"category": "Utility", | ||
"preview": true, | ||
"visibility": [ | ||
"Build" | ||
], | ||
"runsOn": [ | ||
"Agent", | ||
"DeploymentGroup" | ||
], | ||
"author": "Microsoft Corporation", | ||
"version": { | ||
"Major": 0, | ||
"Minor": 0, | ||
"Patch": 1 | ||
}, | ||
"releaseNotes": "Use this task under deploy phase provider to create a resource dynamically", | ||
"inputs": [ | ||
{ | ||
"name": "resourceName", | ||
"type": "string", | ||
"label": "Resource name", | ||
"required": true, | ||
"defaultValue": "", | ||
"helpMarkDown": "Name of an existing resource in the environment which will be used for resource type information" | ||
}, | ||
{ | ||
"name": "baseEnvironmentName", | ||
"type": "string", | ||
"label": "Environment name", | ||
"required": false, | ||
"defaultValue": "" | ||
}, | ||
{ | ||
"name": "reviewResourceName", | ||
"type": "string", | ||
"label": "Review Resource Name", | ||
"required": false, | ||
"defaultValue": "" | ||
} | ||
|
||
], | ||
"instanceNameFormat": "Dynamic Resource created using - $(resourceName)", | ||
"execution": { | ||
"Node": { | ||
"target": "run.js", | ||
"argumentFormat": "" | ||
} | ||
}, | ||
"messages": { | ||
"CreatedDynamicResource": "A dynamic resource is created using %s" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"id": "DEEAFED4-0B18-4F58-968D-86655B4D2CE9", | ||
"name": "ReviewApp", | ||
"friendlyName": "ms-resource:loc.friendlyName", | ||
"description": "ms-resource:loc.description", | ||
"helpMarkDown": "ms-resource:loc.helpMarkDown", | ||
"category": "Utility", | ||
"preview": true, | ||
"visibility": [ | ||
"Build" | ||
], | ||
"runsOn": [ | ||
"Agent", | ||
"DeploymentGroup" | ||
], | ||
"author": "Microsoft Corporation", | ||
"version": { | ||
"Major": 0, | ||
"Minor": 0, | ||
"Patch": 1 | ||
}, | ||
"releaseNotes": "ms-resource:loc.releaseNotes", | ||
"inputs": [ | ||
{ | ||
"name": "resourceName", | ||
"type": "string", | ||
"label": "ms-resource:loc.input.label.resourceName", | ||
"required": true, | ||
"defaultValue": "", | ||
"helpMarkDown": "ms-resource:loc.input.help.resourceName" | ||
}, | ||
{ | ||
"name": "baseEnvironmentName", | ||
"type": "string", | ||
"label": "ms-resource:loc.input.label.baseEnvironmentName", | ||
"required": false, | ||
"defaultValue": "" | ||
}, | ||
{ | ||
"name": "reviewResourceName", | ||
"type": "string", | ||
"label": "ms-resource:loc.input.label.reviewResourceName", | ||
"required": false, | ||
"defaultValue": "" | ||
} | ||
], | ||
"instanceNameFormat": "ms-resource:loc.instanceNameFormat", | ||
"execution": { | ||
"Node": { | ||
"target": "run.js", | ||
"argumentFormat": "" | ||
} | ||
}, | ||
"messages": { | ||
"CreatedDynamicResource": "ms-resource:loc.messages.CreatedDynamicResource" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"module": "commonjs" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "vsts-cmdline-task", | ||
"dependencies": {}, | ||
"globalDependencies": { | ||
"node": "registry:dt/node#6.0.0+20160920093002", | ||
"q": "registry:dt/q#0.0.0+20160613154756" | ||
} | ||
} |
Oops, something went wrong.