mirror of https://github.com/docker/docs.git
add slack webhook to Jenkinsfile
This commit is contained in:
parent
67938199a8
commit
f4a3e5576e
|
@ -1,5 +1,6 @@
|
|||
def dtrVpnAddress = "vpn.corp-us-east-1.aws.dckr.io"
|
||||
def ucpBundle = [file(credentialsId: "ucp-bundle", variable: 'UCP')]
|
||||
def slackString = [string(credentialsId: 'slack-docs-webhook', variable: 'slack')]
|
||||
def reg = [credentialsId: 'csebuildbot', url: 'https://index.docker.io/v1/']
|
||||
|
||||
pipeline {
|
||||
|
@ -50,7 +51,6 @@ pipeline {
|
|||
}
|
||||
withDockerRegistry(reg) {
|
||||
sh """
|
||||
cd ucp-bundle-success_bot
|
||||
export DOCKER_TLS_VERIFY=1
|
||||
export COMPOSE_TLS_VERSION=TLSv1_2
|
||||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
||||
|
@ -70,15 +70,18 @@ pipeline {
|
|||
withCredentials(ucpBundle) {
|
||||
sh 'unzip -o $UCP'
|
||||
}
|
||||
withDockerRegistry(reg) {
|
||||
sh """
|
||||
cd ucp-bundle-success_bot
|
||||
export DOCKER_TLS_VERIFY=1
|
||||
export COMPOSE_TLS_VERSION=TLSv1_2
|
||||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
||||
export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443
|
||||
docker service update --detach=false --force --image docs/docker.github.io:prod-${env.BUILD_NUMBER} docs-docker-com_docs --with-registry-auth
|
||||
"""
|
||||
withCredentials(slackString) {
|
||||
withDockerRegistry(reg) {
|
||||
sh """
|
||||
cd ucp-bundle-success_bot
|
||||
export DOCKER_TLS_VERIFY=1
|
||||
export COMPOSE_TLS_VERSION=TLSv1_2
|
||||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
||||
export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443
|
||||
docker service update --detach=false --force --image docs/docker.github.io:prod-${env.BUILD_NUMBER} docs-docker-com_docs --with-registry-auth
|
||||
curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully published docs. https://docs.docker.com/"}' $slack
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,4 +89,4 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue