Skip to content

Commit

Permalink
chore: Updating GK -> opa versions (#3537)
Browse files Browse the repository at this point in the history
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
  • Loading branch information
JaydipGabani authored Sep 19, 2024
1 parent 6b08713 commit 8d1d7b3
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 36 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/patch-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ jobs:
git checkout master
- name: Create patch version docs
run: make patch-version-docs NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x TAG=v${TAG} OLDVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.$((PATCH_VERSION-1))
run: |
tags=$(git tag -l --sort=-v:refname)
versions=''
for tag in $tags; do
if echo "$tag" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
opa=$(curl https://raw.githubusercontent.com/open-policy-agent/gatekeeper/$tag/go.mod | grep /opa | awk '{print $2}')
if [ $opa ]; then
versions+="| \`$tag\` | \`$opa\` |\n"
fi
fi
done
make patch-version-docs NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x TAG=v${TAG} OLDVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.$((PATCH_VERSION-1)) OPA_VERSIONS="${versions}"
- name: Create release pull request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,18 @@ jobs:
- run: make release-manifest promote-staging-manifest

- if: github.event_name == 'push'
run: make version-docs NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x TAG=v${TAG}
run: |
tags=$(git tag -l --sort=-v:refname)
versions=''
for tag in $tags; do
if echo "$tag" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
opa=$(curl https://raw.githubusercontent.com/open-policy-agent/gatekeeper/$tag/go.mod | grep /opa | awk '{print $2}')
if [ $opa ]; then
versions+="| \`$tag\` | \`$opa\` |\n"
fi
fi
done
make version-docs NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x TAG=v${TAG} OPA_VERSIONS="${versions}"
- name: Create release pull request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ release-manifest:
# Tags a new version for docs
.PHONY: version-docs
version-docs:
@sed -i '10,$$c ${OPA_VERSIONS}' ./website/docs/opa-versions.md
docker run \
-v $(shell pwd)/website:/website \
-w /website \
Expand All @@ -500,6 +501,8 @@ version-docs:
.PHONY: patch-version-docs
patch-version-docs:
@sed -i 's/https:\/\/raw\.githubusercontent\.com\/open-policy-agent\/gatekeeper\/${OLDVERSION}\/deploy\/gatekeeper\.yaml.*/https:\/\/raw\.githubusercontent\.com\/open-policy-agent\/gatekeeper\/${TAG}\/deploy\/gatekeeper\.yaml/' ./website/versioned_docs/version-${NEWVERSION}/install.md
@sed -i '10,$$c ${OPA_VERSIONS}' ./website/docs/opa-versions.md
@sed -i '10,$$c ${OPA_VERSIONS}' ./website/versioned_docs/version-${NEWVERSION}/opa-versions.md

promote-staging-manifest:
@rm -rf deploy
Expand Down
51 changes: 34 additions & 17 deletions website/docs/opa-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,45 @@ Gatekeeper depends on [Open Policy Agent](https://www.openpolicyagent.org/). To

| Gatekeeper Version | OPA Version |
| ------------------ | ----------- |
| `v3.17.1` | `v0.67.0` |
| `v3.17.0` | `v0.67.0` |
| `v3.16.3` | `v0.64.1` |
| `v3.16.2` | `v0.63.0` |
| `v3.16.0` | `v0.63.0` |
| `v3.15.1` | `v0.60.0` |
| `v3.15.0` | `v0.60.0` |
| `v3.14.2` | `v0.57.1` |
| `v3.14.1` | `v0.57.1` |
| `v3.14.0` | `v0.57.1` |
| `v3.13.4` | `v0.54.0` |
| `v3.13.3` | `v0.54.0` |
| `v3.13.2` | `v0.54.0` |
| `v3.13.1` | `v0.54.0` |
| `v3.13.0` | `v0.54.0` |
| `v3.12.0` | `v0.49.2` |
| `v3.11.1` | `v0.47.2` |
| `v3.11.0` | `v0.47.2` |
| `v3.10.0` | `v0.44.0` |
| `v3.9.2` | `v0.44.0` |
| `v3.9.1` | `v0.44.0` |
| `v3.9.0` | `v0.41.0` |
| `v3.8.1` | `v0.39.0` |
| `v3.8.0` | `v0.39.0` |
| `v3.7.2` | `v0.29.4` |
| `v3.7.1` | `v0.29.4` |
| `v3.7.0` | `v0.29.4` |
| `v3.6.0` | `v0.24.0` |
| `v3.5.2` | `v0.24.0` |
| `v3.5.1` | `v0.24.0` |
| `v3.5.0` | `v0.24.0` |
| `v3.4.1` | `v0.24.0` |
| `v3.4.0` | `v0.24.0` |
| `v3.3.0` | `v0.24.0` |
| `v3.2.0` | `v0.19.1` |
| `v3.1.0` | `v0.19.1` |
| `v3.9.2` | `v0.44.0` |
| `v3.9.1` | `v0.44.0` |
| `v3.9.0` | `v0.41.0` |
| `v3.8.1` | `v0.39.0` |
| `v3.8.0` | `v0.39.0` |
| `v3.7.2` | `v0.29.4` |
| `v3.7.1` | `v0.29.4` |
| `v3.7.0` | `v0.29.4` |
| `v3.6.0` | `v0.29.4` |
| `v3.5.2` | `v0.24.0` |
| `v3.5.1` | `v0.24.0` |
| `v3.5.0` | `v0.24.0` |
| `v3.4.1` | `v0.24.0` |
| `v3.4.0` | `v0.24.0` |
| `v3.3.0` | `v0.24.0` |
| `v3.2.3` | `v0.21.0` |
| `v3.2.2` | `v0.21.0` |
| `v3.2.1` | `v0.21.0` |
| `v3.2.0` | `v0.21.0` |
| `v3.1.3` | `v0.21.0` |
| `v3.1.2` | `v0.21.0` |
| `v3.1.1` | `v0.21.0` |
| `v3.1.0` | `v0.21.0` |
3 changes: 3 additions & 0 deletions website/versioned_docs/version-v3.16.x/opa-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Gatekeeper depends on [Open Policy Agent](https://www.openpolicyagent.org/). To

| Gatekeeper Version | OPA Version |
| ------------------ | ----------- |
| `v3.16.3` | `v0.64.1` |
| `v3.16.2` | `v0.63.0` |
| `v3.16.0` | `v0.60.0` |
| `v3.15.1` | `v0.60.0` |
| `v3.15.0` | `v0.60.0` |
| `v3.14.0` | `v0.57.1` |
Expand Down
51 changes: 34 additions & 17 deletions website/versioned_docs/version-v3.17.x/opa-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,45 @@ Gatekeeper depends on [Open Policy Agent](https://www.openpolicyagent.org/). To

| Gatekeeper Version | OPA Version |
| ------------------ | ----------- |
| `v3.17.1` | `v0.67.0` |
| `v3.17.0` | `v0.67.0` |
| `v3.16.3` | `v0.64.1` |
| `v3.16.2` | `v0.63.0` |
| `v3.16.0` | `v0.63.0` |
| `v3.15.1` | `v0.60.0` |
| `v3.15.0` | `v0.60.0` |
| `v3.14.2` | `v0.57.1` |
| `v3.14.1` | `v0.57.1` |
| `v3.14.0` | `v0.57.1` |
| `v3.13.4` | `v0.54.0` |
| `v3.13.3` | `v0.54.0` |
| `v3.13.2` | `v0.54.0` |
| `v3.13.1` | `v0.54.0` |
| `v3.13.0` | `v0.54.0` |
| `v3.12.0` | `v0.49.2` |
| `v3.11.1` | `v0.47.2` |
| `v3.11.0` | `v0.47.2` |
| `v3.10.0` | `v0.44.0` |
| `v3.9.2` | `v0.44.0` |
| `v3.9.1` | `v0.44.0` |
| `v3.9.0` | `v0.41.0` |
| `v3.8.1` | `v0.39.0` |
| `v3.8.0` | `v0.39.0` |
| `v3.7.2` | `v0.29.4` |
| `v3.7.1` | `v0.29.4` |
| `v3.7.0` | `v0.29.4` |
| `v3.6.0` | `v0.24.0` |
| `v3.5.2` | `v0.24.0` |
| `v3.5.1` | `v0.24.0` |
| `v3.5.0` | `v0.24.0` |
| `v3.4.1` | `v0.24.0` |
| `v3.4.0` | `v0.24.0` |
| `v3.3.0` | `v0.24.0` |
| `v3.2.0` | `v0.19.1` |
| `v3.1.0` | `v0.19.1` |
| `v3.9.2` | `v0.44.0` |
| `v3.9.1` | `v0.44.0` |
| `v3.9.0` | `v0.41.0` |
| `v3.8.1` | `v0.39.0` |
| `v3.8.0` | `v0.39.0` |
| `v3.7.2` | `v0.29.4` |
| `v3.7.1` | `v0.29.4` |
| `v3.7.0` | `v0.29.4` |
| `v3.6.0` | `v0.29.4` |
| `v3.5.2` | `v0.24.0` |
| `v3.5.1` | `v0.24.0` |
| `v3.5.0` | `v0.24.0` |
| `v3.4.1` | `v0.24.0` |
| `v3.4.0` | `v0.24.0` |
| `v3.3.0` | `v0.24.0` |
| `v3.2.3` | `v0.21.0` |
| `v3.2.2` | `v0.21.0` |
| `v3.2.1` | `v0.21.0` |
| `v3.2.0` | `v0.21.0` |
| `v3.1.3` | `v0.21.0` |
| `v3.1.2` | `v0.21.0` |
| `v3.1.1` | `v0.21.0` |
| `v3.1.0` | `v0.21.0` |

0 comments on commit 8d1d7b3

Please sign in to comment.