35 lines
855 B
Groovy
35 lines
855 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
stage('Get credentials to Cluster') {
|
|
steps {
|
|
sh '''
|
|
az login --identity
|
|
az aks get-credentials --resource-group tst-aks-rg --name edu
|
|
kubelogin convert-kubeconfig -l azurecli
|
|
'''
|
|
}
|
|
}
|
|
stage('Apply to Cluster') {
|
|
steps {
|
|
sh '''
|
|
kubectl apply -f namespace.yaml
|
|
kubectl apply -f secret-store.yaml
|
|
kubectl apply -f deploy.yaml
|
|
kubectl apply -f ingress.yaml
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
cleanup {
|
|
sh 'rm -f ~/.kube/config || true'
|
|
}
|
|
}
|
|
}
|