diff --git a/.github/executions/fp_ds_test_execution_arm.json b/.github/executions/fp_ds_test_execution_arm.json index 420a7aa..49895ac 100644 --- a/.github/executions/fp_ds_test_execution_arm.json +++ b/.github/executions/fp_ds_test_execution_arm.json @@ -19,7 +19,7 @@ "instance_parameters" : { "ImageId" : "ami-01fc4c78425e127e6", - "InstanceType" : "t4g.large", + "InstanceType" : "m8g.xlarge", "KeyName" : "actions_key_arm", "SecurityGroupIds" : ["sg-0fcbe0c6d6faa0117"], "IamInstanceProfile": { diff --git a/.github/executions/fp_push_execution_arm.json b/.github/executions/fp_push_execution_arm.json index 2eee1cb..42ced60 100644 --- a/.github/executions/fp_push_execution_arm.json +++ b/.github/executions/fp_push_execution_arm.json @@ -23,7 +23,7 @@ "instance_parameters" : { "ImageId" : "ami-01fc4c78425e127e6", - "InstanceType" : "t4g.large", + "InstanceType" : "m8g.xlarge", "KeyName" : "actions_key_arm", "SecurityGroupIds" : ["sg-0fcbe0c6d6faa0117"], "IamInstanceProfile": { diff --git a/docker/docker_loginNpush.sh b/docker/docker_loginNpush.sh index 3565779..2348bb3 100644 --- a/docker/docker_loginNpush.sh +++ b/docker/docker_loginNpush.sh @@ -53,16 +53,24 @@ echo "$DOCKERHUB_TOKEN" | docker login -u awiciroh --password-stdin >> "$LOG_FIL } log "✓ Docker login successful" -# Push function +# Push function with retry logic push_image() { - local image=$1 tag=$2 - log "Pushing $image:$tag and latest-arm64..." - - docker tag "awiciroh/$image:latest-arm64" "awiciroh/$image:$tag" >> "$LOG_FILE" 2>&1 - docker push "awiciroh/$image:$tag" >> "$LOG_FILE" 2>&1 - docker push "awiciroh/$image:latest-arm64" >> "$LOG_FILE" 2>&1 - - log "✓ Successfully pushed $image:$tag" + local image=$1 tag=$2 max_retries=3 + for i in $(seq 1 $max_retries); do + log "Pushing $image:$tag (attempt $i/$max_retries)..." + if docker tag "awiciroh/$image:latest-arm64" "awiciroh/$image:$tag" >> "$LOG_FILE" 2>&1 && \ + docker push "awiciroh/$image:$tag" >> "$LOG_FILE" 2>&1 && \ + docker push "awiciroh/$image:latest-arm64" >> "$LOG_FILE" 2>&1; then + log "✓ Successfully pushed $image:$tag" + return 0 + fi + if [ "$i" -lt "$max_retries" ]; then + log "Attempt $i failed, retrying in 10s..." + sleep 10 + fi + done + log "✗ Failed to push $image:$tag after $max_retries attempts" + return 1 } # Push all queued images