-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
28 lines (24 loc) · 1.09 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
pipeline {
agent any
stages {
stage('Checkout'){
steps{
cleanWs()
sh 'rm -rf *'
// checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[credentialsId: 'githubtoken', url: 'https://github.com/tekdi/onest.network.backend.git']])
checkout scmGit(branches: [[name: '*/dev']], extensions: [], userRemoteConfigs: [[credentialsId: 'ONEST-ID', url: 'https://github.com/tekdi/onest.network.backend.git']])
//checkout scmGit(branches: [[name: '*/dev']], extensions: [], userRemoteConfigs: [[credentialsId: 'githubtoken', url: 'https://github.com/tekdi/onest.network.backend.git']])
}
}
stage ('Build-image') {
steps {
sh 'docker build -t onest-network-backend-p-22 .'
}
}
stage ('Deploy') {
steps {
sh 'docker-compose up -d --force-recreate --no-deps backend'
}
}
}
}