forked from alphagov/govuk-app-deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
49 lines (39 loc) · 907 Bytes
/
Jenkinsfile
File metadata and controls
49 lines (39 loc) · 907 Bytes
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
#!/usr/bin/env groovy
library("govuk")
REPOSITORY = 'govuk-app-deployment'
node {
properties([
buildDiscarder(
logRotator(
numToKeepStr: '50')
),
[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false],
])
try {
stage("Checkout") {
govuk.checkoutFromGitHubWithSSH(REPOSITORY)
}
stage("Clean up workspace") {
govuk.cleanupGit()
}
stage("Merge master") {
govuk.mergeMasterBranch()
}
stage("bundle install") {
govuk.bundleApp()
}
stage("Lint Ruby") {
govuk.rubyLinter("*/*")
}
stage("Tests") {
govuk.runTests()
}
} catch (e) {
currentBuild.result = "FAILED"
step([$class: 'Mailer',
notifyEveryUnstableBuild: true,
recipients: 'govuk-ci-notifications@digital.cabinet-office.gov.uk',
sendToIndividuals: true])
throw e
}
}