[19.02.20] TCP fix

This commit is contained in:
andyjk15 2020-02-19 10:19:23 +00:00
parent 3155cc723d
commit 2e3ada53b7

View File

@ -8,6 +8,7 @@ env.GIT_REPOSITORY_URL = "https://${env.GIT_REPOSITORY_PATH}"
env.GITHUB_CREDENTIALS_ID = 'Registry' env.GITHUB_CREDENTIALS_ID = 'Registry'
env.DOCKER_REPOSITORY = 'registry.cryptosky.me' env.DOCKER_REPOSITORY = 'registry.cryptosky.me'
env.DOCKER_REPOSITORY_URL = "https://${env.DOCKER_REPOSITORY}" env.DOCKER_REPOSITORY_URL = "https://${env.DOCKER_REPOSITORY}"
env.DOCKER_REPOSITORY_TCP = "tcp://${env.DOCKER_REPOSITORY}:4243"
env.NAMESPACE = 'production' env.NAMESPACE = 'production'
env.SLAVE_LABEL = "cryptosky-aio-build" env.SLAVE_LABEL = "cryptosky-aio-build"
@ -62,8 +63,8 @@ try {
)] )]
) { ) {
sh "doctl auth init --access-token '${DOCTL_TOKEN}'" sh "doctl auth init --access-token '${DOCTL_TOKEN}'"
// sh "snap connect doctl:kube-config"
sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster-production" sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster-production"
sh "kubectl get pods"
} }
} }
@ -94,17 +95,17 @@ try {
stage('Deploy') { stage('Deploy') {
kubernetesDeploy configs: '**/configuration/kubernetes/*.yaml', kubernetesDeploy configs: '**/configuration/kubernetes/*.yaml',
deleteResource: true, deleteResource: true,
dockerCredentials: [[credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]], dockerCredentials: [[credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_TCP}"]],
kubeConfig: [path: ''], kubeConfig: [path: ''],
kubeconfigId: 'Kubernetes', kubeconfigId: 'Kubernetes',
secretName: '', // secretName: '',
ssh: [sshCredentialsId: '*', sshServer: ''], ssh: [sshCredentialsId: '*', sshServer: ''],
textCredentials: [certificateAuthorityData: '', clientCertificateData: '', clientKeyData: '', serverUrl: 'https://'] textCredentials: [certificateAuthorityData: '', clientCertificateData: '', clientKeyData: '', serverUrl: 'https://']
} }
stage('Tag Repository') { stage('Tag Repository') {
withDockerServer([uri: "${env.DOCKER_REPOSITORY_URL}"]) { withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) {
withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) { withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) {
def image = docker.build("${env.DOCKER_REPOSITORY}/db-gateway:${env.APPLICATION_VERSION}") def image = docker.build("${env.DOCKER_REPOSITORY}/db-gateway:${env.APPLICATION_VERSION}")
image.push() image.push()