mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-20 14:25:16 +08:00
Don't blindly succeed even when you fail
- must use a non-zero exit code to signify failure to Concourse
This commit is contained in:
@@ -16,6 +16,8 @@ def get_whois_nameservers(domain)
|
||||
nameservers
|
||||
end
|
||||
|
||||
exit_code=0 # assume successful exit
|
||||
|
||||
check_domain(domain)
|
||||
puts "[PASS] #{domain} basic check ('DOMAIN' variable set & not empty)"
|
||||
|
||||
@@ -30,6 +32,9 @@ whois_nameservers.each do |whois_nameserver|
|
||||
puts "[PASS] #{whois_nameserver}'s NS records match whois"
|
||||
else
|
||||
puts "[FAIL] #{whois_nameserver}'s NS records do NOT match whois: #{dig_nameservers.join(", ")}"
|
||||
exit_code=5
|
||||
end
|
||||
#p "#{whois_nameserver}: #{nameservers}"
|
||||
end
|
||||
|
||||
exit(exit_code)
|
||||
|
Reference in New Issue
Block a user