-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathJenkinsfile
40 lines (33 loc) · 1009 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
38
39
40
#!groovy
pipeline {
agent {
label 'general-purpose'
}
tools {
jdk "zulu-11"
maven "maven-3.6.3"
}
environment {
JAVA_HOME = tool("zulu-11")
MAVEN_OPTS = '-Xmx2G -Djavax.net.ssl.trustStore=${JAVA_HOME}/jre/lib/security/cacerts'
payaraBuildNumber = "${BUILD_NUMBER}"
PATH = "$PATH:/usr/local/bin" // Ensure the yarn binary is in PATH if not globally available
}
stages {
stage('Install Dependencies') {
steps {
// Install project dependencies
sh 'curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -'
sh 'sudo apt-get install -y nodejs'
sh 'sudo npm install -g yarn'
}
}
stage('Build') {
steps {
// Build the project using yarn
sh 'yarn install'
sh 'yarn run tslint'
sh 'yarn run compile' }
}
}
}