From f9b5bfe7b4938d7b20be144d98eba17ae1e5b120 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 17 Aug 2022 20:01:16 +0200 Subject: [PATCH 1/2] ci: better cache for releaser build Signed-off-by: CrazyMax --- .github/workflows/build.yml | 3 --- .github/workflows/deploy.yml | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53e260337ca9..636342afd45f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -112,6 +112,3 @@ jobs: uses: docker/bake-action@v2 with: targets: releaser-build - set: | - *.cache-from=type=gha,scope=releaser - *.cache-to=type=gha,scope=releaser,mode=max diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4c2f65d6df42..fdac5fe09d3f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -79,6 +79,14 @@ jobs: set: | *.cache-from=type=gha,scope=deploy-${{ env.BRANCH_NAME }} *.cache-to=type=gha,scope=deploy-${{ env.BRANCH_NAME }},mode=max + - + name: Build releaser + uses: docker/bake-action@v2 + with: + targets: releaser-build + set: | + *.cache-from=type=gha,scope=releaser-${{ env.BRANCH_NAME }} + *.cache-to=type=gha,scope=releaser-${{ env.BRANCH_NAME }},mode=max - name: Configure AWS Credentials if: ${{ env.DOCS_AWS_IAM_ROLE != '' }} From f52fa03f525c903f8f63f31a2bcbcfe630a58d54 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 17 Aug 2022 20:03:02 +0200 Subject: [PATCH 2/2] ci: remove publish workflow Signed-off-by: CrazyMax --- .github/workflows/deploy.yml | 17 +- .github/workflows/publish.yml | 90 ----- _releaser/Dockerfile | 3 +- _releaser/_website-config-docs-stage.json | 388 ---------------------- _releaser/_website-config-docs.json | 388 ---------------------- docker-bake.hcl | 4 - 6 files changed, 7 insertions(+), 883 deletions(-) delete mode 100644 .github/workflows/publish.yml delete mode 100644 _releaser/_website-config-docs-stage.json delete mode 100644 _releaser/_website-config-docs.json diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fdac5fe09d3f..ec365f35764e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,27 +23,24 @@ jobs: JEKYLL_ENV=development DOCS_AWS_REGION=us-east-1 if [ "${{ github.ref }}" = "refs/heads/master" ]; then - DOCS_URL="https://docs-stage2.docker.com" # TODO: change this to https://docs-stage.docker.com when new env switched and ready + DOCS_URL="https://docs-stage.docker.com" DOCS_AWS_IAM_ROLE="arn:aws:iam::710015040892:role/stage-docs-docker.github.io-20220816140248629900000003" DOCS_S3_BUCKET="stage-docs-docker.github.io" - DOCS_S3_CONFIG="s3-config.json" DOCS_CLOUDFRONT_ID="E1R7CSW3F0X4H8" DOCS_LAMBDA_FUNCTION_REDIRECTS="DockerDocsRedirectFunction-stage" - DOCS_SLACK_MSG="Successfully deployed docs-stage2 from master branch. $DOCS_URL" # TODO: change to "deployed docs-stage" when new env switched and ready + DOCS_SLACK_MSG="Successfully deployed docs-stage from master branch. $DOCS_URL" elif [ "${{ github.ref }}" = "refs/heads/published" ]; then - #JEKYLL_ENV=production # TODO: uncomment when new env switched and ready - DOCS_URL="https://docs2.docker.com" # TODO: change this to https://docs.docker.com when new env switched and ready + JEKYLL_ENV=production + DOCS_URL="https://docs.docker.com" DOCS_AWS_IAM_ROLE="arn:aws:iam::710015040892:role/prod-docs-docker.github.io-20220816161549883800000001" DOCS_S3_BUCKET="prod-docs-docker.github.io" - DOCS_S3_CONFIG="s3-config.json" DOCS_CLOUDFRONT_ID="E228TTN20HNU8F" DOCS_LAMBDA_FUNCTION_REDIRECTS="DockerDocsRedirectFunction-prod" - DOCS_SLACK_MSG="Successfully deployed docs2 from published branch. $DOCS_URL" # TODO: change to "deployed docs" when new env switched and ready + DOCS_SLACK_MSG="Successfully deployed docs from published branch. $DOCS_URL" elif [ "${{ github.ref }}" = "refs/heads/lab" ]; then DOCS_URL="https://docs-labs.docker.com" DOCS_AWS_IAM_ROLE="arn:aws:iam::710015040892:role/labs-docs-docker.github.io-20220728143917865600000003" DOCS_S3_BUCKET="labs-docs-docker.github.io" - DOCS_S3_CONFIG="s3-config.json" DOCS_CLOUDFRONT_ID="E1MYDYF65FW3HG" DOCS_LAMBDA_FUNCTION_REDIRECTS="DockerDocsRedirectFunction-labs" else @@ -60,7 +57,6 @@ jobs: echo "DOCS_AWS_REGION=$DOCS_AWS_REGION" >> $GITHUB_ENV echo "DOCS_AWS_IAM_ROLE=$DOCS_AWS_IAM_ROLE" >> $GITHUB_ENV echo "DOCS_S3_BUCKET=$DOCS_S3_BUCKET" >> $GITHUB_ENV - echo "DOCS_S3_CONFIG=$DOCS_S3_CONFIG" >> $GITHUB_ENV echo "DOCS_CLOUDFRONT_ID=$DOCS_CLOUDFRONT_ID" >> $GITHUB_ENV echo "DOCS_LAMBDA_FUNCTION_REDIRECTS=$DOCS_LAMBDA_FUNCTION_REDIRECTS" >> $GITHUB_ENV echo "DOCS_SLACK_MSG=$DOCS_SLACK_MSG" >> $GITHUB_ENV @@ -101,7 +97,7 @@ jobs: aws --region ${{ env.DOCS_AWS_REGION }} s3 sync --acl public-read _site s3://${{ env.DOCS_S3_BUCKET }}/ --delete - name: Update S3 config - if: ${{ env.DOCS_S3_BUCKET != '' && env.DOCS_S3_CONFIG != '' }} + if: ${{ env.DOCS_S3_BUCKET != '' }} uses: docker/bake-action@v2 with: targets: aws-s3-update-config @@ -110,7 +106,6 @@ jobs: env: AWS_REGION: ${{ env.DOCS_AWS_REGION }} AWS_S3_BUCKET: ${{ env.DOCS_S3_BUCKET }} - AWS_S3_CONFIG: ${{ env.DOCS_S3_CONFIG }} - name: Update Cloudfront config if: ${{ env.DOCS_CLOUDFRONT_ID != '' }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index d249323ccf10..000000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: publish - -on: - workflow_dispatch: - push: - branches: - - master - - published - -jobs: - publish: - runs-on: ubuntu-20.04 - steps: - - - name: Prepare - run: | - JEKYLL_ENV=development - DOCS_AWS_REGION=us-east-1 - if [ "${{ github.ref }}" = "refs/heads/master" ]; then - DOCS_URL="https://docs-stage.docker.com" - DOCS_S3_BUCKET="docs.docker.com-stage-us-east-1" - DOCS_S3_CONFIG="_website-config-docs-stage.json" - DOCS_LAMBDA_FUNCTION_CACHE="arn:aws:lambda:us-east-1:710015040892:function:docs-stage-cache-invalidator" - DOCS_SLACK_MSG="Successfully promoted docs-stage from master. https://docs-stage.docker.com/" - elif [ "${{ github.ref }}" = "refs/heads/published" ]; then - JEKYLL_ENV=production - DOCS_URL="https://docs.docker.com" - DOCS_S3_BUCKET="docs.docker.com-us-east-1" - DOCS_S3_CONFIG="_website-config-docs.json" - DOCS_LAMBDA_FUNCTION_CACHE="arn:aws:lambda:us-east-1:710015040892:function:docs-cache-invalidator" - DOCS_SLACK_MSG="Successfully published docs. https://docs.docker.com/" - else - echo >&2 "ERROR: unknown branch ${{ github.ref }}" - exit 1 - fi - echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> $GITHUB_ENV - echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV - echo "JEKYLL_ENV=$JEKYLL_ENV" >> $GITHUB_ENV - echo "DOCS_URL=$DOCS_URL" >> $GITHUB_ENV - echo "DOCS_AWS_REGION=$DOCS_AWS_REGION" >> $GITHUB_ENV - echo "DOCS_S3_BUCKET=$DOCS_S3_BUCKET" >> $GITHUB_ENV - echo "DOCS_S3_CONFIG=$DOCS_S3_CONFIG" >> $GITHUB_ENV - echo "DOCS_LAMBDA_FUNCTION_CACHE=$DOCS_LAMBDA_FUNCTION_CACHE" >> $GITHUB_ENV - echo "DOCS_SLACK_MSG=$DOCS_SLACK_MSG" >> $GITHUB_ENV - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build website - uses: docker/bake-action@v2 - with: - targets: release - set: | - *.cache-from=type=gha,scope=publish-${{ env.BRANCH_NAME }} - *.cache-to=type=gha,scope=publish-${{ env.BRANCH_NAME }},mode=max - - - name: Upload files to S3 bucket - run: | - aws --region ${{ env.DOCS_AWS_REGION }} s3 sync --acl public-read _site s3://${{ env.DOCS_S3_BUCKET }}/ --delete - - - name: Update S3 config - uses: docker/bake-action@v2 - with: - targets: aws-s3-update-config - set: | - *.cache-from=type=gha,scope=releaser - env: - AWS_REGION: ${{ env.DOCS_AWS_REGION }} - AWS_S3_BUCKET: ${{ env.DOCS_S3_BUCKET }} - AWS_S3_CONFIG: ${{ env.DOCS_S3_CONFIG }} - - - name: Invalidate docs website cache - if: ${{ env.DOCS_LAMBDA_FUNCTION_CACHE != '' }} - uses: docker/bake-action@v2 - with: - targets: aws-lambda-invoke - set: | - *.cache-from=type=gha,scope=releaser - env: - AWS_REGION: ${{ env.DOCS_AWS_REGION }} - AWS_LAMBDA_FUNCTION: ${{ env.DOCS_LAMBDA_FUNCTION_CACHE }} - - - name: Send Slack notification - if: ${{ env.DOCS_SLACK_MSG != '' }} - run: | - curl -X POST -H 'Content-type: application/json' --data '{"text":"${{ env.DOCS_SLACK_MSG }}"}' ${{ secrets.SLACK_WEBHOOK }} diff --git a/_releaser/Dockerfile b/_releaser/Dockerfile index cdd4e5edc459..160c856ba7e1 100644 --- a/_releaser/Dockerfile +++ b/_releaser/Dockerfile @@ -35,13 +35,12 @@ RUN --mount=type=bind,from=sitedir,target=/site \ FROM base AS aws-s3-update-config ARG AWS_REGION ARG AWS_S3_BUCKET -ARG AWS_S3_CONFIG RUN --mount=type=bind,target=. \ --mount=type=bind,from=releaser,source=/out/releaser,target=/usr/bin/releaser \ --mount=type=secret,id=AWS_ACCESS_KEY_ID \ --mount=type=secret,id=AWS_SECRET_ACCESS_KEY \ --mount=type=secret,id=AWS_SESSION_TOKEN \ - releaser aws s3-update-config + AWS_S3_CONFIG=s3-config.json releaser aws s3-update-config FROM base AS aws-lambda-invoke ARG AWS_REGION diff --git a/_releaser/_website-config-docs-stage.json b/_releaser/_website-config-docs-stage.json deleted file mode 100644 index 920867427924..000000000000 --- a/_releaser/_website-config-docs-stage.json +++ /dev/null @@ -1,388 +0,0 @@ -{ - "ErrorDocument": { - "Key": "404.html" - }, - "IndexDocument": { - "Suffix": "index.html" - }, - "RedirectAllRequestsTo": null, - "RoutingRules": [ - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.4/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.5/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.6/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.7/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.8/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.9/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.10/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.11/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.12/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.13/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.03/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.09/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.12/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/licensing/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/get-support/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/cluster/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/supported-platforms/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/ucp/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/dtr/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "compliance/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "datacenter/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v18.09/ee/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v18.03/ee/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.06/enterprise/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/docker-ee/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.06/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v18.03/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v18.09/" - }, - "Redirect": { - "HostName": "docs-stage.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - } - ] -} diff --git a/_releaser/_website-config-docs.json b/_releaser/_website-config-docs.json deleted file mode 100644 index 1cbf193010be..000000000000 --- a/_releaser/_website-config-docs.json +++ /dev/null @@ -1,388 +0,0 @@ -{ - "ErrorDocument": { - "Key": "404.html" - }, - "IndexDocument": { - "Suffix": "index.html" - }, - "RedirectAllRequestsTo": null, - "RoutingRules": [ - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.4/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.5/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.6/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.7/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.8/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.9/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.10/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.11/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.12/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v1.13/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.03/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.09/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.12/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/licensing/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/get-support/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/cluster/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/supported-platforms/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/ucp/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/dtr/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "compliance/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "datacenter/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v18.09/ee/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v18.03/ee/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.06/enterprise/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/docker-ee/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "ee/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": null, - "ReplaceKeyWith": "" - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v17.06/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v18.03/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - }, - { - "Condition": { - "HttpErrorCodeReturnedEquals": null, - "KeyPrefixEquals": "v18.09/" - }, - "Redirect": { - "HostName": "docs.docker.com", - "HttpRedirectCode": null, - "Protocol": "https", - "ReplaceKeyPrefixWith": "", - "ReplaceKeyWith": null - } - } - ] -} diff --git a/docker-bake.hcl b/docker-bake.hcl index 4f19155b3b73..15b7176e0db7 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -111,9 +111,6 @@ variable "AWS_REGION" { variable "AWS_S3_BUCKET" { default = "" } -variable "AWS_S3_CONFIG" { - default = "" -} variable "AWS_CLOUDFRONT_ID" { default = "" } @@ -125,7 +122,6 @@ target "_common-aws" { args = { AWS_REGION = AWS_REGION AWS_S3_BUCKET = AWS_S3_BUCKET - AWS_S3_CONFIG = AWS_S3_CONFIG AWS_CLOUDFRONT_ID = AWS_CLOUDFRONT_ID AWS_LAMBDA_FUNCTION = AWS_LAMBDA_FUNCTION }