Skip to content

Commit db85e59

Browse files
authored
Merge pull request #8328 from Microsoft/users/divman/portTelemetry2
Port docker telemetry changes from master to M140
2 parents 7eed049 + 0f780e2 commit db85e59

File tree

18 files changed

+66
-13
lines changed

18 files changed

+66
-13
lines changed

Tasks/DockerComposeV0/dockercompose.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ if (nopIfNoDockerComposeFile && !tl.exist(dockerFile)) {
4242
.then(function runAction() {
4343
// Run the specified action
4444
var action = tl.getInput("action", true);
45+
var telemetry = {
46+
registryType: registryType,
47+
command: action !== "Run a Docker Compose command" ? action : tl.getInput("dockerComposeCommand", true)
48+
};
49+
4550
/* tslint:disable:no-var-requires */
4651
return require({
4752
"Build services": "./dockercomposebuild",

Tasks/DockerComposeV0/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 0,
1515
"Minor": 4,
16-
"Patch": 19
16+
"Patch": 20
1717
},
1818
"demands": [],
1919
"preview": "false",

Tasks/DockerComposeV0/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 0,
1515
"Minor": 4,
16-
"Patch": 19
16+
"Patch": 20
1717
},
1818
"demands": [],
1919
"preview": "false",

Tasks/DockerV0/container.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ connection.open(tl.getInput("dockerHostEndpoint"), registryAuthenticationToken);
3232

3333
// Run the specified action
3434
var action = tl.getInput("action", true);
35+
var telemetry = {
36+
registryType: registryType,
37+
command: action !== "Run a Docker command" ? action : tl.getInput("customCommand", true)
38+
};
39+
40+
console.log("##vso[telemetry.publish area=%s;feature=%s]%s",
41+
"TaskEndpointId",
42+
"DockerV0",
43+
JSON.stringify(telemetry));
3544
/* tslint:disable:no-var-requires */
3645
require({
3746
"Build an image": "./containerbuild",

Tasks/DockerV0/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 0,
1515
"Minor": 3,
16-
"Patch": 17
16+
"Patch": 18
1717
},
1818
"demands": [],
1919
"preview": "false",

Tasks/DockerV0/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 0,
1515
"Minor": 3,
16-
"Patch": 17
16+
"Patch": 18
1717
},
1818
"demands": [],
1919
"preview": "false",

Tasks/DockerV1/container.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,17 @@ var dockerCommandMap = {
4444
"logout": "./dockerlogout"
4545
}
4646

47+
var telemetry = {
48+
registryType: registryType,
49+
command: command
50+
};
51+
console.log("##vso[telemetry.publish area=%s;feature=%s]%s",
52+
"TaskEndpointId",
53+
"DockerV1",
54+
JSON.stringify(telemetry));
55+
4756
var commandImplementation = require("./containercommand");
48-
if(command in dockerCommandMap) {
57+
if (command in dockerCommandMap) {
4958
commandImplementation = require(dockerCommandMap[command]);
5059
}
5160

Tasks/DockerV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 1,
1515
"Minor": 1,
16-
"Patch": 5
16+
"Patch": 6
1717
},
1818
"demands": [],
1919
"releaseNotes": "Simplified the task by:<br/>&nbsp;- Providing an option to simply select or type a command.<br/>&nbsp;- Retaining the useful input fields and providing an option to pass the rest as an argument to the command.",

Tasks/DockerV1/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 1,
1515
"Minor": 1,
16-
"Patch": 5
16+
"Patch": 6
1717
},
1818
"demands": [],
1919
"releaseNotes": "ms-resource:loc.releaseNotes",

Tasks/HelmDeployV0/src/helm.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ async function run() {
5858

5959
var helmCli : helmcli = new helmcli();
6060
helmCli.login();
61+
var connectionType = tl.getInput("connectionType", true);
62+
var telemetry = {
63+
connectionType: connectionType,
64+
command: command
65+
};
66+
67+
console.log("##vso[telemetry.publish area=%s;feature=%s]%s",
68+
"TaskEndpointId",
69+
"HelmDeployV0",
70+
JSON.stringify(telemetry));
6171

6272
try {
6373
switch (command){

0 commit comments

Comments
 (0)