diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9d854f3e72..96531d8522 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,6 +3,7 @@ name: publish on: push: branches: + - lab - master - published @@ -26,6 +27,10 @@ jobs: 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/" + elif [ "${{ github.ref }}" = "refs/heads/lab" ]; then + DOCS_S3_BUCKET="" + DOCS_LAMBDA_FUNCTION_CACHE="" + DOCS_S3_CONFIG="_website-config-docs-lab.json" fi echo "JEKYLL_ENV=$JEKYLL_ENV" >> $GITHUB_ENV echo "DOCS_AWS_REGION=$DOCS_AWS_REGION" >> $GITHUB_ENV @@ -69,6 +74,7 @@ jobs: 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 @@ -81,5 +87,6 @@ jobs: 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/_website-config-docs-lab.json b/_releaser/_website-config-docs-lab.json new file mode 100644 index 0000000000..85fc6e8f1d --- /dev/null +++ b/_releaser/_website-config-docs-lab.json @@ -0,0 +1,388 @@ +{ + "ErrorDocument": { + "Key": "404.html" + }, + "IndexDocument": { + "Suffix": "index.html" + }, + "RedirectAllRequestsTo": null, + "RoutingRules": [ + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.4/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.5/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.6/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.7/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.8/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.9/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.10/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.11/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.12/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v1.13/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v17.03/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v17.09/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v17.12/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "ee/licensing/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "ee/get-support/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "ee/cluster/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "ee/supported-platforms/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "ee/ucp/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "ee/dtr/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "compliance/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "datacenter/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v18.09/ee/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v18.03/ee/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v17.06/enterprise/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "ee/docker-ee/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "ee/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": null, + "ReplaceKeyWith": "" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v17.06/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v18.03/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": null, + "KeyPrefixEquals": "v18.09/" + }, + "Redirect": { + "HostName": "docs-lab.docker.com", + "HttpRedirectCode": null, + "Protocol": "https", + "ReplaceKeyPrefixWith": "", + "ReplaceKeyWith": null + } + } + ] +}