diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 20972946..a350a4d1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -47,7 +47,7 @@ updates: directory: "./dockerfiles/agent-discovery" schedule: interval: weekly - open-pull-requests-limit: 10 + open-pull-requests-limit: 10 - package-ecosystem: docker directory: "./dockerfiles/android" schedule: diff --git a/.github/workflows/github-docker-registry-push.yml b/.github/workflows/github-docker-registry-push.yml index 8e015f0a..b4a33c91 100644 --- a/.github/workflows/github-docker-registry-push.yml +++ b/.github/workflows/github-docker-registry-push.yml @@ -91,8 +91,8 @@ jobs: uses: docker/login-action@v3 with: registry: ghcr.io - username: ${{ env.GHCR_USERNAME }} - password: ${{ env.GHCR_TOKEN }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract branch name # This step extracts the branch name diff --git a/dockerfiles/agent-discovery/find-name.sh b/dockerfiles/agent-discovery/find-name.sh index 84a8fc76..0471321d 100644 --- a/dockerfiles/agent-discovery/find-name.sh +++ b/dockerfiles/agent-discovery/find-name.sh @@ -79,16 +79,16 @@ while true; do sleep 2 # Wait for 5 seconds before the next iteration of the loop. done -# Check if jenkins_controller is reachable, otherwise fall back to multi_jenkins_controller +## Check if jenkins_controller is reachable, otherwise fall back to multi_jenkins_controller JENKINS_CONTROLLER="jenkins_controller" -if ! curl -s -f "http://${JENKINS_CONTROLLER}:8080/login" > /dev/null; then +if ! curl -s -f --max-time 60 "http://${JENKINS_CONTROLLER}:8080/login" > /dev/null; then echo "Primary controller not reachable, falling back to multi controller..." - JENKINS_CONTROLLER="multi_jenkins_controller" - if ! curl -s -f "http://${JENKINS_CONTROLLER}:8080/login" > /dev/null; then - echo "Error: Neither primary nor multi controller is reachable" - exit 1 + JENKINS_CONTROLLER="multi_jenkins_controller" + if ! curl -s -f --max-time 60 "http://${JENKINS_CONTROLLER}:8080/login" > /dev/null; then + echo "Error: Neither primary nor multi controller is reachable" + exit 1 fi - fi +fi # Check If Jenkins is running or not # If the message is found, awk exits with a non-zero status (1), and the loop continues.