a.
Some checks failed
internetmastercz/test/pipeline/head There was a failure building this commit

This commit is contained in:
2021-10-20 03:50:57 +02:00
parent b5d6d8b30f
commit 0cc40c6b9a

3
Jenkinsfile vendored
View File

@@ -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.<yourdomain>.com/api/auth"
def jwtObject = new groovy.json.JsonSlurper().parseText(jwtResponse.getContent())