forked from rajpalsinghsaini/pythoncode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkubernetes-jenkins
More file actions
29 lines (27 loc) · 805 Bytes
/
kubernetes-jenkins
File metadata and controls
29 lines (27 loc) · 805 Bytes
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
pipeline {
agent any
stages {
stage('Clone') {
steps {
git branch: 'main', url: 'https://github.com/rajpalsinghsaini/pythoncode.git'
}
}
stage('Build') {
steps {
withKubeConfig(caCertificate: '', clusterName: 'minikube', contextName: '', credentialsId: 'kube-cred', namespace: 'devops-tools', restrictKubeConfigAccess: false, serverUrl: 'https://192.168.49.2:8443') {
sh "kubectl get pods"
}
}
}
stage('Test') {
steps {
sh 'echo "Test Success"'
}
}
stage('Deploy') {
steps {
sh 'echo "Deploy Success"'
}
}
}
}