[18.02.20] Kubernetes check connections on slave node

This commit is contained in:
andyjk15 2020-02-18 12:10:10 +00:00
parent d090e45dff
commit c7195d4908

View File

@ -53,8 +53,9 @@ try {
env.APPLICATION_VERSION = get_application_version()
mvn '--version'
sh "java -version"
sh "python3 --version"
sh "apt install -y kubectl"
sh "kubectl get serviceaccounts/cicd -o yaml"
}
stage('Build Artifact') {
@ -82,31 +83,6 @@ try {
}
stage('Deploy') {
// withCredentials([kubeconfigFile(credentialsId: 'Kubernetes', variable: 'KUBECONFIG')]) {
// sh '''cat $KUBECONFIG'''
// }
// withCredentials(
// [kubeconfigContent(
// credentialsId: 'Kubernetes',
// variable: 'CONFIG'
// )]
// ) {
// echo ${CONFIG}
// }
// kubernetesDeploy(kubeconfigId: 'Kubernetes', // REQUIRED
//
// configs: '/configuration/kubernetes/service.yaml', '/configuration/kubernetes/deployment.yaml', // REQUIRED
// enableConfigSubstitution: false,
//
// secretNamespace: "${env.NAMESPACE}",
// dockerCredentials: [
// [credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"],
// ]
// )
// deploy()
kubernetesDeploy configs: '**/configuration/kubernetes/*.yaml',
deleteResource: true,
dockerCredentials: [[credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]],
@ -119,7 +95,7 @@ try {
stage('Tag Repository') {
withDockerServer([uri: "tcp://registry.cryptosky.me:4243"]) {
withDockerServer([uri: "${env.DOCKER_REPOSITORY_URL}"]) {
withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) {
def image = docker.build("${env.DOCKER_REPOSITORY}/db-gateway:${env.APPLICATION_VERSION}")
image.push()