-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
70 lines (64 loc) · 2.72 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
pipeline {
agent any
triggers {
cron '@midnight'
}
options {
buildDiscarder(logRotator(numToKeepStr: '60', artifactNumToKeepStr: '2'))
}
parameters {
string(
name: 'engineListUrl',
description: 'Engine to use for build',
defaultValue: 'https://product.ivyteam.io'
)
}
stages {
stage('build') {
steps {
script {
def random = (new Random()).nextInt(10000000)
def networkName = "build-" + random
def seleniumName = "selenium-" + random
def ivyName = "ivy-" + random
try {
sh "docker network create ${networkName}"
docker.image("svenwal/jsonplaceholder:latest").withRun("--name jsonplaceholder --network ${networkName}") {
docker.image("selenium/standalone-firefox:4.10").withRun("-e START_XVFB=false --shm-size=2g --name ${seleniumName} --network ${networkName}") {
docker.build('maven-selenium').inside("--name ${ivyName} --network ${networkName}") {
def workspace = pwd()
def phase = isReleasingBranch() ? 'deploy' : 'verify'
maven cmd: "clean ${phase} -Dmaven.test.failure.ignore=true " +
"-Dengine.directory=${workspace}/html-dialog-demos/html-dialog-demos/target/ivyEngine " +
"-Divy.engine.version.latest.minor=true " +
"-Divy.engine.list.url=${params.engineListUrl} " +
"-DaltDeploymentRepository=nexus.axonivy.com::https://nexus.axonivy.com/repository/maven-snapshots/ " +
"-Dselenide.remote=http://${seleniumName}:4444/wd/hub " +
"-Dtest.host.name=${ivyName}"
archiveArtifacts '**/target/*.iar,**/target/*.zip'
archiveArtifacts artifacts: '**/target/selenide/reports/**/*', allowEmptyArchive: true
recordIssues tools: [eclipse()], qualityGates: [[threshold: 1, type: 'TOTAL']]
recordIssues tools: [mavenConsole()], qualityGates: [[threshold: 1, type: 'TOTAL']], filters: [
excludeMessage('.*An illegal reflective access operation has occurred.*'), // in rule engine test
]
junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: '**/target/*-reports/**/*.xml'
}
}
}
} finally {
sh "docker network rm ${networkName}"
}
}
}
}
stage('check editorconfig') {
steps {
script {
docker.image('mstruebing/editorconfig-checker').inside {
sh 'ec -no-color'
}
}
}
}
}
}