forked from alphagov/whitehall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
37 lines (33 loc) · 985 Bytes
/
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
#!/usr/bin/env groovy
library("govuk")
REPOSITORY = 'whitehall'
DEFAULT_SCHEMA_BRANCH = 'deployed-to-production'
node {
govuk.setEnvar("PUBLISHING_E2E_TESTS_COMMAND", "test-whitehall")
govuk.buildProject(
publishingE2ETests: true,
brakeman: true,
beforeTest: {
stage("Generate directories for upload tests") {
sh ("mkdir -p ./incoming-uploads")
sh ("mkdir -p ./clean-uploads")
sh ("mkdir -p ./infected-uploads")
sh ("mkdir -p ./attachment-cache")
sh ("mkdir -p ./asset-manager-tmp")
}
},
overrideTestTask: {
stage("Lint") {
sh("bundle exec rake lint")
}
stage("Run tests") {
if (params.IS_SCHEMA_TEST) {
echo "Running a subset of the tests to check the content schema changes"
govuk.runRakeTask("test:publishing_schemas --trace")
} else {
govuk.runRakeTask("ci:setup:minitest test:in_parallel --trace")
}
}
}
)
}