[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
|
||||
image: golang:1.17
|
||||
commands:
|
||||
- go build -o /tmp/vegvisir pkg/main.go
|
||||
- go build -o /tmp/vegvisir pkg/main.go
|
||||
volumes:
|
||||
- name: tmp_cache
|
||||
path: /tmp
|
||||
@ -71,15 +71,17 @@ steps:
|
||||
- name: test
|
||||
image: golang:1.17
|
||||
commands:
|
||||
# - sleep 5
|
||||
- while ! ls /tmp/server_hostname; do sleep 1; done
|
||||
- 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:
|
||||
- name: tmp_cache
|
||||
path: /tmp
|
||||
- name: tmp_cache
|
||||
path: /tmp
|
||||
|
||||
volumes:
|
||||
- name: env_cache
|
||||
temp: {}
|
||||
- name: tmp_cache
|
||||
temp: {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user