Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
usha-mandya authored Aug 10, 2022
2 parents 3215345 + 4eb4556 commit ff9a439
Show file tree
Hide file tree
Showing 5,600 changed files with 89,690 additions and 650,411 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .NOT_EDITED_HERE.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions .docker/Dockerfile.devenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM docker/dev-environments-ruby:stable-1
RUN gem install bundler jekyll
CMD ["bundle", "install"]
3 changes: 3 additions & 0 deletions .docker/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dockerfile": "Dockerfile.devenv"
}
14 changes: 11 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
.dockerignore
.DS_Store
.git
.github
.gitignore
.idea
.jekyll-cache
.jekyll-metadata
.sass-cache
tests
_releaser
_site
CONTRIBUTING.md
Dockerfile
docker-compose.yml
_site
Gemfile.lock
/vendor
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*.{scss,html,md}]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COMPOSE_DOCKER_CLI_BUILD=1
DOCKER_BUILDKIT=1
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto-detect text files, ensure they use LF.
* text=auto eol=lf
22 changes: 22 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Each line is a file pattern followed by one or more owners.
# Owners will be requested for review when someone opens a pull request.

# For more details, see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

/build @dockertopia @crazy-max

/compose/ @dockertopia @usha-mandya

/desktop/ @aevesdocker @usha-mandya

/docker-hub/ @jerae-duffin @craig-osterhout

/engine/ @dockertopia @usha-mandya

/registry/ @usha-mandya

/single-sign-on/ @jerae-duffin

/single-sign-on/index.md @craig-osterhout

/subscription/ @jerae-duffin
34 changes: 24 additions & 10 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@

<!--
## READ ME FIRST
This repository is for reporting issues related to Docker Documentation. Before submitting a new issue, check whether the issue has already been reported. You can join the discussion using an emoji, or by adding a comment to an existing issue.
You can ask general questions and get community support through the Docker Community Slack - http://dockr.ly/slack. Personalized support is available through the Docker Pro, Team, and Business subscriptions. See https://www.docker.com/pricing for details.
-->

### Problem description

<!--Briefly describe the problem that you found.
Only DOCUMENTATION issues should be filed here.
For general questions, go to https://forums.docker.com/. -->
<!--
Briefly describe the problem that you found. A clear title and description helps us understand and address the issue quickly.
Report only documentation issues here. Report any product issues in the corresponding product repository.
If you are reporting a broken link issue, let us know how you arrived at the broken link; was it through a page on docs.docker.com, or from an external website?
-->

### Problem location

<!-- Help us find the problem quickly by choosing one of these. -->
<!-- Help us find the problem quickly by choosing one of the following options: -->

- I saw a problem on the following URL: <URL>
- I saw a problem at the following URL: <Add URL>

- I couldn't find the information I wanted. I expected to find it near the following URL: <URL>
- I couldn't find the information I wanted. I expected to find it near the following URL <Add the URL and briefly describe how we can improve the existing content>

- Other: <DETAILS>
- Other: <Add details that can help us understand the issue>

### Project version(s) affected

<!-- If this problem only affects specific versions of a project (like Docker
Engine 1.13), tell us here. The fix may need to take that into account. -->
Engine 20.10, or Docker Desktop 4.2.0), tell us here. The fix may need to take that into account. -->

### Suggestions for a fix

<!--If you have specific ideas about how we can fix this, let us know. -->

<!--If you have specific ideas about how we can fix this issue, let us know. -->

<!-- To improve this template, edit the .github/ISSUE_TEMPLATE.md file -->
15 changes: 1 addition & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
<!--Thanks for your contribution. See [CONTRIBUTING](CONTRIBUTING.md)
for this project's contribution guidelines. Remove these comments
as you go.
DO NOT edit files and directories listed in _data/not_edited_here.yaml.
These are maintained in upstream repos and changes here will be lost.
Help us merge your changes more quickly by adding details and setting metadata
(such as labels, milestones, and reviewers) over at the right-hand side.-->
as you go.-->

### Proposed changes

<!--Tell us what you did and why-->

### Unreleased project version (optional)

<!--If this change only applies to an unreleased version of a project, note
that here and base your work on the `vnext-` branch for your project. If
this doesn't apply to this PR, you can remove this whole section.
Set a milestone if appropriate. -->

### Related issues (optional)

<!--Refer to related PRs or issues: #1234, or 'Fixes #1234' or 'Closes #1234'.
Expand Down
117 changes: 117 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: build

on:
push:
# needs push event on default branch otherwise cache is evicted when pull request is merged
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build
uses: docker/bake-action@v2
with:
targets: release
set: |
*.cache-from=type=gha,scope=build
*.cache-to=type=gha,scope=build,mode=max
validate:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target:
- htmlproofer
- mdl
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Validate
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}-output
set: |
*.cache-to=type=gha,scope=validate-${{ matrix.target }},mode=max
*.cache-from=type=gha,scope=validate-${{ matrix.target }}
*.cache-from=type=gha,scope=build
-
name: Annotate
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const results = fs.readFileSync('lint/results', 'utf-8');
if (results.length == 0) {
process.exit(0);
}
// print results
console.log(results);
process.exitCode = 1;
// construct annotations by parsing output
switch ("${{ matrix.target }}") {
case "htmlproofer":
const re = /^- (.+)\n \* (.+) \(line (\d+)\)\n(.+)$/gm;
while (true) {
const result = re.exec(results);
if (result === null) {
break;
}
core.error(`${result[2]}\n${result[4]}`, {
title: 'Link check failed',
// file: result[1],
// startLine: result[3],
});
}
break;
case "mdl":
const jsonResults = JSON.parse(results);
for (const result of jsonResults) {
const title = result.rule + (result.aliases.length > 0 ? ` (${result.aliases[0]})` : ``);
console.log(`${result.filename}:${result.line}; ${title} - ${result.description}`);
core.error(result.description, {
title: title,
file: result.filename,
startLine: result.line,
});
}
break;
}
# build-releaser job will just build _releaser app used for Netlify and
# AWS deployment in publish workflow. it's just to be sure it builds correctly.
build-releaser:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build
uses: docker/bake-action@v2
with:
targets: releaser-build
set: |
*.cache-from=type=gha,scope=releaser
*.cache-to=type=gha,scope=releaser,mode=max
27 changes: 27 additions & 0 deletions .github/workflows/clean-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: clean-pr

on:
pull_request:
types:
- closed

jobs:
netlify-remove:
runs-on: ubuntu-20.04
if: github.event.pull_request.head.repo.fork == false
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
-
name: Remove site from Netlify
uses: docker/bake-action@v2
with:
targets: netlify-remove
set: |
*.cache-from=type=gha,scope=releaser
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_NAME: ${{ github.repository }}/${{ github.head_ref }}
100 changes: 100 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: publish

on:
workflow_dispatch:
push:
branches:
- lab
- 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/"
elif [ "${{ github.ref }}" = "refs/heads/lab" ]; then
DOCS_URL="https://docs-lab.docker.com"
DOCS_S3_BUCKET=""
DOCS_LAMBDA_FUNCTION_CACHE=""
DOCS_S3_CONFIG="_website-config-docs-lab.json"
else
echo >&2 "ERROR: unknown branch ${{ github.ref }}"
exit 1
fi
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
*.cache-to=type=gha,scope=publish,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
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
-
name: Update S3 config
uses: docker/bake-action@v2
with:
targets: aws-s3-update-config
set: |
*.cache-from=type=gha,scope=releaser
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
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_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
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 }}
Loading

0 comments on commit ff9a439

Please sign in to comment.