[19.02.20] Manual kubernetes deployment
This commit is contained in:
parent
9295230295
commit
42f82f8937
@ -46,10 +46,10 @@ def deploy( Integer replicas ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
timestamps {
|
// timestamps {
|
||||||
node ("${env.SLAVE_LABEL}") {
|
node ("${env.SLAVE_LABEL}") {
|
||||||
stage('Initialise') {
|
stage('Initialise') {
|
||||||
checkout([$class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'Github', url: 'https://github.com/andyjk15/db-gateway.git']]])
|
checkout([$class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'Github', url: 'https://github.com/andyjk15/db-gateway.git']]])
|
||||||
|
|
||||||
env.APPLICATION_VERSION = get_application_version()
|
env.APPLICATION_VERSION = get_application_version()
|
||||||
|
|
||||||
@ -64,7 +64,6 @@ try {
|
|||||||
) {
|
) {
|
||||||
sh "doctl auth init --access-token '${DOCTL_TOKEN}'"
|
sh "doctl auth init --access-token '${DOCTL_TOKEN}'"
|
||||||
sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster-production"
|
sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster-production"
|
||||||
sh "kubectl get pods"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,17 +115,20 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
kubernetesDeploy configs: '**/configuration/kubernetes/*.yaml',
|
sh "kubectl apply -f configuration/kubernetes/deployment.yaml"
|
||||||
deleteResource: true,
|
sh "kubectl apply -f configuration/kubernetes/service.yaml"
|
||||||
dockerCredentials: [[credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]],
|
|
||||||
kubeConfig: [path: ''],
|
sh "kubectl get pods"
|
||||||
kubeconfigId: 'Kubernetes',
|
// kubernetesDeploy configs: '**/configuration/kubernetes/*.yaml',
|
||||||
// secretName: '',
|
// deleteResource: true,
|
||||||
ssh: [sshCredentialsId: '*', sshServer: ''],
|
// dockerCredentials: [[credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]],
|
||||||
textCredentials: [certificateAuthorityData: '', clientCertificateData: '', clientKeyData: '', serverUrl: 'https://']
|
// kubeConfig: [path: ''],
|
||||||
|
// kubeconfigId: 'Kubernetes',
|
||||||
|
//// secretName: '',
|
||||||
|
// ssh: [sshCredentialsId: '*', sshServer: ''],
|
||||||
|
// textCredentials: [certificateAuthorityData: '', clientCertificateData: '', clientKeyData: '', serverUrl: 'https://']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch ( exception ) {
|
} catch ( exception ) {
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
throw exception
|
throw exception
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user