diff --git a/tasks/actions.yaml b/tasks/actions.yaml index 8222188..c0a028a 100644 --- a/tasks/actions.yaml +++ b/tasks/actions.yaml @@ -10,8 +10,16 @@ - name: generate and store a runner registration token when: runner_token_secret.resources | length == 0 block: + # Poll instead of `kubectl rollout status`, which exits immediately once + # a slow rollout has passed the deployment's progressDeadlineSeconds. - name: wait for the gitea deployment to finish rolling out - command: kubectl -n gitea rollout status deployment/gitea --timeout=600s + command: >- + kubectl -n gitea get deployment gitea + -o jsonpath={.spec.replicas},{.status.replicas},{.status.updatedReplicas},{.status.availableReplicas} + register: gitea_rollout + until: gitea_rollout.stdout.split(',') | unique | length == 1 + retries: 90 + delay: 10 changed_when: false - name: generate instance-level runner registration token