-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathtask.json
More file actions
184 lines (184 loc) · 6.93 KB
/
task.json
File metadata and controls
184 lines (184 loc) · 6.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
"id": "bf0e8eea-ad19-4b7d-8415-374d83397de5",
"name": "JFrogGo",
"friendlyName": "JFrog Go",
"description": "Build and publish go packages from and to Artifactory while allowing to collect build-info. The collected build-info can be later published to Artifactory by the \"JFrog Publish Build Info\" task.",
"author": "JFrog",
"helpMarkDown": "[More Information](https://github.com/jfrog/jfrog-azure-devops-extension#JFrog-go-Task)",
"category": "Utility",
"visibility": [
"Build",
"Release"
],
"version": {
"Major": "1",
"Minor": "12",
"Patch": "7"
},
"demands": [],
"minimumAgentVersion": "4.248.0",
"instanceNameFormat": "JFrog Go $(command)",
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"inputs": [
{
"name": "command",
"type": "pickList",
"label": "Command",
"defaultValue": "build",
"helpMarkDown": "The Go command to run.",
"required": "true",
"properties": {
"EditableOptions": "False"
},
"options": {
"build": "build",
"test": "test",
"get": "get",
"publish": "publish",
"custom": "custom"
}
},
{
"name": "customCommand",
"type": "string",
"label": "Go command to execute",
"visibleRule": "command = custom",
"required": true,
"defaultValue": "",
"helpMarkDown": "A custom Go command to execute. For example, to execute 'go version', enter 'version'."
},
{
"name": "goArguments",
"type": "string",
"label": "Arguments",
"defaultValue": "",
"required": false,
"visibleRule": "command != publish",
"helpMarkDown": "Optional arguments to the selected command. For example, build-time arguments for the 'go build' command."
},
{
"name": "version",
"type": "string",
"label": "Version",
"defaultValue": "",
"required": true,
"visibleRule": "command = publish",
"helpMarkDown": "The version of the Go project that is being published."
},
{
"name": "artifactoryConnection",
"type": "connectedService:jfrogArtifactoryService",
"label": "Artifactory service connection",
"defaultValue": "",
"required": true,
"helpMarkDown": "Artifactory service to be used by this task."
},
{
"name": "resolutionRepo",
"type": "pickList",
"label": "Go dependencies resolution repository",
"defaultValue": "",
"required": true,
"visibleRule": "command != publish",
"helpMarkDown": "The Go dependencies resolution repository.\nA virtual Go repository.",
"properties": {
"EditableOptions": "True"
}
},
{
"name": "targetRepo",
"type": "pickList",
"label": "Go target repository",
"defaultValue": "",
"required": true,
"visibleRule": "command = publish",
"helpMarkDown": "The target Go repository\nCan be a local repository or a virtual Go repository with a Default Deployment Repository.",
"properties": {
"EditableOptions": "True"
}
},
{
"name": "collectBuildInfo",
"type": "boolean",
"label": "Collect build info",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Select to collect build info and store it locally.\nThe build info can be later published to Artifactory using the \"JFrog Publish Build Info\" task."
},
{
"name": "buildName",
"type": "string",
"label": "Build name",
"defaultValue": "$(Build.DefinitionName)",
"required": true,
"visibleRule": "collectBuildInfo=true",
"helpMarkDown": "Build name.\nTo use the default build name of the pipeline, set the field to '$(Build.DefinitionName)'.\nThe collected build-info should be published to Artifactory using the 'JFrog Publish Build Info' task."
},
{
"name": "buildNumber",
"type": "string",
"label": "Build number",
"defaultValue": "$(Build.BuildNumber)",
"required": true,
"visibleRule": "collectBuildInfo=true",
"helpMarkDown": "Build number.\nTo use the default build number of the pipeline, set the field to '$(Build.BuildNumber)'.\nThe collected build-info should be published to Artifactory using the 'JFrog Publish Build Info' task."
},
{
"name": "projectKey",
"type": "string",
"label": "Project key",
"defaultValue": "",
"required": false,
"visibleRule": "collectBuildInfo=true",
"helpMarkDown": "JFrog Project key."
},
{
"name": "includeEnvVars",
"type": "boolean",
"label": "Include environment variables",
"defaultValue": "false",
"required": false,
"visibleRule": "collectBuildInfo=true",
"helpMarkDown": "Select to include environment variables in the published build info."
},
{
"name": "workingDirectory",
"type": "filePath",
"label": "Working Directory",
"defaultValue": "",
"required": false,
"groupName": "advanced",
"helpMarkDown": "The working directory where the command will run. When empty, the root of the repository (for builds) or artifacts (for releases) is used, which is the value of '$(System.DefaultWorkingDirectory)'."
}
],
"dataSourceBindings": [
{
"endpointId": "$(artifactoryConnection)",
"endpointURL": "{{endpoint.url}}/api/repositories",
"target": "resolutionRepo",
"resultSelector": "jsonpath:$[?(@.type=='VIRTUAL')]",
"resultTemplate": "{ \"Value\" : \"{{{key}}}\", \"DisplayValue\" : \"{{{key}}}\" }"
},
{
"endpointId": "$(artifactoryConnection)",
"endpointURL": "{{endpoint.url}}/api/repositories",
"target": "targetRepo",
"resultSelector": "jsonpath:$[?(@.type=='LOCAL' || @.type=='VIRTUAL')]",
"resultTemplate": "{ \"Value\" : \"{{{key}}}\", \"DisplayValue\" : \"{{{key}}}\" }"
}
],
"execution": {
"Node20_1": {
"target": "goBuild.js"
},
"Node24": {
"target": "goBuild.js"
}
}
}