diff --git a/README.md b/README.md index d8f6417824..aea5aebcce 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,9 @@ Shipwright supports any tool that can build container images in Kubernetes clust - Install the Shipwright deployment. To install the latest version, run: ```bash - kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.12.0/release.yaml --server-side - curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/v0.12.0/hack/setup-webhook-cert.sh | bash + kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.13.0/release.yaml --server-side + curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/v0.13.0/hack/setup-webhook-cert.sh | bash + curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/main/hack/storage-version-migration.sh | bash ``` To install the latest nightly release, run: @@ -56,12 +57,13 @@ Shipwright supports any tool that can build container images in Kubernetes clust ```bash kubectl apply --filename "https://github.com/shipwright-io/build/releases/download/nightly/nightly-$(curl --silent --location https://github.com/shipwright-io/build/releases/download/nightly/latest.txt).yaml" --server-side curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/main/hack/setup-webhook-cert.sh | bash + curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/main/hack/storage-version-migration.sh | bash ``` - Install the Shipwright strategies. To install the latest version, run: ```bash - kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.12.0/sample-strategies.yaml --server-side + kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.13.0/sample-strategies.yaml --server-side ``` To install the latest nightly release, run: @@ -169,6 +171,7 @@ To find out more on what's the best strategy or what else can Shipwright do for | Version | Docs | Examples | |------------------------------------------------------------------------|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------| | HEAD | [Docs @ HEAD](docs/README.md) | [Examples @ HEAD](samples) | +| [v0.13.0](https://github.com/shipwright-io/build/releases/tag/v0.13.0) | [Docs @ v0.13.0](https://github.com/shipwright-io/build/tree/v0.12.0/docs) | [Examples @ v0.13.0](https://github.com/shipwright-io/build/tree/v0.13.0/samples) | | [v0.12.0](https://github.com/shipwright-io/build/releases/tag/v0.12.0) | [Docs @ v0.12.0](https://github.com/shipwright-io/build/tree/v0.12.0/docs) | [Examples @ v0.12.0](https://github.com/shipwright-io/build/tree/v0.12.0/samples) | | [v0.11.0](https://github.com/shipwright-io/build/releases/tag/v0.11.0) | [Docs @ v0.11.0](https://github.com/shipwright-io/build/tree/v0.11.0/docs) | [Examples @ v0.11.0](https://github.com/shipwright-io/build/tree/v0.11.0/samples) | | [v0.10.0](https://github.com/shipwright-io/build/releases/tag/v0.10.0) | [Docs @ v0.10.0](https://github.com/shipwright-io/build/tree/v0.10.0/docs) | [Examples @ v0.10.0](https://github.com/shipwright-io/build/tree/v0.10.0/samples) | diff --git a/deploy/200-role.yaml b/deploy/200-role.yaml index e605556317..980c260fa0 100644 --- a/deploy/200-role.yaml +++ b/deploy/200-role.yaml @@ -27,7 +27,7 @@ rules: resources: ['buildruns'] # The build-run-deletion annotation sets an owner ref on BuildRun objects. # With the OwnerReferencesPermissionEnforcement admission controller enabled, controllers need the "delete" permission on objects that they set owner references on. - verbs: ['get', 'list', 'watch', 'update', 'delete'] + verbs: ['get', 'list', 'watch', 'update', 'delete', 'patch'] - apiGroups: ['shipwright.io'] # BuildRuns are set as the owners of Tekton TaskRuns. @@ -41,7 +41,7 @@ rules: - apiGroups: ['shipwright.io'] resources: ['builds'] - verbs: ['get', 'list', 'watch'] + verbs: ['get', 'list', 'watch', 'patch'] - apiGroups: ['shipwright.io'] # The build-run-deletion annotation makes Builds an owner of BuildRun objects. @@ -55,11 +55,11 @@ rules: - apiGroups: ['shipwright.io'] resources: ['buildstrategies'] - verbs: ['get', 'list', 'watch'] + verbs: ['get', 'list', 'watch', 'patch'] - apiGroups: ['shipwright.io'] resources: ['clusterbuildstrategies'] - verbs: ['get', 'list', 'watch'] + verbs: ['get', 'list', 'watch', 'patch'] - apiGroups: ['tekton.dev'] resources: ['taskruns'] @@ -82,3 +82,7 @@ rules: - apiGroups: [''] resources: ['serviceaccounts'] verbs: ['get', 'list', 'watch', 'create', 'update', 'delete'] + +- apiGroups: ['apiextensions.k8s.io'] + resources: ['customresourcedefinitions', 'customresourcedefinitions/status'] + verbs: ['get', 'patch'] diff --git a/hack/storage-version-migration.sh b/hack/storage-version-migration.sh new file mode 100755 index 0000000000..09f02e9a91 --- /dev/null +++ b/hack/storage-version-migration.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +# Copyright The Shipwright Contributors +# +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +if ! hash jq >/dev/null 2>&1 ; then + echo "[ERROR] jq is not installed" + exit 1 +fi + +# Delete old job for storage version migration +kubectl -n shipwright-build delete job --selector app=storage-version-migration-shipwright --wait=true + +# create new job for storage version migration +cat <