Skip to content

Commit 0d9c4ce

Browse files
committed
WIP - drop me
1 parent dc4c433 commit 0d9c4ce

File tree

1 file changed

+62
-58
lines changed

1 file changed

+62
-58
lines changed

.github/workflows/olm.yml

Lines changed: 62 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
name: Test & Publish OLM Package
33

44
on:
5+
push:
6+
branches:
7+
- '**'
58
release:
69
types: [ published ]
710

@@ -94,69 +97,70 @@ jobs:
9497
if-no-files-found: error
9598
retention-days: 1
9699

97-
test-olm-package:
98-
name: Tests the OLM packaging
99-
runs-on: ubuntu-latest
100-
needs: create-olm-package
101-
outputs:
102-
# Required to pass on the OLM bundle version to publish job
103-
olm_package_version: ${{ needs.create-olm-package.outputs.olm_package_version }}
104-
105-
steps:
106-
- name: Checkout
107-
uses: actions/checkout@v4
108-
109-
- name: Install Go
110-
uses: actions/setup-go@v5
111-
with:
112-
go-version-file: "go.mod"
113-
- name: Kubectl tool installer
114-
uses: Azure/[email protected]
115-
- name: Setup YTT
116-
uses: carvel-dev/[email protected]
117-
with:
118-
token: ${{ github.token }}
119-
only: ytt, imgpkg
120-
121-
- name: Kind Cluster
122-
uses: helm/kind-action@v1
123-
124-
- name: Install OLM
125-
run: |
126-
curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.32.0/install.sh -o install.sh
127-
chmod +x install.sh
128-
./install.sh v0.32.0
129-
130-
- name: Login to quay.io
131-
uses: docker/login-action@v3
132-
with:
133-
registry: quay.io
134-
# secret_rabbitmq/kv/oss%2Frabbitmq-cluster-operator%2Fsecrets/details
135-
username: ${{ secrets.QUAY_USERNAME }}
136-
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
137-
138-
- name: Run test
139-
env:
140-
IMAGE: ${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ needs.create-olm-package.outputs.olm_package_version }}
141-
BUNDLE_VERSION: ${{ needs.create-olm-package.outputs.olm_package_version }}
142-
# Used to create a temporary OLM catalog to validate the bundle
143-
CATALOG_IMAGE: ${{ vars.TEST_CATALOG_IMAGE }}
144-
# The test suite is sensible to the working directory, and go-test always sets the working directory
145-
# to the package path (i.e. olm/test). As a workaround, we compile the test in a binary, and then
146-
# run it from the repo root directory
147-
run: |
148-
go test -c -o olm.test ./olm/test/
149-
./olm.test
150-
151-
- name: Promote tested image
152-
if: ${{ github.event_name == 'release' || inputs.release == true }}
153-
run: imgpkg copy --image ${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ needs.create-olm-package.outputs.olm_package_version }} --to-repo ${{ vars.FINAL_BUNDLE_IMAGE }}
100+
# test-olm-package:
101+
# name: Tests the OLM packaging
102+
# runs-on: ubuntu-latest
103+
# needs: create-olm-package
104+
# outputs:
105+
# # Required to pass on the OLM bundle version to publish job
106+
# olm_package_version: ${{ needs.create-olm-package.outputs.olm_package_version }}
107+
#
108+
# steps:
109+
# - name: Checkout
110+
# uses: actions/checkout@v4
111+
#
112+
# - name: Install Go
113+
# uses: actions/setup-go@v5
114+
# with:
115+
# go-version-file: "go.mod"
116+
# - name: Kubectl tool installer
117+
# uses: Azure/[email protected]
118+
# - name: Setup YTT
119+
# uses: carvel-dev/[email protected]
120+
# with:
121+
# token: ${{ github.token }}
122+
# only: ytt, imgpkg
123+
#
124+
# - name: Kind Cluster
125+
# uses: helm/kind-action@v1
126+
#
127+
# - name: Install OLM
128+
# run: |
129+
# curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.32.0/install.sh -o install.sh
130+
# chmod +x install.sh
131+
# ./install.sh v0.32.0
132+
#
133+
# - name: Login to quay.io
134+
# uses: docker/login-action@v3
135+
# with:
136+
# registry: quay.io
137+
# # secret_rabbitmq/kv/oss%2Frabbitmq-cluster-operator%2Fsecrets/details
138+
# username: ${{ secrets.QUAY_USERNAME }}
139+
# password: ${{ secrets.QUAY_ROBOT_TOKEN }}
140+
#
141+
# - name: Run test
142+
# env:
143+
# IMAGE: ${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ needs.create-olm-package.outputs.olm_package_version }}
144+
# BUNDLE_VERSION: ${{ needs.create-olm-package.outputs.olm_package_version }}
145+
# # Used to create a temporary OLM catalog to validate the bundle
146+
# CATALOG_IMAGE: ${{ vars.TEST_CATALOG_IMAGE }}
147+
# # The test suite is sensible to the working directory, and go-test always sets the working directory
148+
# # to the package path (i.e. olm/test). As a workaround, we compile the test in a binary, and then
149+
# # run it from the repo root directory
150+
# run: |
151+
# go test -c -o olm.test ./olm/test/
152+
# ./olm.test
153+
#
154+
# - name: Promote tested image
155+
# if: ${{ github.event_name == 'release' || inputs.release == true }}
156+
# run: imgpkg copy --image ${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ needs.create-olm-package.outputs.olm_package_version }} --to-repo ${{ vars.FINAL_BUNDLE_IMAGE }}
154157

155158
publish-bundle-operatorhub:
156159
if: ${{ github.event_name == 'release' || inputs.release == true }}
157160
name: PR OperatorHub repo
158161
runs-on: ubuntu-latest
159-
needs: test-olm-package
162+
needs: create-olm-package
163+
# needs: test-olm-package
160164
steps:
161165
- name: Checkout community-operators fork (OperatorHub)
162166
uses: actions/checkout@v4

0 commit comments

Comments
 (0)