mirror of https://github.com/docker/docs.git
Deploy docs-stage to S3 instead of swarm
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
This commit is contained in:
parent
919714630f
commit
41adebaa92
|
|
@ -17,13 +17,13 @@ jobs:
|
|||
- name: build current docs
|
||||
run: docker build --build-arg=ENABLE_ARCHIVES=true --target=deploy-source --output=./_site .
|
||||
- name: upload files to S3 bucket
|
||||
run: aws s3 sync --acl public-read _site s3://docs.docker.com-test-us-east-1/ --delete
|
||||
run: aws s3 sync --acl public-read _site s3://docs.docker.com-stage-us-east-1/ --delete
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
||||
- name: invalidate docs website cache
|
||||
run: aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-test-cache-invalidator response.json
|
||||
run: aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-stage-cache-invalidator response.json
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
|
|
|||
|
|
@ -20,24 +20,6 @@ pipeline {
|
|||
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'
|
||||
|
|
|
|||
Loading…
Reference in New Issue