-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
48 lines (46 loc) · 1.56 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
pipeline {
agent any
stages {
stage('checkout code'){
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/main']],
extensions: scm.extensions,
userRemoteConfigs: [[
url: '[email protected]:squapllabs/omni-flux.git',
credentialsId: 'GitCredentials'
]]
])
echo 'git checkout completed'
}
}
stage('sonarqube analysis'){
steps{
nodejs(nodeJSInstallationName: 'NodeJS'){
sh "npm install"
withSonarQubeEnv('SonarQube_Server'){
sh "npm install sonar-scanner"
sh "npm run sonar"
}
}
}
}
stage('File copy and remove') {
steps {
sh 'zip -r /var/lib/jenkins/workspace/Omni_test1.zip /var/lib/jenkins/workspace/Omni_test1'
sh 'scp /var/lib/jenkins/workspace/Omni_test1.zip [email protected]:/root/omniflux_application'
sh 'sh /var/lib/jenkins/workspace/omniflux_deploy.sh'
}
}
// stage('docker image build') {
// steps {
// echo 'running docker container details'
// sh ' docker ps'
// sh 'whoami'
// echo 'docker build started'
// sh 'docker build -t omni_flux_image .'
// echo 'docker build completed'
// }
// }
}
}