diff --git a/.github/workflows/linkcheck.yaml b/.github/workflows/linkcheck.yaml index 35537c76c..99cd21591 100644 --- a/.github/workflows/linkcheck.yaml +++ b/.github/workflows/linkcheck.yaml @@ -1,33 +1,60 @@ -name: Links +name: Link checks on: + workflow_dispatch: schedule: - cron: "00 18 1 * *" + pull_request: -# Uncomment the following line while testing links in a single PR. Recomment when -# done. Be sure to comment out the 'Create Issue from File' section while testing. -# pull_request +permissions: {} + +env: + # Single definition to simplify any future changes to the linkcheck configuration. + LYCHEE_ARGS: --accept '100..=103,200..=299,401,403,429,999' --verbose --no-progress . jobs: - linkChecker: + linkchecker-pr: + if: ${{ github.event_name == 'pull_request' }} + name: PR - Link Checker runs-on: ubuntu-latest permissions: - issues: write # required for peter-evans/create-issue-from-file + contents: read steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Link Checker - id: lychee uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 with: - args: --accept '100..=103,200..=299,401,403,429,999' --verbose --no-progress . + args: ${{ env.LYCHEE_ARGS }} fail: false jobSummary: true -# If testing links on pull_request, comment these lines out! + linkchecker-scheduled: + if: ${{ github.event_name != 'pull_request' }} + name: Monthly Link Checker + runs-on: ubuntu-latest + permissions: + contents: read + # required for peter-evans/create-issue-from-file + issues: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 + with: + args: ${{ env.LYCHEE_ARGS }} + # Do not fail scheduled runs; report by issue when links are broken. + fail: false + jobSummary: true - name: Create Issue From File - if: steps.lychee.outputs.exit_code != 0 + if: ${{ steps.lychee.outputs.exit_code != 0 }} uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0 with: title: Link Checker Report diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 000000000..f90cee1c4 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,5 @@ +# Ignore certain landing pages for link checking, these may change redirects to internally +https://console.treasuredata.com/users/sign_in +https://app.datadoghq.com/logs/activation +# Ignore the redirects for Github logins when creating custom issues +^https:\/\/github\.com\/fluent\/fluent-bit\/issues\/new\?.* diff --git a/administration/transport-security.md b/administration/transport-security.md index ea138bf73..9d4cccd35 100644 --- a/administration/transport-security.md +++ b/administration/transport-security.md @@ -35,7 +35,7 @@ Both input and output plugins that perform Network I/O can optionally enable TLS {% hint style="info" %} -When the connection target is an IP address (IPv4 or IPv6), Fluent Bit doesn't include the TLS Server Name Indication (SNI) extension, which is consistent with [RFC 6066](https://www.rfc-editor.org/rfc/rfc6066). Certificate validation still applies against the IP address. If the server requires SNI or uses a hostname-based certificate, use a hostname as the connection target and set `tls.vhost` if needed. +When the connection target is an IP address (IPv4 or IPv6), Fluent Bit doesn't include the TLS Server Name Indication (SNI) extension, which is consistent with [RFC 6066](https://www.rfc-editor.org/info/rfc6066/). Certificate validation still applies against the IP address. If the server requires SNI or uses a hostname-based certificate, use a hostname as the connection target and set `tls.vhost` if needed. {% endhint %} diff --git a/installation/downloads/source.md b/installation/downloads/source.md index 225e24bba..d50a132cf 100644 --- a/installation/downloads/source.md +++ b/installation/downloads/source.md @@ -11,7 +11,7 @@ https://github.com/fluent/fluent-bit/archive/refs/tags/v<release version>. https://github.com/fluent/fluent-bit/archive/refs/tags/v<release version>.zip ``` -For example, for version 1.8.12 the link is: [https://github.com/fluent/fluent-bit/archive/refs/tags/v1.8.12.tar.gz](https://github.com/fluent/fluent-bit/archive/refs/tags/v1.8.12.tar.gz) +For example, for version 1.8.12 the link is: [https://github.com/fluent/fluent-bit/archive/refs/tags/v1.8.12.tar.gz](https://codeload.github.com/fluent/fluent-bit/tar.gz/refs/tags/v1.8.12) ## Development diff --git a/pipeline/outputs/dynatrace.md b/pipeline/outputs/dynatrace.md index 550d16d92..37dcaa8a2 100644 --- a/pipeline/outputs/dynatrace.md +++ b/pipeline/outputs/dynatrace.md @@ -83,7 +83,7 @@ pipeline: -- [Dynatrace Fluent Bit documentation](https://docs.dynatrace.com/docs/shortlink/lma-stream-logs-with-fluent-bit) +- [Dynatrace Fluent Bit documentation](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-ingestion/lma-stream-logs-with-fluent-bit) - [Fluent Bit integration in Dynatrace Hub](https://www.dynatrace.com/hub/detail/fluent-bit/?filter=log-management-and-analytics) - [Video: Stream a Log File to Dynatrace using Fluent Bit](https://www.youtube.com/watch?v=JJJNxhtJ6R0) - [Blog: Easily stream logs from Fluent Bit to Dynatrace](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-ingestion/lma-stream-logs-with-fluent-bit) diff --git a/pipeline/outputs/kinesis.md b/pipeline/outputs/kinesis.md index 29488f187..05a29dad2 100644 --- a/pipeline/outputs/kinesis.md +++ b/pipeline/outputs/kinesis.md @@ -132,7 +132,7 @@ You can use the Fluent Bit SSM Public Parameters to find the Amazon ECR image UR aws ssm get-parameters-by-path --path /aws/service/aws-for-fluent-bit/ ``` -For more details, see the [Amazon ECR Public official doc](https://docs.aws.amazon.com/AmazonECR/latest/public/get-set-up-for-amazon-ecr.html). +For more details, see the [Amazon ECR Public official doc](https://docs.aws.amazon.com/AmazonECR/latest/public/what-is-ecr.html). ### Docker Hub diff --git a/pipeline/outputs/s3.md b/pipeline/outputs/s3.md index 00ca8d4eb..6c0e6b2ae 100644 --- a/pipeline/outputs/s3.md +++ b/pipeline/outputs/s3.md @@ -713,7 +713,7 @@ If you see errors for image pull limits, try signing in to public ECR with your aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws ``` -See the [Amazon ECR Public official documentation](https://docs.aws.amazon.com/AmazonECR/latest/public/get-set-up-for-amazon-ecr.html) for more details. +See the [Amazon ECR Public official documentation](https://docs.aws.amazon.com/AmazonECR/latest/public/what-is-ecr.html) for more details. ### Docker Hub diff --git a/scripts/run-link-checker.sh b/scripts/run-link-checker.sh new file mode 100755 index 000000000..72bc3c2d1 --- /dev/null +++ b/scripts/run-link-checker.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -euo pipefail + +# This script is used to run the Lychee link checker in the same way that CI does in the GitHub Actions workflow. + +SOURCE=${BASH_SOURCE[0]} +while [ -L "$SOURCE" ]; do + SCRIPT_DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) + SOURCE=$(readlink "$SOURCE") + [[ $SOURCE != /* ]] && SOURCE=$SCRIPT_DIR/$SOURCE +done +SCRIPT_DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) +REPO_DIR=${REPO_DIR:-$SCRIPT_DIR/..} + +CONTAINER_IMAGE=${CONTAINER_IMAGE:-"ghcr.io/lycheeverse/lychee:latest"} +CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-docker} + +# Always pull the latest Lychee image to ensure we are validating against the most recent version. +if ! $CONTAINER_RUNTIME pull "$CONTAINER_IMAGE" &>/dev/null; then + echo "ERROR: Failed to pull container image $CONTAINER_IMAGE" >&2 + exit 1 +fi + +# Matches the values in the GitHub Actions workflow for consistency. +LYCHEE_ARGS=${LYCHEE_ARGS:-"--accept '100..=103,200..=299,401,403,429,999' --verbose --no-progress ."} + +# Run the Lychee link checker in a container with the same arguments as the GitHub Actions workflow. +# Note we do want arguments to be expanded here, so we don't quote $LYCHEE_ARGS. +# shellcheck disable=SC2086 +"$CONTAINER_RUNTIME" run --init -it -v "$REPO_DIR":/input:ro -e GITHUB_TOKEN="${GITHUB_TOKEN:-}" "$CONTAINER_IMAGE" $LYCHEE_ARGS diff --git a/stream-processing/tutorial.md b/stream-processing/tutorial.md index 9358e6a5b..c13bda870 100644 --- a/stream-processing/tutorial.md +++ b/stream-processing/tutorial.md @@ -7,7 +7,7 @@ Follow this tutorial to learn more about stream processing. This tutorial requires the following components: * Fluent Bit -* [Docker Engine](https://www.docker.com/products/docker-engine) +* [Docker Engine](https://docs.docker.com/engine/) and the `docker` CLI * A stream processing [sample file](https://raw.githubusercontent.com/fluent/fluent-bit-docs/37b477786d6e28eb223e08611c26ec93671a34ac/stream-processing/samples/sp-samples-1k.log) ## Steps