Skip to content

Commit

Permalink
UPack task fix: removing extra slash for organization-scoped feeds (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Salvador Melendez Delgado authored Nov 27, 2019
1 parent 7a58b1c commit f8b3f1c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
12 changes: 6 additions & 6 deletions Tasks/UniversalPackagesV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": {
"Major": 0,
"Minor": 160,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
Expand Down Expand Up @@ -366,15 +366,15 @@
"endpointId": "tfs:feed",
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds",
"resultSelector": "jsonpath:$.value[*]",
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}{{/if}}\\/{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}\\/{{/if}}{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
},
{
"target": "packageListDownload",
"endpointId": "tfs:feed",
"parameters": {
"feed": "$(feedListDownload)"
},
"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",
"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",
"resultSelector": "jsonpath:$.value[?(@.protocolType=='UPack')]",
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
},
Expand All @@ -385,7 +385,7 @@
"feed": "$(feedListDownload)",
"packageName": "$(packageListDownload)"
},
"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",
"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",
"resultSelector": "jsonpath:$.value[*]",
"resultTemplate": "{ \"Value\" : \"{{{version}}}\", \"DisplayValue\" : \"{{{normalizedVersion}}}\" }"
},
Expand All @@ -394,15 +394,15 @@
"endpointId": "tfs:feed",
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds",
"resultSelector": "jsonpath:$.value[*]",
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}{{/if}}\\/{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}\\/{{/if}}{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
},
{
"target": "packageListPublish",
"endpointId": "tfs:feed",
"parameters": {
"feed": "$(feedListPublish)"
},
"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",
"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",
"resultSelector": "jsonpath:$.value[?(@.protocolType=='UPack')]",
"resultTemplate": "{ \"Value\" : \"{{{name}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
}
Expand Down
24 changes: 17 additions & 7 deletions Tasks/UniversalPackagesV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": {
"Major": 0,
"Minor": 160,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
Expand Down Expand Up @@ -366,19 +366,26 @@
"endpointId": "tfs:feed",
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds",
"resultSelector": "jsonpath:$.value[*]",
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}\\/{{/if}}{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
},
{
"target": "packageListDownload",
"endpointId": "tfs:feed",
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds/$(feedListDownload)/packages?includeUrls=false&protocolType=UPack",
"parameters": {
"feed": "$(feedListDownload)"
},
"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",
"resultSelector": "jsonpath:$.value[?(@.protocolType=='UPack')]",
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
},
{
"target": "versionListDownload",
"endpointId": "tfs:feed",
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds/$(feedListDownload)/packages/$(packageListDownload)/versions?includeUrls=false&isDeleted=false",
"parameters": {
"feed": "$(feedListDownload)",
"packageName": "$(packageListDownload)"
},
"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",
"resultSelector": "jsonpath:$.value[*]",
"resultTemplate": "{ \"Value\" : \"{{{version}}}\", \"DisplayValue\" : \"{{{normalizedVersion}}}\" }"
},
Expand All @@ -387,12 +394,15 @@
"endpointId": "tfs:feed",
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds",
"resultSelector": "jsonpath:$.value[*]",
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
"resultTemplate": "{ \"Value\" : \"{{#if project}}{{{project.id}}}\\/{{/if}}{{{id}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
},
{
"target": "packageListPublish",
"endpointId": "tfs:feed",
"endpointUrl": "{{endpoint.url}}/_apis/packaging/feeds/$(feedListPublish)/packages?includeUrls=false&includeDeleted=false",
"parameters": {
"feed": "$(feedListPublish)"
},
"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",
"resultSelector": "jsonpath:$.value[?(@.protocolType=='UPack')]",
"resultTemplate": "{ \"Value\" : \"{{{name}}}\", \"DisplayValue\" : \"{{{name}}}\" }"
}
Expand Down Expand Up @@ -439,4 +449,4 @@
"Error_UniversalPackagesNotSupportedOnPrem": "ms-resource:loc.messages.Error_UniversalPackagesNotSupportedOnPrem",
"Error_ProcessorArchitectureNotSupported": "ms-resource:loc.messages.Error_ProcessorArchitectureNotSupported"
}
}
}

0 comments on commit f8b3f1c

Please sign in to comment.