Skip to content

Commit 97b050f

Browse files
committed
ci: add more logging to OLM workflow
[skip ci]
1 parent 77b879f commit 97b050f

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/olm.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ jobs:
151151
run: make -C olm/ catalog-all
152152

153153
- name: Run Operator System Tests
154+
id: system_tests
154155
env:
155156
ENVIRONMENT: "openshift"
156157
K8S_OPERATOR_NAMESPACE: ns-1
@@ -160,6 +161,18 @@ jobs:
160161
kubectl wait -n "$K8S_OPERATOR_NAMESPACE" sub --all --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=2m
161162
go run github.com/onsi/ginkgo/v2/ginkgo --randomize-all -r --skip "RabbitMQ Cluster with TLS enabled" system_tests/
162163
164+
- name: Collect operator logs on failure
165+
if: ${{ !cancelled() && steps.system_tests.outcome == 'failure' }}
166+
run: kubectl logs -n "$K8S_OPERATOR_NAMESPACE" deployment/messaging-topology-operator > topology-operator.log
167+
168+
- name: Upload topology operator log
169+
if: ${{ !cancelled() && steps.system_tests.outcome == 'failure' }}
170+
uses: actions/upload-artifact@v4
171+
with:
172+
path: topology-operator.log
173+
name: top-op-log
174+
retention-days: 4
175+
163176
- name: Promote tested image
164177
if: ${{ github.event_name == 'release' || inputs.release == true }}
165178
run: imgpkg copy --image quay.io/${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ needs.create-olm-package.outputs.olm_package_version }} --to-repo quay.io/${{ vars.FINAL_BUNDLE_IMAGE }}

system_tests/vhost_system_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ var _ = Describe("vhost", func() {
179179

180180
AfterEach(func() {
181181
if CurrentSpecReport().Failed() {
182-
out, err := kubectl("logs", "-n", "rabbitmq-system", rmq.Name+"server-0")
182+
out, err := kubectl("logs", "-n", namespace, rmq.Name+"-server-0")
183183
if err != nil {
184184
GinkgoWriter.Printf("error getting rabbitmq logs: %v\n", err)
185185
}

0 commit comments

Comments
 (0)