wait for 443 port instead of sleep
continuous-integration/drone/push Build is failing Details

jsonnet
Alexander 2023-12-20 18:50:26 +04:00
parent a717ad6ca5
commit 4380a733a6
1 changed files with 7 additions and 2 deletions

View File

@ -74,9 +74,14 @@ steps:
-H "Content-Type: application/json"
--data '{"type":"TXT","name":"'"$$DOMAIN"'","content":"v=spf1 a mx ip4:$machineip -all","ttl":18000,"priority":10,"proxied":false}'
- name: sleep
- name: wait for NixOS boot
environment:
DOMAIN:
from_secret: DOMAIN
TIMEOUT: 100
commands:
- sleep 360
- sleep 300
- t0="$(date '+%s')"; until nix shell --inputs-from git+https://git.selfprivacy.org/alexoundos/selfprivacy-tests.git nixpkgs#netcat -c nc -zv -w1 "$DOMAIN" 443; do sleep 10; cur_date="$(date '+%s')"; remaining=$((t0 + TIMEOUT - cur_date)); [ "$remaining" -gt 0 ]; echo "$remaining seconds remain before teardown"; done
- name: test
environment: