Skip to content

Commit

Permalink
Merge pull request #1189 from cert-manager/master
Browse files Browse the repository at this point in the history
[release-next] Fast-forward to master
  • Loading branch information
jetstack-bot authored Feb 21, 2023
2 parents b1ea140 + c215247 commit 0b5d7e2
Show file tree
Hide file tree
Showing 424 changed files with 15,949 additions and 97,073 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Check the content and lint the code
name: check
on:
push:
branches: [master]
pull_request:
jobs:
pull-cert-manager-website-verify:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run check
108 changes: 6 additions & 102 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ajvn
illrill
davidsbond
fvlaicu
facto
4molybdenum2
jetstack-bot
codegen
Expand Down Expand Up @@ -71,6 +72,10 @@ AzureDNS
BKPR
Bazel
Bitnami
BundleSource
BundleTarget
BundleCondition
NamespaceSelector
CAs
CNAME
CNAMEs
Expand All @@ -85,6 +90,7 @@ CSR
CSRs
CVE
CVEs
Certbot
CertificateRequest
CertificateRequestPolicy
CertificateRequestPolicies
Expand Down Expand Up @@ -565,105 +571,3 @@ md#renew
# correct spelling. The spelling "x509" and "X509" are incorrect.

X.509

# Since the Markdown files in content/*-docs are copied over from the
# cert-manager repository using fixed tags, we can't expect these files to
# contain the right X.509 spelling. The following is a series of exceptions
# so that the x509 spelling is accepted in those files.

- content/v0.12-docs/concepts/certificate.md
x509
- content/v0.12-docs/concepts/certificaterequest.md
x509
- content/v0.12-docs/release-notes/release-notes-0.5.md
x509
- content/v0.12-docs/release-notes/release-notes-0.6.md
x509
- content/v0.12-docs/release-notes/release-notes-0.7.md
x509
- content/v0.12-docs/release-notes/release-notes-0.9.md
x509
- content/v0.12-docs/tutorials/venafi/venafi.md
x509
- content/v0.12-docs/usage/certificate.md
x509
- content/v0.13-docs/concepts/certificate.md
x509
- content/v0.13-docs/concepts/certificaterequest.md
x509
- content/v0.13-docs/release-notes/release-notes-0.13.md
x509
- content/v0.13-docs/release-notes/release-notes-0.5.md
x509
- content/v0.13-docs/release-notes/release-notes-0.6.md
x509
- content/v0.13-docs/release-notes/release-notes-0.7.md
x509
- content/v0.13-docs/release-notes/release-notes-0.9.md
x509
- content/v0.13-docs/tutorials/venafi/venafi.md
x509
- content/v0.13-docs/usage/certificate.md
x509
- content/v0.14-docs/concepts/certificate.md
x509
- content/v0.14-docs/concepts/certificaterequest.md
x509
- content/v0.14-docs/release-notes/release-notes-0.13.md
x509
- content/v0.14-docs/release-notes/release-notes-0.5.md
x509
- content/v0.14-docs/release-notes/release-notes-0.6.md
x509
- content/v0.14-docs/release-notes/release-notes-0.7.md
x509
- content/v0.14-docs/release-notes/release-notes-0.9.md
x509
- content/v0.14-docs/tutorials/venafi/venafi.md
x509
- content/v0.14-docs/usage/certificate.md
x509
- content/v0.15-docs/concepts/certificate.md
x509
- content/v0.15-docs/concepts/certificaterequest.md
x509
- content/v0.15-docs/release-notes/release-notes-0.13.md
x509
- content/v0.15-docs/release-notes/release-notes-0.15.md
x509
- content/v0.15-docs/release-notes/release-notes-0.5.md
x509
- content/v0.15-docs/release-notes/release-notes-0.6.md
x509
- content/v0.15-docs/release-notes/release-notes-0.7.md
x509
- content/v0.15-docs/release-notes/release-notes-0.9.md
x509
- content/v0.15-docs/tutorials/venafi/venafi.md
x509
- content/v0.15-docs/usage/certificate.md
x509
- content/v0.16-docs/concepts/certificate.md
x509
- content/v0.16-docs/concepts/certificaterequest.md
x509
- content/v0.16-docs/release-notes/release-notes-0.13.md
x509
- content/v0.16-docs/release-notes/release-notes-0.15.md
x509
- content/v0.16-docs/release-notes/release-notes-0.16.md
x509
- content/v0.16-docs/release-notes/release-notes-0.5.md
x509
- content/v0.16-docs/release-notes/release-notes-0.6.md
x509
- content/v0.16-docs/release-notes/release-notes-0.7.md
x509
- content/v0.16-docs/release-notes/release-notes-0.9.md
x509
- content/v0.16-docs/tutorials/venafi/venafi.md
x509
- content/v0.16-docs/usage/certificate.md
x509
- content/v0.16-docs/usage/kubectl-plugin.md
x509
80 changes: 43 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ and should be installable via Homebrew on macOS.

## Website Development Guides

### Which branch should I use?

There are two relevant branches used for website development: `master` and `release-next`.

Changes to `master` will be reflected on the live website shortly after they're merged. If your change is relevant
to any version of cert-manager which has already been released, your change likely needs to be made against master.

`release-next` is used for features which haven't been released in a stable version of cert-manager yet. Changes
will be reflected on a preview deployment for the release-next branch which is linked to from the main site.

### Where's the documentation content?

First, docs go under `content/`; you shouldn't normally need to change files outside of `content/` when
Expand All @@ -37,7 +47,7 @@ There are several folders in `content/` and which one you need depends on what y
- Something which applies to the current version of cert-manager? <br />
Add it to `docs/` and possibly to the specific version of cert-manager that's latest (e.g. `v1.8-docs/`)
- Something which only applies to the next major version of cert-manager? <br />
Add it to `docs/` but branch from the [`release-next` branch](https://github.com/cert-manager/website/tree/release-next) and merge the PR into that branch.
Add it to `docs/` but branch from the [`release-next` branch](https://github.com/cert-manager/website/tree/release-next) and merge the PR into that branch. See above.
- Something which isn't "versioned", e.g. a page under "contributing", release notes or our supported-releases page? <br />
Add it to `docs/`, which is the only place such pages should appear
- Something which applies only to versions of cert-manager which have already been released? <br />
Expand Down Expand Up @@ -96,86 +106,82 @@ Use `{/* my comment */}` rather than the HTML-style comments you'd normally use

## Website Development Tooling

### Development Server

#### Ideal development environment: Netlify CLI

The best development environment uses the Netlify CLI to serve the site locally. The Netlify CLI server much more
closely matches the environment in which the website is deployed, and will enable local debugging of redirects and
environment variables.

To run this server, install the [Netlify CLI](https://docs.netlify.com/cli/get-started/).

This server supports hot-reloading, but note that hot-reloading of the `public/_redirects` file is only enabled
if you also install `entr`, which is available in Linux package managers and in Homebrew.
First [install nodejs (and package manager called `npm`)](https://nodejs.org/en/).
Then install all the tools and packages required to build the website as follows:

```bash
./scripts/server-netlify
npm ci
```

This script will run `npm install` and then start a development server at `http://localhost:8888`.
This command is similar to `npm install` but it ensures that you will have a clean install of all the dependencies.

Note that the server will also be accessible locally at port 3000, but that on this port there'll be no
support for debugging redirects or environment variables. Use port 8888.
### Development Server

#### Simpler development environment
The best development environment uses the Netlify CLI to serve the site locally. The Netlify CLI server
closely matches the environment in which the website is deployed, and will enable local debugging of redirects and
environment variables.

The Netlify environment above should be preferred.
To run this server, install the [Netlify CLI](https://docs.netlify.com/cli/get-started/) as follows:

If you don't want to install any other tools though, you can run the local development server on its own
with no support for debugging redirects or environment variables.
```bash
npm install -g netlify-cli
```

To run the simpler, less-powerful server, run:
Then run the server:

```bash
./scripts/server
```

This script will run `npm install` and then start a development server at `http://localhost:3000`.
Note that the server will also be accessible locally at port 3000, but that on this port there'll be no
support for debugging redirects or environment variables. Use port 8888.

Initial builds of a page on the development server can be quite slow - a few seconds - but
after the initial build changes should be picked up quickly and the development server
should be snappy to use.

### Running Verification Scripts

After you have made changes to the website, you should run the `verify` scripts
to ensure things like spelling and links are valid.

After you have made changes to the website, you should run the `verify` script
to ensure things like spelling are valid.
To run all verification checks:

```bash
./scripts/verify
```

This will automatically run a number of checks against your local environment.
This will automatically run a number of checks against your local environment, including:

* Lint checks on the nextjs code using [next lint](https://nextjs.org/docs/basic-features/eslint).
* Link checks on all pages using [markdown-link-check](https://github.com/tcort/markdown-link-check).
* Spelling in all pages using [mdspell](https://github.com/lukeapage/node-markdown-spellcheck).
* Formatting of the markdown in all pages using [remark](https://github.com/remarkjs/remark).

If you want to be thorough, you can run `./scripts/verify-release` to also regenerate API / CLI docs
before verification, but that check is slower and unlikely to provide any useful insight.
> ℹ️ All these checks are also run automatically for pull requests.
> The results will be reported in the [checks summary](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks) at the bottom of your GitHub PR.
> Read the [cert-manager-website-presubmits.yaml prow configuration file](https://github.com/jetstack/testing/blob/master/config/jobs/cert-manager/website/cert-manager-website-presubmits.yaml) and the [check.yaml workflow file](.github/workflows/check.yaml) for more details.
### Building for a Release

On release, all output is placed into the `out/` directory.

Building a full release includes re-running API + CLI doc generation for the latest
version of cert-manager, and then running a next.js `build` followed by `export`. The full
release process can be run through one script:
The full release process can be run through one script:

```bash
./scripts/build-release
```

If you want to test that the build still works locally, you can run `./scripts/build` to build while
skipping regeneration of API / CLI docs.

### API / CLI Documentation Generation

To generate API / CLI reference docs manually, run:
To update the [API documentation](https://cert-manager.io/docs/reference/api-docs/) and [CLI documentation](https://cert-manager.io/docs/cli/), run:

```bash
./scripts/gendocs/generate
```

This should be done before every cert-manager release (if the API or CLI flags have changed)
and any time the API or CLI of the [satellite projects](https://cert-manager.io/docs/projects/) changes,
and the changes should be committed.

Since there are many old versions of cert-manager, none of which change regularly (or at all),
the website build process does not re-generate documentation for older versions, on the assumption
that doing so would be a waste of effort.
Expand Down
20 changes: 10 additions & 10 deletions components/Button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ export default function Button({
})

return (
<Link href={href}>
<a
target={target || '_self'}
className={`font-montserrat font-bold uppercase text-sm leading-20px btn-primary rounded-5px ${styles} ${className}`}
>
<span className={"block " + iconWClass}>{icon && <Icon name={icon} />}</span>
<span>{caption}</span>
</a>
</Link>
)
(<Link
href={href}
target={target || '_self'}
className={`font-montserrat font-bold uppercase text-sm leading-20px btn-primary rounded-5px ${styles} ${className}`}>

<span className={"block " + iconWClass}>{icon && <Icon name={icon} />}</span>
<span>{caption}</span>

</Link>)
);
}
11 changes: 7 additions & 4 deletions components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ export default function Footer() {
<p>
For a list of trademarks of The Linux Foundation, please see our
&nbsp;
<Link href="https://www.linuxfoundation.org/trademark-usage/">
<a target="_blank" className="no-underline">
<Link
href="https://www.linuxfoundation.org/trademark-usage/"
target="_blank"
className="no-underline">

Trademark Usage page.
</a>

</Link>
</p>
</div>
</div>
</footer>
)
);
}
Loading

0 comments on commit 0b5d7e2

Please sign in to comment.