forked from openshift/assisted-test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile.download_all_logs
48 lines (40 loc) · 1.25 KB
/
Jenkinsfile.download_all_logs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
pipeline {
agent { label 'download_all_logs' }
parameters {
string(name: 'REMOTE_SERVICE_URL', defaultValue: 'https://api.openshift.com', description: 'Service URL')
}
triggers { cron('* * * * *') }
environment {
SKIPPER_PARAMS = " "
LOGS_DEST = "/var/ai-logs"
ADDITIONAL_PARAMS = "--download-all --update-by-events"
// Credentials
OFFLINE_TOKEN = credentials('admin_offline_token')
SLACK_TOKEN = credentials('slack-token')
}
options {
timeout(time: 4, unit: 'HOURS')
}
stages {
stage('Init') {
steps {
sh "scripts/install_environment.sh install_skipper"
sh "make image_build"
}
}
stage('Run') {
steps {
sh "make download_cluster_logs"
}
}
}
//post {
// failure {
// script {
// def data = [text: "Attention! ${BUILD_TAG} job failed, see: ${BUILD_URL}"]
// writeJSON(file: 'data.txt', json: data, pretty: 4)
// }
// sh '''curl -X POST -H 'Content-type: application/json' --data-binary "@data.txt" https://hooks.slack.com/services/${SLACK_TOKEN}'''
// }
//}
}