From 0cc40c6b9a60cd3558c87cf6f6101131cfabc115 Mon Sep 17 00:00:00 2001 From: Jan Rabcan Date: Wed, 20 Oct 2021 03:50:57 +0200 Subject: [PATCH] a. --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0715bab..15cc55f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,7 @@ pipeline { environment { REGISTRY_CREDENTIALS = credentials('registry-credentials-id') + PORTAINER_CREDENTIALS = credentials('portainer-credentials') } stages { @@ -39,7 +40,7 @@ pipeline { steps { script { def json = """ - {"username": "test", "password": "test"} + {"username": "${PORTAINER_CREDENTIALS_USR}", "password": "${PORTAINER_CREDENTIALS_PSW}"} """ def jwtResponse = httpRequest acceptType: 'APPLICATION_JSON', contentType: 'APPLICATION_JSON', validResponseCodes: '200', httpMode: 'POST', ignoreSslErrors: true, consoleLogResponseBody: true, requestBody: json, url: "https://portainer..com/api/auth" def jwtObject = new groovy.json.JsonSlurper().parseText(jwtResponse.getContent())