-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
55 lines (50 loc) · 1.39 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
pipeline {
agent { label 'executor-v2' }
options {
timestamps()
buildDiscarder(logRotator(numToKeepStr: '30'))
}
parameters {
string(name: 'CONJUR_IMAGE', defaultValue: 'cyberark/conjur:edge', description: 'Conjur image to deploy')
}
triggers {
cron(getDailyCronString())
}
stages {
stage('Lint'){
steps {
sh 'scripts/lint'
}
}
stage('Validate Changelog') {
steps {
sh 'ci/parse-changelog'
}
}
stage('Smoke Test'){
environment {
STACK_NAME = "ecsdeployci${BRANCH_NAME.replaceAll("[^A-Za-z0-9]", "").toLowerCase().take(6)}${BUILD_NUMBER}"
}
steps {
sh 'summon -f scripts/secrets.yml scripts/prepare'
sh 'summon -f scripts/secrets.yml scripts/deploy'
sh 'summon -f scripts/secrets.yml scripts/exercise'
}
post {
always {
archiveArtifacts(artifacts: 'params.json')
archiveArtifacts(artifacts: 'admin_password_meta.json', allowEmptyArchive: true)
archiveArtifacts(artifacts: 'stack_*.json')
archiveArtifacts(artifacts: '**/*.log', allowEmptyArchive: true)
archiveArtifacts(artifacts: 'conjur_git_commit', allowEmptyArchive: true)
sh 'summon -f scripts/secrets.yml scripts/cleanup'
}
}
}
}
post {
always {
cleanupAndNotify(currentBuild.currentResult)
}
}
}