Skip to content

Commit 0deadb5

Browse files
author
Kerkesni
committed
only deploy metadata when needed
Issue: ZENKO-4414
1 parent 8522905 commit 0deadb5

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/actions/deploy/action.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ inputs:
77
description: "The tag of the Zenko Operator image to use"
88
required: false
99
default: ""
10+
deploy_metadata:
11+
description: "Deploy a metadata cluster alongside Zenko"
12+
required: false
13+
default: "false"
1014
runs:
1115
using: composite
1216
steps:
@@ -85,8 +89,9 @@ runs:
8589
working-directory: ./.github/scripts/end2end/operator
8690
- name: Deploy metadata
8791
shell: bash
88-
run: bash deploy-metadata.sh
92+
run: ./deploy-metadata.sh
8993
working-directory: ./.github/scripts/end2end
94+
if: ${{ inputs.deploy_metadata == 'true' }}
9095
- name: End-to-end configuration
9196
shell: bash
9297
run: bash configure-e2e.sh "end2end" ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG} "default"

.github/workflows/end2end.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ env:
7575
GCP_BACKEND_SERVICE_KEY: ${{ secrets.GCP_BACKEND_SERVICE_KEY }}
7676
GCP_BACKEND_SERVICE_EMAIL: ${{ secrets.GCP_BACKEND_SERVICE_EMAIL }}
7777
# Enable this for Ring tests
78-
ENABLE_RING_TESTS: "true"
78+
ENABLE_RING_TESTS: "false"
7979
RING_S3C_ACCESS_KEY: accessKey1
8080
RING_S3C_SECRET_KEY: verySecretKey1
8181
RING_S3C_ENDPOINT: http://s3c.local:8000
@@ -553,6 +553,8 @@ jobs:
553553
needs: [build-kafka, build-test-image]
554554
runs-on:
555555
- ubuntu-22.04-8core
556+
env:
557+
ENABLE_RING_TESTS: "true"
556558
steps:
557559
- name: Checkout
558560
uses: actions/checkout@v4
@@ -570,6 +572,8 @@ jobs:
570572
uses: ./.github/actions/deploy
571573
env:
572574
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
575+
with:
576+
deploy_metadata: ${{ env.ENABLE_RING_TESTS }}
573577
- name: Run backbeat end to end tests
574578
run: bash run-e2e-test.sh "end2end" ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG} "backbeat" "default"
575579
working-directory: ./.github/scripts/end2end

tests/zenko_tests/e2e_config/locations.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22

33
import logging
4+
import os
45

56
_log = logging.getLogger("end2end configuration")
67

@@ -11,6 +12,11 @@ def create_location(client, uuid, location):
1112
:param uuid: zenko instance uuid
1213
:param location: location details
1314
"""
15+
16+
ENABLE_RING_TESTS = os.environ['ENABLE_RING_TESTS']
17+
if ENABLE_RING_TESTS == "false" and location["locationType"] == "location-scality-ring-s3-v1":
18+
return
19+
1420
try:
1521
Location_V1 = client.get_model('location-v1')
1622
if "bootstrapList" not in location["details"]:

0 commit comments

Comments
 (0)