Skip to content

Commit a4a2da4

Browse files
committed
OPERATORHUB WORKFLOW
Update to publish on Openshift Ecosystem too.
1 parent 1525969 commit a4a2da4

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/operatorhub.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
wget -O- https://carvel.dev/install.sh > install.sh
3232
sudo bash install.sh
3333
34-
# Generate the OLM Bundle
34+
# Generate the OLM Bundle for operatorhub and redhat openshift ecosystem
3535
- name: GenerateOLMBundle
3636
run: |
3737
git clone https://github.com/rabbitmq/OLM-Package-Repo
@@ -40,7 +40,9 @@ jobs:
4040
cp ./config/crd/bases/rabbitmq.com_rabbitmqclusters.yaml ./OLM-Package-Repo/generate_OLM/generate_OLM_cluster_operator/manifests_crds/crds.yaml
4141
cd ./OLM-Package-Repo/generate_OLM/generate_OLM_cluster_operator/
4242
python3 generate-olm-package.py ./manifests_crds/cluster-operator.yaml ${{ env.RELEASE_VERSION }} ./../../OLM2/rabbitmq-cluster-operator
43-
43+
cp ./generators/cluster-service-version-generator-openshift.yml ./generators/cluster-service-version-generator.yml
44+
python3 generate-olm-package.py ./manifests_crds/cluster-operator.yaml ${{ env.RELEASE_VERSION }} ./../../OLM2/rabbitmq-cluster-operator-openshift
45+
4446
# Create the PR to OperatorHUB
4547
- name: CreateOperatorHubPR
4648
env:
@@ -49,9 +51,23 @@ jobs:
4951
git clone https://github.com/rabbitmq/community-operators
5052
mkdir -p community-operators/operators/rabbitmq-cluster-operator
5153
cd community-operators/operators/rabbitmq-cluster-operator
52-
git branch rabbitmq-${{ env.RELEASE_VERSION }}
53-
git checkout rabbitmq-${{ env.RELEASE_VERSION }}
54+
git branch rabbitmq-cluster-operator-${{ env.RELEASE_VERSION }}
55+
git checkout rabbitmq-cluster-operator-${{ env.RELEASE_VERSION }}
5456
cp -fR /home/runner/work/cluster-operator/cluster-operator/OLM-Package-Repo/OLM2/rabbitmq-cluster-operator/${{ env.RELEASE_VERSION }} .
5557
git add .
5658
git commit -s -m "RabbitMQ operator new release"
57-
git push https://DanielePalaia:"$TOKEN"@github.com/rabbitmq/community-operators
59+
git push https://DanielePalaia:"$TOKEN"@github.com/rabbitmq/community-operators
60+
61+
# Create the PR to redhat openshift ecosystem
62+
- name: CreateOpenshiftEcosystemPR
63+
env:
64+
TOKEN: ${{ secrets.OPERATORHUB_TOKEN }}
65+
run: |
66+
git clone https://github.com/rabbitmq/community-operators-prod
67+
cd community-operators-prod/operators/rabbitmq-cluster-operator
68+
git branch rabbitmq-cluster-operator-${{ env.RELEASE_VERSION }}
69+
git checkout rabbitmq-cluster-operator-${{ env.RELEASE_VERSION }}
70+
cp -fR /home/runner/work/cluster-operator/cluster-operator/OLM-Package-Repo/OLM2/rabbitmq-cluster-operator-openshift/${{ env.RELEASE_VERSION }} .
71+
git add .
72+
git commit -s -m "RabbitMQ operator new release"
73+
git push https://DanielePalaia:"$TOKEN"@github.com/rabbitmq/community-operators-prod

0 commit comments

Comments
 (0)