From e6495299b8289dc5d8da36d240d7ac92770646e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= Date: Wed, 15 Jan 2025 14:03:07 +0100 Subject: [PATCH] Get ratelimit anonymously before runnign specs too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédric Ollivier --- .github/workflows/actions.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 1bcd0b7ca..750c10ea6 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -170,6 +170,10 @@ jobs: export PROTECTED_DOCKERHUB_EMAIL=${EMAIL_ARRAY[$RANDOMIZER]} export PROTECTED_IMAGE_REPO=${IMAGE_ARRAY[$RANDOMIZER]} + echo get ratelimit anonymously + TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) + curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest + source cluster.env export KUBECONFIG=$(pwd)/$CLUSTER.conf until [[ $(kubectl get pods -l app=local-path-provisioner --namespace=local-path-storage -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') == "True" ]]; do @@ -275,7 +279,10 @@ jobs: echo "RUNNER: $RUNNER_NAME" - name: Run Crystal Spec run: | - echo "Current path: $(echo pwd)" + echo get ratelimit anonymously + TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) + curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest + source cluster.env export KUBECONFIG=$(pwd)/$CLUSTER.conf until [[ $(kubectl get pods -l app=kindnet --namespace=kube-system -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') == "True" ]]; do @@ -387,6 +394,10 @@ jobs: kubectl get nodes - name: Run Test Suite without source(config_lifecycle) run: | + echo get ratelimit anonymously + TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) + curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest + source cluster.env echo "SHARDS_INSTALL_PATH: $SHARDS_INSTALL_PATH" export KUBECONFIG=/tmp/$CLUSTER.conf @@ -471,6 +482,10 @@ jobs: kubectl get nodes - name: Run Test Suite without source(microservice) run: | + echo get ratelimit anonymously + TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) + curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest + source cluster.env export KUBECONFIG=/tmp/$CLUSTER.conf helm repo add stable https://cncf.gitlab.io/stable @@ -554,6 +569,10 @@ jobs: kubectl get nodes - name: Run Test Suite without source(all) run: | + echo get ratelimit anonymously + TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) + curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest + source cluster.env export KUBECONFIG=/tmp/$CLUSTER.conf helm repo add stable https://cncf.gitlab.io/stable