-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile.waiter
108 lines (103 loc) · 4.12 KB
/
Jenkinsfile.waiter
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!groovy
pipeline {
agent { node { label 'linux' } }
options {
buildDiscarder logRotator( numToKeepStr: '20' )
}
parameters {
string( defaultValue: '9.4.36.v20210114', description: 'Jetty version to use to build Jet/Waiter project',
name: 'JETTY_VERSION' )
string( defaultValue: 'jdk11', description: 'JDK to use (jdk8,jdk11,jdk14)', name: 'JDK' )
string( defaultValue: 'jetty-upgrade-check-branch', description: 'Waiter branch', name: 'WAITER_BRANCH' )
string( defaultValue: 'twosigma', description: 'Waiter github org', name: 'WAITER_ORG' )
//string( defaultValue: 'master', description: 'Jet branch', name: 'JET_BRANCH' )
//string( defaultValue: 'twosigma', description: 'Jet github org', name: 'JET_ORG' )
}
tools {
jdk "$jdk"
maven 'maven3'
}
environment {
PATH = "/root/.local/bin:$PATH"
JETTY_VERSION = "$JETTY_VERSION"
WAITER_JETTY_VERSION = "${JETTY_VERSION}"
}
stages {
// stage("Checkout Waiter & Install leiningen Waiter") {
// steps {
// container( 'jetty-build' ) {
// withEnv( ["JAVA_HOME=${tool "${jdk}"}"]) {
// git url: "https://github.com/$WAITER_ORG/waiter.git", branch: "${WAITER_BRANCH}"
// dir( "waiter/bin/ci/" ) {
// sh "./install-lein"
// }
// }
// }
// }
// }
// stage("Checkout Jet & build Jet"){
// steps{
// container('jetty-build') {
// git url: "https://github.com/$JET_ORG/jet.git", branch: "${JET_BRANCH}"
// // TODO remove it when docker image have it
// //sh "apt update && apt install -y leiningen jq netcat"
// withEnv( ["JAVA_HOME=${tool "${jdk}"}"]) {
// configFileProvider([configFile(fileId: 'profiles.clj', variable: 'PROFILES_CLJ' ),
// configFile(fileId:'lein.http.enabled', variable: 'LEIN_HTTP_ENABLED' )]) {
// sh "mkdir -p ~/.lein"
// sh "cp $PROFILES_CLJ ~/.lein/profiles.clj"
// sh "cat $LEIN_HTTP_ENABLED >> ./project.clj"
// sh "lein with-profile jetty-stage install"
// }
// }
// }
// }
// }
stage("Checkout Waiter & Build Waiter"){
steps{
container('jetty-build') {
withEnv( ["JAVA_HOME=${tool "${jdk}"}","WAITER_JETTY_VERSION = ${JETTY_VERSION}"]) {
git url: "https://github.com/$WAITER_ORG/waiter.git", branch: "${WAITER_BRANCH}"
//sh "apt update && apt install -y leiningen jq netcat"
dir( "waiter/bin/ci/" ) {
sh "./install-lein"
sh "apt update"
sh "apt install -y python3-pip jq"
}
configFileProvider(
[configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS'),
configFile(fileId:'lein.http.enabled', variable: 'LEIN_HTTP_ENABLED' ),
configFile(fileId: 'profiles.clj', variable: 'PROFILES_CLJ')]) {
sh "mkdir -p ~/.m2"
sh "cp $GLOBAL_MVN_SETTINGS ~/.m2/settings.xml"
// sh "mkdir -p ~/.lein"
// sh "cp $PROFILES_CLJ ~/.lein/profiles.clj"
// sh "cat $LEIN_HTTP_ENABLED >> ./project.clj"
//sh "cat $LEIN_HTTP_ENABLED >> ../containers/test-apps/jwks-server/project.clj"
//sh "cat $LEIN_HTTP_ENABLED >> ../containers/test-apps/jwks-server/project.clj"
// dir("waiter") {
// sh "./bin/ci/run-unit-tests.sh"
// }
dir("waiter") {
sh "./bin/ci/run-integration-tests.sh composite eftest integration-fast"
}
dir("cli"){
sh "pip install -e ."
sh "pip install -r integration/requirements.txt"
//sh "./bin/ci/run-integration-tests.sh"
}
}
}
}
}
}
}
post {
always {
script{
currentBuild.description = "Build Waiter branch ${WAITER_BRANCH}, Jetty Version ${JETTY_VERSION}, jdk ${jdk}"
}
junit testResults: '**/target/surefire-reports/*.xml', allowEmptyResults: true
}
}
}