-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRunner.Jenkinsfile.groovy
63 lines (48 loc) · 1.71 KB
/
Runner.Jenkinsfile.groovy
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright (C) Activision Publishing, Inc. 2017
// https://github.com/Demonware/harbor-analytics
// Author: David Rieger
// Licensed under the 3-Clause BSD License (the "License");
// you may not use this file except in compliance with the License.
pipeline {
agent {
label 'microagent'
}
environment {
SLACK_TOKEN = credentials('harbor-analytics-slack-bot-token')
AWS_ACCESS_KEY_ID = credentials('aws_id_cred_id')
AWS_SECRET_ACCESS_KEY = credentials('aws_secret_cred_id')
}
triggers {
//Execute the runner pipeline every Friday
//at around 3pm utc.
cron('H 15 * * 5')
}
post {
failure {
echoFailure("Pipeline Failed.")
slackFailure(
'channel',
'Harbor Analyst (Runner)',
"Build #${env.BUILD_NUMBER} for running harbor-analyst failed." +
" Build: ${env.BUILD_URL}"
)
}
}
stages {
stage('Pull latest harbor CSVs') {
steps {
sh 'make get-raw-data'
}
}
stage('Generate analytics report') {
steps {
sh 'make run'
}
}
stage('Publish Report') {
steps {
sh 'make publish'
}
}
}
}