-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile_nightly
66 lines (66 loc) · 2.52 KB
/
Jenkinsfile_nightly
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
// PAY-7535: Decommissioning BAR application so this pipeline is not required anymore
//
//#!groovy
//
//properties([
// // H allow predefined but random minute see https://en.wikipedia.org/wiki/Cron#Non-standard_characters
// pipelineTriggers([cron('H 8 * * 1-5')]),
// parameters([
// string(name: 'URL_TO_TEST', defaultValue: 'http://bar-api-aat.service.core-compute-aat.internal', description: 'The URL you want to run these tests against'),
// string(name: 'IDAM_API_URL', defaultValue: 'https://idam-api.aat.platform.hmcts.net', description: 'The Idam url you want to run these tests against'),
// string(name: 'OAUTH2_REDIRECT_URI', defaultValue: 'https://bar.aat.platform.hmcts.net/oauth2/callback', description: 'The redirect url you want to authenticate users and get idam token'),
// string(name: 'SecurityRules',
// defaultValue: 'http://raw.githubusercontent.com/hmcts/security-test-rules/master/conf/security-rules.conf',
// description: 'SecurityUrl against which rules will be executed'),
// ])
//])
//
//@Library("Infrastructure")
//
//def type = "java"
//def product = "bar"
//def component = "api"
//
//def secrets = [
// 'bar-${env}': [
// secret('bar-IDAM-CLIENT-SECRET', 'OAUTH2_CLIENT_SECRET'),
// secret('idam-test-user-password', 'TEST_USER_PASSWORD')
// ]
//]
//
//static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
// [$class : 'AzureKeyVaultSecret',
// secretType : 'Secret',
// name : secretName,
// version : '',
// envVariable: envVar
// ]
//}
//
//withNightlyPipeline(type, product, component) {
// env.TEST_URL = params.URL_TO_TEST
// env.IDAM_API_URL = params.IDAM_API_URL
// env.OAUTH2_REDIRECT_URI = params.OAUTH2_REDIRECT_URI
// loadVaultSecrets(secrets)
// enableSecurityScan()
// enableMutationTest()
// enableFortifyScan()
// enableFullFunctionalTest()
// enableSlackNotifications('#fee-pay-nightly-pipeline')
//
// afterAlways('fortify-scan') {
// steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
// }
//
// afterAlways('fullFunctionalTest') {
//
// publishHTML target: [
// allowMissing : true,
// alwaysLinkToLastBuild: true,
// keepAll : true,
// reportDir : "api/target/site/serenity/",
// reportFiles : "index.html",
// reportName : "Bar Api AAT Functional Tests",
// ]
// }
//}