-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathtask.json
More file actions
145 lines (145 loc) · 5.23 KB
/
task.json
File metadata and controls
145 lines (145 loc) · 5.23 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
{
"id": "32f70de9-cdd0-4009-831a-856c52a4a0ba",
"name": "JFrogBuildPromotion",
"friendlyName": "JFrog Build Promotion",
"description": "Promote a published build in Artifactory.",
"author": "JFrog",
"helpMarkDown": "[More Information](https://github.com/jfrog/jfrog-azure-devops-extension#jfrog-build-promotion)",
"category": "Utility",
"visibility": [
"Build",
"Release"
],
"demands": [],
"version": {
"Major": "1",
"Minor": "12",
"Patch": "7"
},
"minimumAgentVersion": "4.248.0",
"instanceNameFormat": "JFrog Build Promotion",
"inputs": [
{
"name": "artifactoryConnection",
"type": "connectedService:jfrogArtifactoryService",
"label": "Artifactory service connection",
"defaultValue": "",
"required": true,
"helpMarkDown": "Artifactory service to be used by this task."
},
{
"name": "buildName",
"type": "string",
"label": "Build name",
"defaultValue": "$(Build.DefinitionName)",
"required": true,
"helpMarkDown": "Name of a build, which is already published to Artifactory, to be promoted.\nTo use the default build name of the pipeline, set the field to '$(Build.DefinitionName)'."
},
{
"name": "buildNumber",
"type": "string",
"label": "Build number",
"defaultValue": "$(Build.BuildNumber)",
"required": true,
"helpMarkDown": "Number of a build, which is already published to Artifactory, to be promoted.\nTo use the default build number of the pipeline, set the field to '$(Build.BuildNumber)'."
},
{
"name": "projectKey",
"type": "string",
"label": "Project key",
"defaultValue": "",
"required": false,
"helpMarkDown": "JFrog Project key."
},
{
"name": "targetRepo",
"type": "pickList",
"label": "Target repository",
"defaultValue": "",
"required": true,
"helpMarkDown": "Sets the target promotion repository.",
"properties": {
"EditableOptions": "True"
}
},
{
"name": "status",
"type": "string",
"label": "Status",
"defaultValue": "Released",
"required": true,
"helpMarkDown": "Sets the new build status."
},
{
"name": "comment",
"type": "string",
"label": "Comment",
"defaultValue": "",
"required": false,
"helpMarkDown": "Allows the user to add a comment describing the reason for promotion."
},
{
"name": "sourceRepo",
"type": "pickList",
"label": "Source repository",
"defaultValue": "",
"required": false,
"helpMarkDown": "Sets the source repository from which to promote the release published artifacts. If not specified, Artifactory would determine from which repository to promote.",
"properties": {
"EditableOptions": "True"
}
},
{
"name": "includeDependencies",
"type": "boolean",
"label": "Include build dependencies",
"defaultValue": "false",
"required": true,
"helpMarkDown": "When selected the build dependencies will be promoted."
},
{
"name": "copy",
"type": "boolean",
"label": "Use copy",
"defaultValue": "false",
"required": true,
"helpMarkDown": "Select to copy the promoted artifacts and dependencies. If this field is not selected, they will be moved."
},
{
"name": "dryRun",
"type": "boolean",
"label": "Dry run",
"defaultValue": "false",
"required": true,
"helpMarkDown": "When selected, the promotion is simulated and the build is not promoted. A failed simulation causes the task to fail."
}
],
"dataSourceBindings": [
{
"endpointId": "$(artifactoryConnection)",
"endpointURL": "{{endpoint.url}}/api/repositories",
"target": "targetRepo",
"resultSelector": "jsonpath:$[?(@.type=='VIRTUAL' || @.type=='LOCAL')]",
"resultTemplate": "{ \"Value\" : \"{{{key}}}\", \"DisplayValue\" : \"{{{key}}}\" }"
},
{
"endpointId": "$(artifactoryConnection)",
"endpointURL": "{{endpoint.url}}/api/repositories",
"target": "sourceRepo",
"resultSelector": "jsonpath:$[?(@.type=='LOCAL')]",
"resultTemplate": "{ \"Value\" : \"{{{key}}}\", \"DisplayValue\" : \"{{{key}}}\" }"
}
],
"execution": {
"Node20_1": {
"target": "buildPromotion.js",
"argumentFormat": "",
"workingDirectory": "$(currentDirectory)"
},
"Node24": {
"target": "buildPromotion.js",
"argumentFormat": "",
"workingDirectory": "$(currentDirectory)"
}
}
}