mirror of https://github.com/docker/docs.git
add slack webhook to Jenkinsfile
This commit is contained in:
parent
5bc9c3fdea
commit
2ddd114fd3
|
|
@ -1,5 +1,6 @@
|
||||||
def dtrVpnAddress = "vpn.corp-us-east-1.aws.dckr.io"
|
def dtrVpnAddress = "vpn.corp-us-east-1.aws.dckr.io"
|
||||||
def ucpBundle = [file(credentialsId: "ucp-bundle", variable: 'UCP')]
|
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/']
|
def reg = [credentialsId: 'csebuildbot', url: 'https://index.docker.io/v1/']
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
@ -50,7 +51,6 @@ pipeline {
|
||||||
}
|
}
|
||||||
withDockerRegistry(reg) {
|
withDockerRegistry(reg) {
|
||||||
sh """
|
sh """
|
||||||
cd ucp-bundle-success_bot
|
|
||||||
export DOCKER_TLS_VERIFY=1
|
export DOCKER_TLS_VERIFY=1
|
||||||
export COMPOSE_TLS_VERSION=TLSv1_2
|
export COMPOSE_TLS_VERSION=TLSv1_2
|
||||||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
||||||
|
|
@ -70,15 +70,18 @@ pipeline {
|
||||||
withCredentials(ucpBundle) {
|
withCredentials(ucpBundle) {
|
||||||
sh 'unzip -o $UCP'
|
sh 'unzip -o $UCP'
|
||||||
}
|
}
|
||||||
withDockerRegistry(reg) {
|
withCredentials(slackString) {
|
||||||
sh """
|
withDockerRegistry(reg) {
|
||||||
cd ucp-bundle-success_bot
|
sh """
|
||||||
export DOCKER_TLS_VERIFY=1
|
cd ucp-bundle-success_bot
|
||||||
export COMPOSE_TLS_VERSION=TLSv1_2
|
export DOCKER_TLS_VERIFY=1
|
||||||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
export COMPOSE_TLS_VERSION=TLSv1_2
|
||||||
export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443
|
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot
|
||||||
docker service update --detach=false --force --image docs/docker.github.io:prod-${env.BUILD_NUMBER} docs-docker-com_docs --with-registry-auth
|
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
|
||||||
|
"""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue