Skip to content

Commit 7c67f56

Browse files
committed
update jenkinsfile
1 parent 32fcf9c commit 7c67f56

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

Jenkinsfile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,22 @@ node('high-cpu') {
9292

9393

9494

95-
docker.image(imageNames[0]).run("-e KUBECONFIG=${env.WORKSPACE}/.kube/config --network=host",
96-
"--yes --trace --internal-registry-port=${registryPort} " +
97-
"--registry --jenkins --content-examples " +
98-
"--argocd --monitoring --vault=dev --ingress-nginx --mailhog --base-url=http://localhost --cert-manager")
95+
def app = docker.image(imageNames[0]).run(
96+
"-e KUBECONFIG=${env.WORKSPACE}/.kube/config --network=host",
97+
"--yes --trace --internal-registry-port=${registryPort} " +
98+
"--registry --jenkins --content-examples " +
99+
"--argocd --monitoring --vault=dev --ingress-nginx --mailhog --base-url=http://localhost --cert-manager"
100+
)
101+
102+
try {
103+
104+
sleep(time: 120, unit: 'SECONDS')
105+
echo "===== Container Logs ====="
106+
echo app.logs()
107+
108+
} finally {
109+
app.stop()
110+
}
99111
}
100112
}
101113
)

0 commit comments

Comments
 (0)