sh "ssh root@192.168.1.156 kubectl apply -f /usr/local/k8s/${NAME}-job-${env.BRANCH}.yaml"
break
case "release":
echo "apply release"
break
case "beta":
echo "apply beta"
break
case "master":
sshagent(['test-k8s-login-key']) {
sh "ssh root@193.112.79.170 kubectl apply -f /usr/local/k8s/${NAME}-job-${env.BRANCH}.yaml"
}
break
}
}
def image(){
switch("${env.Branch}") {
case "dev":
sh "ssh root@192.168.1.156 kubectl set image Deployment/${env.K8S_DEPLOYMENT} ${env.NAME}=192.168.1.131:8888/job/${env.BRANCH}/${env.NAME}:${env.VERSION} -n ${env.BRANCH}"
break
case "release":
echo "image release"
break
case "beta":
echo "image beta"
break
case "master":
sshagent(['test-k8s-login-key']) {
sh "ssh root@193.112.79.170 kubectl set image Deployment/${env.K8S_DEPLOYMENT} ${env.NAME}=192.168.0.19:5000/job/${env.BRANCH}/${env.NAME}:${env.VERSION} -n ${env.BRANCH}"