Browse Source

fix: adds releases to stability and support. Adds a check on workflow to force us to add docs to stability and support (#4776)

Signed-off-by: Gustavo Carvalho <gustavo@externalsecrets.com>
Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Gustavo Fernandes de Carvalho 1 year ago
parent
commit
9fab8ce725
4 changed files with 35 additions and 1 deletions
  1. 19 0
      .github/workflows/release.yml
  2. 4 0
      Makefile
  3. 3 1
      docs/introduction/stability-support.md
  4. 9 0
      hack/api-docs/Makefile

+ 19 - 0
.github/workflows/release.yml

@@ -19,6 +19,25 @@ permissions:
   contents: read
 
 jobs:
+  check-docs-for-release:
+    name: Check Docs for release
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    steps:
+      - name: Harden the runner (Audit all outbound calls)
+        uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
+        with:
+          egress-policy: audit
+
+      - name: Checkout
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+        with:
+          fetch-depth: 0
+          ref: ${{ github.event.inputs.source_ref }}
+      - name: check-docs
+        run: |
+          DOCS_VERSION=${{ github.event.inputs.version }} make docs.check 
   release:
     name: Create Release
     runs-on: ubuntu-latest

+ 4 - 0
Makefile

@@ -233,6 +233,10 @@ docs.publish: generate ## Generate and deploys docs
 docs.serve: ## Serve docs
 	$(MAKE) -C ./hack/api-docs serve
 
+DOCS_VERSION ?= $(VERSION)
+.PHONY: docs.check
+docs.check: ## Check docs
+	$(MAKE) -C ./hack/api-docs check DOCS_VERSION=$(DOCS_VERSION)
 # ====================================================================================
 # Build Artifacts
 

+ 3 - 1
docs/introduction/stability-support.md

@@ -18,7 +18,9 @@ As of version 0.14.x , this is the only kubernetes version that we will guarante
 
 | ESO Version | Kubernetes Version | Release Date | End of Life     |
 | ----------- | ------------------ | ------------ | --------------- |
-| 0.14.x      | 1.32               | Feb 4, 2025  | Release of 0.14 |
+| 0.16.x      | 1.32               | Apr 14, 2025  | Release of 0.17 |
+| 0.15.x      | 1.32               | Mar 19, 2025  | Apr 14, 2025    |
+| 0.14.x      | 1.32               | Feb 4, 2025  | Mar 19, 2025    |
 | 0.13.x      | 1.19 → 1.31        | Jan 21, 2025 | Feb 4, 2025     |
 | 0.12.x      | 1.19 → 1.31        | Dec 24, 2024 | Jan 21, 2025    |
 | 0.11.x      | 1.19 → 1.31        | Dec 2, 2024  | Dec 24, 2024    |

+ 9 - 0
hack/api-docs/Makefile

@@ -17,6 +17,10 @@ MKDOCS_IMAGE ?= github.com/external-secrets-mkdocs:latest
 MKDOCS ?= mkdocs
 MIKE ?= mike
 DOCS_VERSION ?= main
+VERSION_NO_V ?= $(shell echo $(DOCS_VERSION) | cut -d'v' -f2)
+MAJOR_VERSION ?= $(shell echo $(VERSION_NO_V) | cut -d'.' -f1)
+MINOR_VERSION ?= $(shell echo $(VERSION_NO_V) | cut -d'.' -f2)
+VERSION_TO_CHECK ?= $(shell echo $(MAJOR_VERSION).$(MINOR_VERSION))
 DOCS_ALIAS ?= unstable
 SERVE_BIND_ADDRESS ?= 127.0.0.1
 
@@ -44,6 +48,11 @@ all: build
 image:
 	$(DOCKER) build -t $(MKDOCS_IMAGE) -f Dockerfile .
 
+.PHONY: check
+check:
+	@echo "Checking for version: $(VERSION_TO_CHECK)"
+	cat $(ROOT)/docs/introduction/stability-support.md | grep "$(VERSION_TO_CHECK)"
+
 .PHONY: build
 build: image generate $(SOURCES)
 	mkdir -p $(GENROOT)