Skip to content

Commit f8b3f1c

Browse files
author
Salvador Melendez Delgado
authored
UPack task fix: removing extra slash for organization-scoped feeds (#11849) (#11850)
1 parent 7a58b1c commit f8b3f1c

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

Tasks/UniversalPackagesV0/task.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"version": {
1111
"Major": 0,
1212
"Minor": 160,
13-
"Patch": 0
13+
"Patch": 1
1414
},
1515
"runsOn": [
1616
"Agent",
@@ -366,15 +366,15 @@
366366
"endpointId": "tfs:feed",
367367
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds",
368368
"resultSelector": "jsonpath:$.value[*]",
369-
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}{{/if}}\\/{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
369+
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}\\/{{/if}}{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
370370
},
371371
{
372372
"target": "packageListDownload",
373373
"endpointId": "tfs:feed",
374374
"parameters": {
375375
"feed": "$(feedListDownload)"
376376
},
377-
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex [a-fA-F0-9\\-]*/([a-fA-F0-9\\-]+) feed }}/packages?includeUrls=false&protocolType=UPack",
377+
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex (?:[a-fA-F0-9\\-]+/)?([a-fA-F0-9\\-]+) feed }}/packages?includeUrls=false&protocolType=UPack",
378378
"resultSelector": "jsonpath:$.value[?(@.protocolType=='UPack')]",
379379
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
380380
},
@@ -385,7 +385,7 @@
385385
"feed": "$(feedListDownload)",
386386
"packageName": "$(packageListDownload)"
387387
},
388-
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex [a-fA-F0-9\\-]*/([a-fA-F0-9\\-]+) feed }}/packages/{{{packageName}}}/versions?includeUrls=false&isDeleted=false",
388+
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex (?:[a-fA-F0-9\\-]+/)?([a-fA-F0-9\\-]+) feed }}/packages/{{{packageName}}}/versions?includeUrls=false&isDeleted=false",
389389
"resultSelector": "jsonpath:$.value[*]",
390390
"resultTemplate": "{ \"Value\" : \"{{{version}}}\", \"DisplayValue\" : \"{{{normalizedVersion}}}\" }"
391391
},
@@ -394,15 +394,15 @@
394394
"endpointId": "tfs:feed",
395395
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds",
396396
"resultSelector": "jsonpath:$.value[*]",
397-
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}{{/if}}\\/{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
397+
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}\\/{{/if}}{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
398398
},
399399
{
400400
"target": "packageListPublish",
401401
"endpointId": "tfs:feed",
402402
"parameters": {
403403
"feed": "$(feedListPublish)"
404404
},
405-
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex [a-fA-F0-9\\-]*/([a-fA-F0-9\\-]+) feed }}/packages?includeUrls=false&includeDeleted=false",
405+
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex (?:[a-fA-F0-9\\-]+/)?([a-fA-F0-9\\-]+) feed }}/packages?includeUrls=false&includeDeleted=false",
406406
"resultSelector": "jsonpath:$.value[?(@.protocolType=='UPack')]",
407407
"resultTemplate": "{ \"Value\" : \"{{{name}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
408408
}

Tasks/UniversalPackagesV0/task.loc.json

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"version": {
1111
"Major": 0,
1212
"Minor": 160,
13-
"Patch": 0
13+
"Patch": 1
1414
},
1515
"runsOn": [
1616
"Agent",
@@ -366,19 +366,26 @@
366366
"endpointId": "tfs:feed",
367367
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds",
368368
"resultSelector": "jsonpath:$.value[*]",
369-
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
369+
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}\\/{{/if}}{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
370370
},
371371
{
372372
"target": "packageListDownload",
373373
"endpointId": "tfs:feed",
374-
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds/$(feedListDownload)/packages?includeUrls=false&protocolType=UPack",
374+
"parameters": {
375+
"feed": "$(feedListDownload)"
376+
},
377+
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex (?:[a-fA-F0-9\\-]+/)?([a-fA-F0-9\\-]+) feed }}/packages?includeUrls=false&protocolType=UPack",
375378
"resultSelector": "jsonpath:$.value[?(@.protocolType=='UPack')]",
376379
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
377380
},
378381
{
379382
"target": "versionListDownload",
380383
"endpointId": "tfs:feed",
381-
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds/$(feedListDownload)/packages/$(packageListDownload)/versions?includeUrls=false&isDeleted=false",
384+
"parameters": {
385+
"feed": "$(feedListDownload)",
386+
"packageName": "$(packageListDownload)"
387+
},
388+
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex (?:[a-fA-F0-9\\-]+/)?([a-fA-F0-9\\-]+) feed }}/packages/{{{packageName}}}/versions?includeUrls=false&isDeleted=false",
382389
"resultSelector": "jsonpath:$.value[*]",
383390
"resultTemplate": "{ \"Value\" : \"{{{version}}}\", \"DisplayValue\" : \"{{{normalizedVersion}}}\" }"
384391
},
@@ -387,12 +394,15 @@
387394
"endpointId": "tfs:feed",
388395
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds",
389396
"resultSelector": "jsonpath:$.value[*]",
390-
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
397+
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}\\/{{/if}}{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
391398
},
392399
{
393400
"target": "packageListPublish",
394401
"endpointId": "tfs:feed",
395-
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds/$(feedListPublish)/packages?includeUrls=false&includeDeleted=false",
402+
"parameters": {
403+
"feed": "$(feedListPublish)"
404+
},
405+
"endpointUrl": "{{endpoint.url}}/{{ #regex ([a-fA-F0-9\\-]+/)[a-fA-F0-9\\-]+ feed }}_apis/packaging/feeds/{{ #regex (?:[a-fA-F0-9\\-]+/)?([a-fA-F0-9\\-]+) feed }}/packages?includeUrls=false&includeDeleted=false",
396406
"resultSelector": "jsonpath:$.value[?(@.protocolType=='UPack')]",
397407
"resultTemplate": "{ \"Value\" : \"{{{name}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
398408
}
@@ -439,4 +449,4 @@
439449
"Error_UniversalPackagesNotSupportedOnPrem": "ms-resource:loc.messages.Error_UniversalPackagesNotSupportedOnPrem",
440450
"Error_ProcessorArchitectureNotSupported": "ms-resource:loc.messages.Error_ProcessorArchitectureNotSupported"
441451
}
442-
}
452+
}

0 commit comments

Comments
 (0)