-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile1
36 lines (35 loc) · 1.17 KB
/
Jenkinsfile1
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
pipeline {
agent any
stages {
stage('checkout code'){
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/main-backup-28-sep']],
extensions: scm.extensions,
userRemoteConfigs: [[
url: '[email protected]:squapllabs/omni-flux.git',
credentialsId: 'GitCredentials'
]]
])
echo 'git checkout completed'
}
}
// 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'
}
}
}
}