-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjenkins
38 lines (36 loc) · 1.14 KB
/
jenkins
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
pipeline {
agent any
tools{
maven 'maven'
}
stages{
stage('Build Maven'){
steps{
checkout scmGit(branches: [[name: '*/sidcloud-ConvertMfileTofile']], extensions: [], userRemoteConfigs: [[credentialsId: 'a8c817df-3929-48c4-b679-0b9f48206eb7', url: 'https://git.idc.tarento.com/nsdc/sid-cloud-sdk.git']])
sh 'mvn clean install'
}
}
stage('Build docker image'){
steps{
script{
sh 'docker build -t pruthvi1902/sid-cloud-service .'
}
}
}
stage('Push image to hub'){
steps{
script{
withCredentials([string(credentialsId: 'dockerhub', variable: 'dockerhubpwd')]) {
sh 'docker login -u pruthvi1902 -p ${dockerhubpwd}'
}
sh 'docker push pruthvi1902/sid-cloud-service'
}
}
}
stage('Deploy to Minikube') {
steps {
kubernetesDeploy (configs: 'sid-cloud-service.yaml', kubeconfigId: 'k8sconfigpwd')
}
}
}
}