mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-21 14:49:28 +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
|
nameservers
|
||||||
end
|
end
|
||||||
|
|
||||||
|
exit_code=0 # assume successful exit
|
||||||
|
|
||||||
check_domain(domain)
|
check_domain(domain)
|
||||||
puts "[PASS] #{domain} basic check ('DOMAIN' variable set & not empty)"
|
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"
|
puts "[PASS] #{whois_nameserver}'s NS records match whois"
|
||||||
else
|
else
|
||||||
puts "[FAIL] #{whois_nameserver}'s NS records do NOT match whois: #{dig_nameservers.join(", ")}"
|
puts "[FAIL] #{whois_nameserver}'s NS records do NOT match whois: #{dig_nameservers.join(", ")}"
|
||||||
|
exit_code=5
|
||||||
end
|
end
|
||||||
#p "#{whois_nameserver}: #{nameservers}"
|
#p "#{whois_nameserver}: #{nameservers}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
exit(exit_code)
|
||||||
|
Reference in New Issue
Block a user