[19.02.20] Secret for repository revert

This commit is contained in:
andyjk15 2020-02-19 11:27:55 +00:00
parent 42f82f8937
commit b1b52dec23
2 changed files with 68 additions and 75 deletions

View File

@ -72,4 +72,4 @@ spec:
memory: 256Mi memory: 256Mi
restartPolicy: Always restartPolicy: Always
imagePullSecrets: imagePullSecrets:
- name: $KUBERNETES_SECRET_NAME - name: registry-secret

View File

@ -46,7 +46,7 @@ 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']]])
@ -101,17 +101,17 @@ try {
latest.push() latest.push()
} }
} }
// } // }
// withCredentials( // withCredentials(
// [usernamePassword( // [usernamePassword(
// credentialsId: env.BITBUCKET_CREDENTIALS_ID, // credentialsId: env.BITBUCKET_CREDENTIALS_ID,
// passwordVariable: 'GIT_PASSWORD', // passwordVariable: 'GIT_PASSWORD',
// usernameVariable: 'GIT_USERNAME' // usernameVariable: 'GIT_USERNAME'
// )] // )]
// ) { // ) {
// sh "git tag ${env.APPLICATION_VERSION}" // sh "git tag ${env.APPLICATION_VERSION}"
// sh "git push https://${GIT_USERNAME}:${GIT_PASSWORD}@${env.GIT_REPOSITORY_PATH} ${env.APPLICATION_VERSION}" // sh "git push https://${GIT_USERNAME}:${GIT_PASSWORD}@${env.GIT_REPOSITORY_PATH} ${env.APPLICATION_VERSION}"
// } // }
} }
stage('Deploy') { stage('Deploy') {
@ -119,14 +119,7 @@ try {
sh "kubectl apply -f configuration/kubernetes/service.yaml" sh "kubectl apply -f configuration/kubernetes/service.yaml"
sh "kubectl get pods" 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 ) { } catch ( exception ) {