-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into npipe-documentation
- Loading branch information
Showing
3,613 changed files
with
203,680 additions
and
112,776 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="refresh" content="1; url=https://docs.docker.com" /> | ||
<title>Docker Documentation</title> | ||
</head> | ||
<body> | ||
<p>We have moved away from the <strong>docker.github.io</strong> domain. If you're not automatically redirected, please visit us at <a href="https://docs.docker.com">docs.docker.com</a>.</p> | ||
|
||
<script> | ||
window.location.assign("https://docs.docker.com" + window.location.pathname); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,108 @@ | ||
wrappedNode(label: 'ubuntu-1604 && x86_64') { | ||
timeout(time: 60, unit: 'MINUTES') { | ||
deleteDir() | ||
stage "checkout" | ||
checkout scm | ||
sh "git submodule update --init --recursive" | ||
stage "test" | ||
def reg = [credentialsId: 'csebuildbot', url: 'https://index.docker.io/v1/'] | ||
|
||
/* Jekyll creates html files to implement client side redirects. | ||
There are absolute links to docs.docker.com in these htmls | ||
we don't want them to be parsed by the tests for now. | ||
Removing jekyll-redirect-from option will make sure these pages | ||
are not generated when building with Jekyll. */ | ||
sh "awk '/jekyll-redirect-from/{n=1}; n {n--; next}; 1' < _config.yml > _config.yml.tmp" | ||
sh "mv _config.yml.tmp _config.yml" | ||
|
||
sh "docker build -t docs:${JOB_BASE_NAME}-${BUILD_NUMBER} `pwd`" | ||
sh "docker build -t tests:${JOB_BASE_NAME}-${BUILD_NUMBER} `pwd`/tests" | ||
sh "docker run -v /usr/src/app/allvbuild --name docs-${JOB_BASE_NAME}-${BUILD_NUMBER} docs:${JOB_BASE_NAME}-${BUILD_NUMBER} /bin/true" | ||
sh "docker run --rm --volumes-from docs-${JOB_BASE_NAME}-${BUILD_NUMBER} -v `pwd`:/docs tests:${JOB_BASE_NAME}-${BUILD_NUMBER}" | ||
sh "docker rm -fv docs-${JOB_BASE_NAME}-${BUILD_NUMBER}" | ||
sh "docker rmi docs:${JOB_BASE_NAME}-${BUILD_NUMBER} tests:${JOB_BASE_NAME}-${BUILD_NUMBER}" | ||
deleteDir() | ||
pipeline { | ||
agent { | ||
label 'ubuntu-1604-aufs-stable' | ||
} | ||
environment { | ||
DTR_URL = credentials('dtr-url') | ||
DOCKER_HOST_STRING = credentials('docker-host') | ||
UCP_BUNDLE = credentials('ucp-bundle') | ||
SUCCESS_BOT_TOKEN = credentials('success-bot-token') | ||
SLACK = credentials('slack-docs-webhook') | ||
} | ||
options { | ||
timeout(time: 1, unit: 'HOURS') | ||
} | ||
stages { | ||
stage( 'docker.github.io' ) { | ||
when { | ||
expression { env.GIT_URL == 'https://github.com/Docker/docker.github.io.git' } | ||
} | ||
stages { | ||
stage( 'build + push stage image, update stage swarm' ) { | ||
when { | ||
branch 'master' | ||
} | ||
steps { | ||
sh """ | ||
cat $SUCCESS_BOT_TOKEN | docker login $DTR_URL --username 'success_bot' --password-stdin | ||
docker build -t $DTR_URL/docker/docker.github.io:stage-${env.BUILD_NUMBER} . | ||
docker push $DTR_URL/docker/docker.github.io:stage-${env.BUILD_NUMBER} | ||
unzip -o $UCP_BUNDLE | ||
export DOCKER_TLS_VERIFY=1 | ||
export COMPOSE_TLS_VERSION=TLSv1_2 | ||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot | ||
export DOCKER_HOST=$DOCKER_HOST_STRING | ||
docker service update --detach=false --force --image $DTR_URL/docker/docker.github.io:stage-${env.BUILD_NUMBER} docs-stage-docker-com_docs --with-registry-auth | ||
""" | ||
} | ||
} | ||
stage( 'build + push prod image, update prod swarm' ) { | ||
when { | ||
branch 'published' | ||
} | ||
steps { | ||
withDockerRegistry(reg) { | ||
sh """ | ||
docker build -t docs/docker.github.io:prod-${env.BUILD_NUMBER} . | ||
docker push docs/docker.github.io:prod-${env.BUILD_NUMBER} | ||
unzip -o $UCP_BUNDLE | ||
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=$DOCKER_HOST_STRING | ||
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 | ||
""" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage( 'docs-private' ) { | ||
when { | ||
expression { env.GIT_URL == "https://github.com/docker/docs-private.git" } | ||
} | ||
stages { | ||
stage( 'build + push beta-stage image, update beta-stage swarm' ) { | ||
when { | ||
branch 'amberjack' | ||
} | ||
steps { | ||
sh """ | ||
cat $SUCCESS_BOT_TOKEN | docker login $DTR_URL --username 'success_bot' --password-stdin | ||
docker build -t $DTR_URL/docker/docs-private:beta-stage-${env.BUILD_NUMBER} . | ||
docker push $DTR_URL/docker/docs-private:beta-stage-${env.BUILD_NUMBER} | ||
unzip -o $UCP_BUNDLE | ||
export DOCKER_TLS_VERIFY=1 | ||
export COMPOSE_TLS_VERSION=TLSv1_2 | ||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot | ||
export DOCKER_HOST=$DOCKER_HOST_STRING | ||
docker service update --detach=false --force --image $DTR_URL/docker/docs-private:beta-stage-${env.BUILD_NUMBER} docs-beta-stage-docker-com_docs --with-registry-auth | ||
""" | ||
} | ||
} | ||
stage( 'build + push beta image, update beta swarm' ) { | ||
when { | ||
branch 'published' | ||
} | ||
steps { | ||
sh """ | ||
cat $SUCCESS_BOT_TOKEN | docker login $DTR_URL --username 'success_bot' --password-stdin | ||
docker build -t $DTR_URL/docker/docs-private:beta-${env.BUILD_NUMBER} . | ||
docker push $DTR_URL/docker/docs-private:beta-${env.BUILD_NUMBER} | ||
unzip -o $UCP_BUNDLE | ||
export DOCKER_TLS_VERIFY=1 | ||
export COMPOSE_TLS_VERSION=TLSv1_2 | ||
export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot | ||
export DOCKER_HOST=$DOCKER_HOST_STRING | ||
docker service update --detach=false --force --image $DTR_URL/docker/docs-private:beta-${env.BUILD_NUMBER} docs-beta-docker-com_docs --with-registry-auth | ||
""" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.