This commit is contained in:
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -42,7 +42,7 @@ pipeline {
|
||||
def json = """
|
||||
{"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 jwtResponse = httpRequest acceptType: 'APPLICATION_JSON', contentType: 'APPLICATION_JSON', validResponseCodes: '200', httpMode: 'POST', ignoreSslErrors: true, consoleLogResponseBody: true, requestBody: json, url: "http://192.168.4.8:9000/api/auth"
|
||||
def jwtObject = new groovy.json.JsonSlurper().parseText(jwtResponse.getContent())
|
||||
env.JWTTOKEN = "Bearer ${jwtObject.jwt}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user