Skip to content

Commit b5a7cb9

Browse files
author
Tim Middleton
authored
Increase retries and display http status code for curl (#128)
* Increase retries and display http status code for curl * Add alias for curl for older versions * Update curl commands
1 parent e131bdf commit b5a7cb9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/examples-jakarta-v1.2.2.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
- name: Verify Examples
7575
shell: bash
7676
run: |
77+
# Alias curl to use retries
78+
alias curl='curl -L --retry 10 --retry-delay 5 -w "\nHTTP status: %{http_code}\n"'
7779
git checkout v1.2.2
7880
# Change the jib-maven-plugin as this version fails
7981
sed -i.bak 's/<version.plugin.jib>3\.3\.0<\/version.plugin.jib>/<version.plugin.jib>3.4.3<\/version.plugin.jib>/' java/pom.xml

.github/workflows/examples-v1.2.2.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373
- name: Verify Examples
7474
shell: bash
7575
run: |
76+
# Alias curl to use retries
77+
alias curl='curl -L --retry 10 --retry-delay 5 -w "\nHTTP status: %{http_code}\n"'
7678
git checkout v1.2.2
7779
# Change the jib-maven-plugin as this version fails
7880
sed -i.bak 's/<version.plugin.jib>3\.3\.0<\/version.plugin.jib>/<version.plugin.jib>3.4.3<\/version.plugin.jib>/' java/pom.xml

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ CLUSTER_PORT ?= 7574
4343
PROFILES ?=
4444
COHERENCE_BASE_IMAGE ?= gcr.io/distroless/java11-debian11
4545

46-
CURL_OPTS = -L --retry 5 --retry-delay 2
46+
CURL_OPTS = -L --retry 10 --retry-delay 5
4747

4848
# For GitHub Rate limiting
4949
ifdef GITHUB_TOKEN
@@ -220,7 +220,6 @@ generate-proto: $(TOOLS_BIN)/protoc ## Generate Proto Files
220220
ifeq ($(SKIP_PROTO_GENERATION),true)
221221
@echo "Skipping proto generation..."
222222
else
223-
curl $(CURL_AUTH) -s https://api.github.com/rate_limit | jq '.rate'
224223
mkdir -p $(PROTO_DIR) || true
225224
curl $(CURL_AUTH) -o $(PROTO_DIR)/services.proto https://raw.githubusercontent.com/oracle/coherence/22.06.12/prj/coherence-grpc/src/main/proto/services.proto
226225
curl $(CURL_AUTH) -o $(PROTO_DIR)/messages.proto https://raw.githubusercontent.com/oracle/coherence/22.06.12/prj/coherence-grpc/src/main/proto/messages.proto
@@ -239,7 +238,6 @@ generate-proto-v1: $(TOOLS_BIN)/protoc ## Generate Proto Files v1
239238
ifeq ($(SKIP_PROTO_GENERATION),true)
240239
@echo "Skipping proto generation..."
241240
else
242-
curl $(CURL_AUTH) -s https://api.github.com/rate_limit | jq '.rate'
243241
mkdir -p $(PROTOV1_DIR) || true
244242
curl $(CURL_AUTH) -o $(PROTOV1_DIR)/proxy_service_messages_v1.proto https://raw.githubusercontent.com/oracle/coherence/25.03.1/prj/coherence-grpc/src/main/proto/proxy_service_messages_v1.proto
245243
curl $(CURL_AUTH) -o $(PROTOV1_DIR)/proxy_service_v1.proto https://raw.githubusercontent.com/oracle/coherence/25.03.1/prj/coherence-grpc/src/main/proto/proxy_service_v1.proto
@@ -496,4 +494,4 @@ endef
496494
.PHONY: gettrivy
497495
gettrivy:
498496
@mkdir -p $(TOOLS_BIN)
499-
curl $(CURL_AUTH) -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b $(TOOLS_BIN) v0.51.2
497+
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b $(TOOLS_BIN) v0.51.2

0 commit comments

Comments
 (0)