Skip to content

Commit

Permalink
Merge pull request #131 from clobrano/automate-rh-community-bundle-0
Browse files Browse the repository at this point in the history
Automate Communities bundle creation
  • Loading branch information
clobrano authored Mar 7, 2024
2 parents 53e506d + 0ac0f20 commit 3d570e4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release bundles
on:
workflow_dispatch:
inputs:
version:
description: "The version to release, without the leading `v`"
required: true
type: string
previous_version:
description: "The previous version, used for the CVS's `replaces` field, without the leading `v`"
required: true
type: string
community:
description: "The community to release the bundle to"
required: true
type: choice
default: "K8S"
options:
- K8S
- OKD

jobs:
make_k8s_community_bundle:
if: inputs.community == 'K8S'
uses: medik8s/.github/.github/workflows/release_community_bundle_parametric.yaml@main
secrets: inherit
with:
version: ${{ inputs.version }}
previous_version: ${{ inputs.previous_version }}
community: ${{ inputs.community }}
make_targets: "bundle-community-k8s"
make_okd_community_bundle:
if: inputs.community == 'OKD'
uses: medik8s/.github/.github/workflows/release_community_bundle_parametric.yaml@main
secrets: inherit
with:
version: ${{ inputs.version }}
previous_version: ${{ inputs.previous_version }}
community: ${{ inputs.community }}
make_targets: "bundle-community-rh"
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ OPERATOR_SDK_VERSION ?= v1.32.0
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.28

# OCP Version: for OKD bundle community
OCP_VERSION = 4.12

# IMAGE_REGISTRY used to indicate the registery/group for the operator, bundle and catalog
IMAGE_REGISTRY ?= quay.io/medik8s
export IMAGE_REGISTRY
Expand Down Expand Up @@ -268,6 +271,13 @@ verify-previous-version: ## Verifies that PREVIOUS_VERSION variable is set
bundle-reset-date: ## Reset bundle's createdAt
sed -r -i "s|createdAt: .*|createdAt: \"\"|;" ${BUNDLE_CSV}

.PHONY: bundle-community-k8s
bundle-community-k8s: bundle-community ## Generate bundle manifests and metadata customized to Red Hat community release

.PHONY: bundle-community-rh
bundle-community-rh: bundle-community ## Generate bundle manifests and metadata customized to Red Hat community release
echo -e "\n # Annotations for OCP\n com.redhat.openshift.versions: \"v${OCP_VERSION}\"" >> bundle/metadata/annotations.yaml

.PHONY: bundle-community
bundle-community: bundle ## Update displayName field in the bundle's CSV
sed -r -i "s|displayName: Fence Agents Remediation Operator|displayName: Fence Agents Remediation Operator - Community Edition|;" ${BUNDLE_CSV}
Expand Down

0 comments on commit 3d570e4

Please sign in to comment.