-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathJenkinsfile
74 lines (72 loc) · 2.18 KB
/
Jenkinsfile
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
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env groovy
String cron_string = BRANCH_NAME == "master" ? "H H(0-4) * * *" : ""
pipeline {
environment {
GIT_REPO_NAME = 'devops-automation-infra'
GIT_CREDS = credentials('av-jenkins-reader')
HABERTEST_HEARTBEAT_SERVER='https://heartbeat-server.tls.ai'
HABERTEST_PROVISIONER='https://provisioner.tls.ai'
HABERTEST_SSL_CERT='$HOME/.habertest/habertest.crt'
HABERTEST_SSL_KEY='$HOME/.habertest/habertest.key'
}
agent {
label 'automation'
}
libraries {
lib('pipeline-library')
}
options {
timestamps()
disableConcurrentBuilds()
timeout(time: 4, unit: 'HOURS')
ansiColor('xterm')
buildDiscarder(logRotator(numToKeepStr:'50'))
}
triggers {
cron(cron_string)
issueCommentTrigger('^\\/rebuild')
}
parameters {
string(name: 'AUTOMATION_INFRA_BRANCH', defaultValue: 'master', description: 'The automation_infra branch to include in this pipeline')
}
stages {
stage ('Git') {
steps {
cleanWs()
script {
coreLib.repoInit("https://${GIT_CREDS_USR}:${GIT_CREDS_PSW}@github.com/AnyVisionltd/core-manifest.git", "automation")
}
}
}
stage ('Build automation proxy container') {
steps{
dir ('devops-automation-infra'){
sh(script: "make push-automation-proxy")
}
}
}
stage('Run integration tests') {
steps {
dir ('devops-automation-infra'){
sh (
script: "make test-sanity-aws"
)
}
}
}
} // end of stages
post {
success {
cleanWs()
}
always {
dir (env.GIT_REPO_NAME) {
script {
coreLib.notification()
}
}
sh "mkdir -p build-artifacts && mv devops-automation-infra/logs build-artifacts || true"
archiveArtifacts artifacts: 'build-artifacts/**/*', fingerprint: true
}
}
}