Skip to content

Commit f4e8fa6

Browse files
Harshil Lodhidivman25
authored andcommitted
more changes
# Conflicts: # Tasks/DockerV0/container.ts # Tasks/DockerV1/container.ts
1 parent 8abe0be commit f4e8fa6

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
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/DockerV0/container.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ 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
38+
command: action !== "Run a Docker command" ? action : tl.getInput("customCommand", true)
39+
};
40+
41+
console.log("##vso[telemetry.publish area=%s;feature=%s]%s",
42+
"TaskEndpointId",
43+
"DockerV0",
44+
JSON.stringify(telemetry));
3545
/* tslint:disable:no-var-requires */
3646
require({
3747
"Build an image": "./containerbuild",

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

0 commit comments

Comments
 (0)