From 32b3c3c43fa1c3868bcc3198ca93c3c831bed95b Mon Sep 17 00:00:00 2001 From: nhyatt Date: Sun, 22 Oct 2023 12:48:25 -0500 Subject: [PATCH] adds test to check secret data --- nordvpn-autoconfigure.jenkins | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/nordvpn-autoconfigure.jenkins b/nordvpn-autoconfigure.jenkins index 6e47602..d2fa082 100644 --- a/nordvpn-autoconfigure.jenkins +++ b/nordvpn-autoconfigure.jenkins @@ -160,6 +160,25 @@ data: } } + stage ('Read Secret') { + steps { + container ('alpine') { + script { + def result = declarativeFunctions.createSecret( + kubeAuth: "k8s-dl-automation-access", + kubeURL: "https://k8s.test-chamber-13.lan:8043", + namespace: "dl-automation", + secret: k8sSecret, + secretID: "nordvpn.com.tcp.ovpn" + ) + if result.length() == 0 { + throw new Exception("Secret is empty.") + } + } + } + } + } + stage ('Restart Pod') { steps { container ('alpine') {