From 41adebaa92d78623c4e986ae5b0bc42247d07c95 Mon Sep 17 00:00:00 2001 From: Stefan Scherer Date: Wed, 18 Mar 2020 23:47:48 +0100 Subject: [PATCH] Deploy docs-stage to S3 instead of swarm Signed-off-by: Stefan Scherer --- .github/workflows/build-master.yml | 4 ++-- Jenkinsfile | 18 ------------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-master.yml b/.github/workflows/build-master.yml index 83f6e67c04..86fcc00204 100644 --- a/.github/workflows/build-master.yml +++ b/.github/workflows/build-master.yml @@ -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 }} diff --git a/Jenkinsfile b/Jenkinsfile index a3e6e51836..6c4f91e945 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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'