-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathJenkinsfile
54 lines (47 loc) · 2.21 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
#!groovy
@Library(['github.com/cloudogu/[email protected]']) _
// required plugins
// - http://wiki.jenkins-ci.org/display/JENKINS/HTML+Publisher+Plugin
node('docker') {
timestamps {
properties([
// Keep only the last x builds to preserve space
buildDiscarder(logRotator(numToKeepStr: '10')),
// Don't run concurrent builds for a branch, because they use the same workspace directory
disableConcurrentBuilds()
])
stage('Checkout') {
checkout scm
}
stage('Lint') {
shellCheck("./install/create-network.sh")
shellCheck("./install/firewall.sh")
shellCheck("./install/install-ces-packages.sh")
shellCheck("./install/prepare-environment.sh")
shellCheck("./install/setup-message.sh")
shellCheck("./install/sync-files.sh")
shellCheck("./install.sh")
shellCheck("./images/scripts/commons/ces_apt.sh")
shellCheck("./images/scripts/commons/cleanup.sh")
shellCheck("./images/scripts/commons/dependencies.sh")
shellCheck("./images/scripts/commons/docker.sh")
shellCheck("./images/scripts/commons/etcd.sh")
shellCheck("./images/scripts/commons/fail2ban.sh")
shellCheck("./images/scripts/commons/grub.sh")
shellCheck("./images/scripts/commons/guestadditions.sh")
shellCheck("./images/scripts/commons/minimize.sh")
shellCheck("./images/scripts/commons/networking.sh")
shellCheck("./images/scripts/commons/sshd.sh")
shellCheck("./images/scripts/commons/subvolumes.sh")
shellCheck("./images/scripts/commons/terraform.sh")
shellCheck("./images/scripts/commons/update.sh")
shellCheck("./images/scripts/dev/dependencies.sh")
shellCheck("./images/scripts/dev/vagrant.sh")
shellCheck("./images/scripts/prod/sshd_security.sh")
}
stage('Packer validate') {
sh 'cd images/dev && packer init . && packer validate dev.pkr.hcl'
sh 'cd images/prod && packer init . && packer validate -var "timestamp=$(date +%Y%m%d)" prod.pkr.hcl'
}
}
}