[25.06.20] Changed for DO registry and new cluster
This commit is contained in:
parent
04ee311003
commit
d8516c358e
@ -6,9 +6,10 @@ env.GIT_BRANCH = 'master'
|
||||
env.GIT_REPOSITORY_PATH = "github.com/andyjk15/${env.APPLICATION_NAME}.git"
|
||||
env.GIT_REPOSITORY_URL = "https://${env.GIT_REPOSITORY_PATH}"
|
||||
env.GITHUB_CREDENTIALS_ID = 'Github'
|
||||
env.DOCKER_REPOSITORY = 'registry.digitalocean.com/cryptosky-image-registry'
|
||||
env.DIGITAL_OCEAN = 'registry.digitalocean.com'
|
||||
env.DOCKER_REPOSITORY = "${env.DIGITAL_OCEAN}/cryptosky-image-registry"
|
||||
env.DOCKER_REPOSITORY_URL = "https://${env.DOCKER_REPOSITORY}"
|
||||
env.DOCKER_REPOSITORY_TCP = "tcp://registry.digitalocean.com"
|
||||
env.DOCKER_REPOSITORY_TCP = "tcp://${env.DIGITAL_OCEAN}"
|
||||
|
||||
env.NAMESPACE = 'production'
|
||||
env.SLAVE_LABEL = "cryptosky-aio-build"
|
||||
@ -44,7 +45,8 @@ try {
|
||||
)]
|
||||
) {
|
||||
sh "doctl auth init --access-token ${DOCTL_TOKEN}"
|
||||
// sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster-production"
|
||||
sh "doctl registry login"
|
||||
sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster"
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,14 +75,15 @@ try {
|
||||
|
||||
stage('Tag Repository') {
|
||||
|
||||
// withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) {
|
||||
withDockerRegistry([credentialsId: 'DORegistry', url: "${env.DOCKER_REPOSITORY_URL}"]) {
|
||||
def image = docker.build("db-gateway:${env.APPLICATION_VERSION}")
|
||||
image.push()
|
||||
def latest = docker.build("db-gateway:latest")
|
||||
latest.push()
|
||||
}
|
||||
// }
|
||||
def image = docker.build("db-gateway:${env.APPLICATION_VERSION}")
|
||||
def latest = docker.build("db-gateway:latest")
|
||||
|
||||
sh "docker tag ${image} ${env.DOCKER_REPOSITORY}/${image}"
|
||||
sh "docker tag ${latest} ${env.DOCKER_REPOSITORY}/${latest}"
|
||||
|
||||
sh "docker push ${env.DOCKER_REPOSITORY}/${image}"
|
||||
sh "docker push ${env.DOCKER_REPOSITORY}/${latest}"
|
||||
|
||||
withCredentials(
|
||||
[usernamePassword(
|
||||
credentialsId: env.GITHUB_CREDENTIALS_ID,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user