|
@@ -1,13 +1,19 @@
|
|
#!groovy
|
|
#!groovy
|
|
|
|
+def GetLog(build_url) {
|
|
|
|
+ //withCredentials([string(credentialsId: 'JenkinsApi', variable: 'token')])
|
|
|
|
+ //responce = httprequest(httpMode: 'GET',
|
|
|
|
+ // url: 'http//admin:token@${BUILD_URL}/consoleText',
|
|
|
|
+ // validResponces: '200')
|
|
|
|
+ return build_url
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#!groovy
|
|
pipeline {
|
|
pipeline {
|
|
agent {
|
|
agent {
|
|
label 'master'
|
|
label 'master'
|
|
}
|
|
}
|
|
|
|
|
|
- options {
|
|
|
|
- timestamps()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
stages {
|
|
stages {
|
|
stage("build project") {
|
|
stage("build project") {
|
|
steps {
|
|
steps {
|
|
@@ -24,6 +30,7 @@ pipeline {
|
|
post {
|
|
post {
|
|
success {
|
|
success {
|
|
echo 'I succeeeded!'
|
|
echo 'I succeeeded!'
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
unstable {
|
|
unstable {
|
|
@@ -31,6 +38,7 @@ pipeline {
|
|
}
|
|
}
|
|
failure {
|
|
failure {
|
|
echo 'I failed :((('
|
|
echo 'I failed :((('
|
|
|
|
+ echo GetLog("${BUILD_URL}")
|
|
}
|
|
}
|
|
changed {
|
|
changed {
|
|
echo 'things were different before...'
|
|
echo 'things were different before...'
|