Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kflynn authored Jan 27, 2025
2 parents 0f5ce06 + 7314c97 commit d09b038
Show file tree
Hide file tree
Showing 2,904 changed files with 83,906 additions and 83,975 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkerd-website",
"image": "ghcr.io/linkerd/dev:v30",
"image": "ghcr.io/linkerd/dev:v44",
"onCreateCommand": ".devcontainer/on-create.sh",
"extensions": [
"DavidAnson.vscode-markdownlint",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/on-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
cd $(mktemp -d)

# hugo
scurl -O https://github.com/gohugoio/hugo/releases/download/v0.121.2/hugo_extended_0.121.2_linux-amd64.deb
scurl -O https://github.com/gohugoio/hugo/releases/download/v0.136.5/hugo_extended_0.136.5_linux-amd64.deb
sudo dpkg -i hugo*.deb
rm hugo*.deb

Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@ name: install
on:
pull_request:
paths:
- .github/workflows/install.yml
- Makefile
- run.linkerd.io/public/install*

jobs:
lint:
name: Lint install script
runs-on: ubuntu-latest
container:
image: ghcr.io/linkerd/dev:v39
options: --user root
steps:
- uses: linkerd/dev/actions/setup-tools@v45
- name: Checkout code
uses: actions/checkout@v4

- name: On create
run: |
.devcontainer/on-create.sh
- name: Lint install script
run: |
make shellcheck
Expand All @@ -36,7 +31,7 @@ jobs:
run: |
make build-run.linkerd.io
- uses: actions/upload-artifact@v4.3.3
- uses: actions/upload-artifact@v4.6.0
with:
name: run.linkerd.io
path: tmp/run.linkerd.io/public
Expand All @@ -50,7 +45,7 @@ jobs:
needs: [build]

steps:
- uses: actions/[email protected].7
- uses: actions/[email protected].8
with:
name: run.linkerd.io

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
container:
image: ghcr.io/linkerd/dev:v39
options: --user root
steps:
- uses: linkerd/dev/actions/setup-tools@v45
- name: Checkout code
uses: actions/checkout@v4

Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@ name: validate
on:
pull_request:
paths:
- .github/workflows/validate.yml
- linkerd.io/**

jobs:
linkerd_io:
name: Validate generated HTML
runs-on: ubuntu-latest
container:
image: ghcr.io/linkerd/dev:v39
options: --user root
steps:
- uses: linkerd/dev/actions/setup-tools@v45
- name: Checkout code
uses: actions/checkout@v4

- name: On create
run: |
.devcontainer/on-create.sh
run: .devcontainer/on-create.sh

- name: Lint markdown
run: |
Expand Down
13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ shellcheck:
@# lint the install scripts
shellcheck run.linkerd.io/public/install* \
api.linkerd.io/build \
linkerd.io/build \
linkerd.io/release-next-version
linkerd.io/build

.PHONY: test-ci
test-ci:
Expand All @@ -112,7 +111,7 @@ serve-api.linkerd.io: build-api.linkerd.io
&& python3 -m http.server 9999

.PHONY: build-linkerd.io
build-linkerd.io: build-release-matrix get-versions tmp/linkerd.io
build-linkerd.io: get-versions tmp/linkerd.io
@# Build linkerd.io
ifndef HAS_HUGO
@printf "Install hugo first. For OSX: brew install hugo\n"; exit 1
Expand Down Expand Up @@ -140,14 +139,6 @@ replace-env-%: has-env-% tmp-sites
sed 's/$*/$($*)/g' < $$fname > /tmp/__sed && mv /tmp/__sed $$fname; \
done

.PHONY: build-release-matrix
build-release-matrix:
@# Build release matrix
./bin/generate_release_matrix.py --release_type=stable --format=json > linkerd.io/data/releases/release_matrix.json
./bin/generate_release_matrix.py --release_type=stable --format=yaml > linkerd.io/content/releases/release_matrix.yaml
cp linkerd.io/data/releases/release_matrix.json linkerd.io/content/releases/release_matrix.json


.PHONY: has-env-%
has-env-%:
@if [ ! $${$*:-} ]; then printf "You must define: $*\n" && exit 1; fi
Expand Down
50 changes: 13 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Source code for the linkerd.io website.
```bash
docker run \
--mount type=bind,source="$(pwd)",target=/website --workdir=/website \
ghcr.io/linkerd/dev:v39 sh -c ".devcontainer/on-create.sh && make lint check"
ghcr.io/linkerd/dev:v44 sh -c ".devcontainer/on-create.sh && make lint check"
```

1. Install Hugo 0.119.0 to run the site locally:
1. Install Hugo to run the site locally:

For Mac users:

Expand All @@ -24,37 +24,25 @@ Source code for the linkerd.io website.
For Linux users, download the **extended** release of Hugo from its GitHub
[release page](https://github.com/gohugoio/hugo/releases).

The minimum version of Hugo that is required to build linkerd.io is
**v0.131.0**.

1. From the root `/website` directory, build site and run Hugo in development mode:

```bash
hugo serve -s linkerd.io
hugo server -s linkerd.io
```

You should see the site on localhost:1313, and it should reload
automatically upon file write.

### To change the way the site looks

#### CSS/HTML

Images and static CSS and JavaScript files are located in the `static`
directory. These files are served as-is. Some of the site's CSS, however, is
generated from [Sass](https://sass-lang.com) sources in `assets/scss` by
Hugo. When you change those files, Hugo updates the CSS for the site
automatically and refreshes the page.
The files in layouts/ are the HTML for the site (including layout/index.html
for the front page.) These files are Go templates with a couple extra Hugo
goodies thrown in. See [the hugo
documentation](http://gohugo.io/templates/overview/) for details.
If you're running `hugo server` (see above) then updates should be reflected in
your browser window via some fancy javascript magic.
[Learn more](https://github.com/linkerd/website/blob/main/linkerd.io/README.md/)
about how to add content to linkerd.io.

## [run.linkerd.io](run.linkerd.io)

Install scripts for linkerd as well as demo applications such as
[emojivoto][emojivoto].
[emojivoto](https://github.com/BuoyantIO/emojivoto).

## [versioncheck.linkerd.io](versioncheck.linkerd.io)

Expand All @@ -74,21 +62,13 @@ API docs for linkerd1.
Note: this does not deploy by default as part of `make publish`. It needs to be
released separately.
### Updating docs from Linkerd
See [slate documentation](slate-linkerd) `./build` will grab whatever's on
main from slate-linkerd and add it to the public dir.

### Creating a new release

1. From the [linkerd.io](linkerd.io) directory, run:

```bash
./release-next-version <new version>
```

1. Run `./release-next-version <release-tag> <new version>` in
[slate-linkerd](https://github.com/BuoyantIO/slate-linkerd)
[https://github.com/BuoyantIO/slate-linkerd/blob/master/BUOYANT-README.md](github.com/BuoyantIO/slate-linkerd)

1. Then check locally

Expand All @@ -106,7 +86,6 @@ main from slate-linkerd and add it to the public dir.
may have to [set the SDKROOT](https://github.com/castwide/vscode-solargraph/issues/78#issuecomment-552675511)
in order to install `json 1.8.3` which is a `middleman` dependency.
## Publishing
1. Make sure your gcloud tooling is up to date:
Expand All @@ -130,13 +109,13 @@ main from slate-linkerd and add it to the public dir.
### Notes
- This does not update api.linkerd.io, see the section for that specifically to
* This does not update api.linkerd.io, see the section for that specifically to
update it.
- There is no caching in front of run.linkerd.io and versioncheck.linkerd.io.
* There is no caching in front of run.linkerd.io and versioncheck.linkerd.io.
You should see updates there immediately.
- There is caching for non-html pages in front of linkerd.io. If you're updating
* There is caching for non-html pages in front of linkerd.io. If you're updating
a non-html page for linkerd.io, it might be worth flushing the cache
(cloudflare) and waiting awhile.

Expand Down Expand Up @@ -182,6 +161,3 @@ gsutil -m rsync gs://linkerd2-access-logs logs/
```bash
gsutil cors set versioncheck.linkerd.io.cors.json gs://versioncheck.linkerd.io
```

[emojivoto]: https://github.com/BuoyantIO/emojivoto
[slate-linkerd]: https://github.com/BuoyantIO/slate-linkerd/blob/master/BUOYANT-README.md
2 changes: 1 addition & 1 deletion bin/export-channel-versions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

releases_url="https://api.github.com/repos/linkerd/linkerd2/releases"
releases_url="https://api.github.com/repos/linkerd/linkerd2/releases?per_page=100"

# Match examples: `"tag_name": "stable-2.7.0",`
stable_tag_regex="\"tag_name\": \"stable-[0-9]+\.[0-9]+\.[0-9]+\""
Expand Down
Loading

0 comments on commit d09b038

Please sign in to comment.