diff --git a/.github/workflows/operatorhub.yml b/.github/workflows/operatorhub.yml deleted file mode 100644 index 3856c5d7..00000000 --- a/.github/workflows/operatorhub.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: operatorhub - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "main" branch - release: - types: [published] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - - # Initialize environment and install Carvel toolsuite - - uses: actions/checkout@v4 - - name: Initialize - run: | - RELEASE_VERSION=${GITHUB_REF#refs/*/} - echo "RELEASE_VERSION=${RELEASE_VERSION:1}" >> $GITHUB_ENV - git config --global user.name "DanielePalaia" - git config --global user.email "dpalaia@vmware.com" - wget -O- https://carvel.dev/install.sh > install.sh - sudo bash install.sh - # Generate the OLM Bundle for plain K8s and Openshift - - name: GenerateOLMBundle - run: | - git clone https://github.com/rabbitmq/OLM-Package-Repo - wget https://github.com/rabbitmq/messaging-topology-operator/releases/latest/download/messaging-topology-operator-with-certmanager.yaml - cp ./messaging-topology-operator-with-certmanager.yaml ./OLM-Package-Repo/generate_OLM/generate_OLM_messaging_topology_operator/manifests_crds/ - cp ./config/crd/bases/*.yaml ./OLM-Package-Repo/generate_OLM/generate_OLM_messaging_topology_operator/manifests_crds/crds - cd ./OLM-Package-Repo/generate_OLM/generate_OLM_messaging_topology_operator/ - python3 generate-olm-package.py ./manifests_crds/messaging-topology-operator-with-certmanager.yaml ${{ env.RELEASE_VERSION }} ./../../OLM2/rabbitmq-messaging-topology-operator - cp ./generators/cluster-service-version-generator-openshift.yml ./generators/cluster-service-version-generator.yml - cp ./generators/annotations-openshift.yaml ./generators/annotations.yaml - python3 generate-olm-package.py ./manifests_crds/messaging-topology-operator-with-certmanager.yaml ${{ env.RELEASE_VERSION }} ./../../OLM2/rabbitmq-messaging-topology-operator-openshift - - # Create the PR to OperatorHUB - - name: CreateOperatorHubPR - env: - TOKEN: ${{ secrets.OPERATORHUB_TOKEN }} - run: | - git clone https://github.com/rabbitmq/community-operators - cd community-operators/operators/rabbitmq-messaging-topology-operator - git branch rabbitmq-${{ env.RELEASE_VERSION }} - git checkout rabbitmq-${{ env.RELEASE_VERSION }} - cp -fR /home/runner/work/messaging-topology-operator/messaging-topology-operator/OLM-Package-Repo/OLM2/rabbitmq-messaging-topology-operator/${{ env.RELEASE_VERSION }} . - git add . - git commit -s -m "RabbitMQ messaging operator new release" - git push https://DanielePalaia:"$TOKEN"@github.com/rabbitmq/community-operators - - # Create the PR to redhat openshift ecosystem - - name: CreateOpenshiftEcosystemPR - env: - TOKEN: ${{ secrets.OPERATORHUB_TOKEN }} - run: | - git clone https://github.com/rabbitmq/community-operators-prod - cd community-operators-prod/operators/rabbitmq-messaging-topology-operator - git branch rabbitmq-${{ env.RELEASE_VERSION }} - git checkout rabbitmq-${{ env.RELEASE_VERSION }} - cp -fR /home/runner/work/messaging-topology-operator/messaging-topology-operator/OLM-Package-Repo/OLM2/rabbitmq-messaging-topology-operator-openshift/${{ env.RELEASE_VERSION }} . - git add . - git commit -s -m "RabbitMQ operator new release" - git push https://DanielePalaia:"$TOKEN"@github.com/rabbitmq/community-operators-prod diff --git a/.github/workflows/testing_and_publishing_OLM_bundle.yml b/.github/workflows/testing_and_publishing_OLM_bundle.yml index 9f001bf3..c8128ade 100644 --- a/.github/workflows/testing_and_publishing_OLM_bundle.yml +++ b/.github/workflows/testing_and_publishing_OLM_bundle.yml @@ -97,6 +97,8 @@ jobs: - name: Protect access to the cluster with a mutex uses: ben-z/gh-action-mutex@v1.0-alpha-8 with: + repo-token: ${{ secrets.CLUSTER_OPERATOR_ACCESS_TOKEN }} + repository: rabbitmq/cluster-operator branch: openshift-lock - name: Connect to the Openshift cluster and deploy the operators through OLM