[fix] Simplified checking service is alive
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
eeaf6e75e8
commit
a1682660bd
12
.drone.yml
12
.drone.yml
@ -51,7 +51,7 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: golang:1.17
|
image: golang:1.17
|
||||||
commands:
|
commands:
|
||||||
- go build -o /tmp/vegvisir pkg/main.go
|
- go build -o /tmp/vegvisir pkg/main.go
|
||||||
volumes:
|
volumes:
|
||||||
- name: tmp_cache
|
- name: tmp_cache
|
||||||
path: /tmp
|
path: /tmp
|
||||||
@ -71,15 +71,17 @@ steps:
|
|||||||
- name: test
|
- name: test
|
||||||
image: golang:1.17
|
image: golang:1.17
|
||||||
commands:
|
commands:
|
||||||
# - sleep 5
|
- while ! ls /tmp/server_hostname; do sleep 1; done
|
||||||
- server_hostname=$(cat /tmp/server_hostname)
|
- server_hostname=$(cat /tmp/server_hostname)
|
||||||
- "[ $(curl -fsS http://$server_hostname:8080/health | grep OK | wc -l) = 0 ] && { echo 'Not running.'; return 1; } || { echo 'Vegvisir is running.'; return 0; }"
|
- curl -fsS http://$server_hostname:8080/health | grep OK
|
||||||
|
# - "[ $(curl -fsS http://$server_hostname:8080/health | grep OK | wc -l) = 0 ] && { echo 'Not running.'; return 1; } || { echo 'Vegvisir is running.'; return 0; }"
|
||||||
volumes:
|
volumes:
|
||||||
- name: tmp_cache
|
- name: tmp_cache
|
||||||
path: /tmp
|
path: /tmp
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: env_cache
|
- name: env_cache
|
||||||
temp: {}
|
temp: {}
|
||||||
- name: tmp_cache
|
- name: tmp_cache
|
||||||
temp: {}
|
temp: {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user