This commit is contained in:
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -60,7 +60,7 @@ pipeline {
|
||||
def json = """
|
||||
|
||||
"""
|
||||
def response = httpRequest acceptType: 'APPLICATION_JSON',
|
||||
httpRequest acceptType: 'APPLICATION_JSON',
|
||||
contentType: 'APPLICATION_JSON',
|
||||
validResponseCodes: '204',
|
||||
httpMode: 'POST',
|
||||
@@ -69,14 +69,13 @@ pipeline {
|
||||
requestBody: json,
|
||||
customHeaders: [["name": "Authorization", "value": "${env.JWTTOKEN}"]],
|
||||
url: "http://192.168.4.8:9000/api/endpoints/26/docker/containers/145772505f27bcdef1fbd807ecbb7b4ccbe6fb86dbb3a2bd0e22951557a15a10/stop"
|
||||
new groovy.json.JsonSlurper().parseText(jwtResponse.getContent())
|
||||
}
|
||||
echo "Stopping Container"
|
||||
script {
|
||||
def json = """
|
||||
|
||||
"""
|
||||
def response = httpRequest acceptType: 'APPLICATION_JSON',
|
||||
httpRequest acceptType: 'APPLICATION_JSON',
|
||||
contentType: 'APPLICATION_JSON',
|
||||
validResponseCodes: '204',
|
||||
httpMode: 'POST',
|
||||
@@ -85,7 +84,6 @@ pipeline {
|
||||
requestBody: json,
|
||||
customHeaders: [["name": "Authorization", "value": "${env.JWTTOKEN}"]],
|
||||
url: "http://192.168.4.8:9000/api/endpoints/26/docker/containers/145772505f27bcdef1fbd807ecbb7b4ccbe6fb86dbb3a2bd0e22951557a15a10/start"
|
||||
new groovy.json.JsonSlurper().parseText(jwtResponse.getContent())
|
||||
}
|
||||
echo "Starting Container"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user