forked from ravi2krishna/lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
32 lines (28 loc) · 942 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
pipeline {
agent any
stages {
stage('Test') {
steps {
echo 'Sonar Analysis'
sh 'cd webapp && sudo docker run --rm -e SONAR_HOST_URL="http://18.219.166.107:9000" -e SONAR_LOGIN="sqp_6319576a8565b5f128fc25c3cac0d3ac7cf484af" -v ".:/usr/src" sonarsource/sonar-scanner-cli -Dsonar.projectKey=lms'
}
}
stage('Build & Release') {
steps {
script {
def packageJSON = readJSON file: 'webapp/package.json'
def packageJSONVersion = packageJSON.version
sh "echo '${packageJSONVersion}'"
echo 'Building'
sh 'cd webapp && npm install && npm run build'
sh 'cd webapp && ls dist'
}
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}