Skip to content

Commit 0c7c298

Browse files
committed
Extend start-proxy.yml to test multiple registry support
1 parent d6d1743 commit 0c7c298

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

pr-checks/checks/start-proxy.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@ steps:
1616
id: proxy
1717
uses: ./../action/start-proxy
1818
with:
19-
registry_secrets: '[{ "type": "nuget_feed", "url": "https://api.nuget.org/v3/index.json" }]'
19+
registry_secrets: |
20+
[
21+
{
22+
"type": "maven-repository",
23+
"url": "https://acme.jfrog.io/artifactory/my-maven-registry"
24+
},
25+
{
26+
"type": "maven-repository",
27+
"url": "https://repo1.maven.org/maven2"
28+
}
29+
]
2030
2131
- name: Print proxy outputs
2232
run: |
@@ -27,3 +37,15 @@ steps:
2737
- name: Fail if proxy outputs are not set
2838
if: (!steps.proxy.outputs.proxy_host) || (!steps.proxy.outputs.proxy_port) || (!steps.proxy.outputs.proxy_ca_certificate) || (!steps.proxy.outputs.proxy_urls)
2939
run: exit 1
40+
41+
- name: Validate proxy_urls contains expected registries
42+
env:
43+
PROXY_URLS: ${{ steps.proxy.outputs.proxy_urls }}
44+
run: |
45+
jq --null-input --exit-status '
46+
env.PROXY_URLS
47+
| fromjson
48+
| length == 2 and
49+
any(.[]; .type=="maven-repository" and .url=="https://acme.jfrog.io/artifactory/my-maven-registry") and
50+
any(.[]; .type=="maven-repository" and .url=="https://repo1.maven.org/maven2")
51+
'

0 commit comments

Comments
 (0)