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