Skip to content

Commit

Permalink
only deploy metadata when needed
Browse files Browse the repository at this point in the history
Issue: ZENKO-4414
  • Loading branch information
Kerkesni committed Feb 11, 2025
1 parent 8522905 commit 0deadb5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/actions/deploy/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ inputs:
description: "The tag of the Zenko Operator image to use"
required: false
default: ""
deploy_metadata:
description: "Deploy a metadata cluster alongside Zenko"
required: false
default: "false"
runs:
using: composite
steps:
Expand Down Expand Up @@ -85,8 +89,9 @@ runs:
working-directory: ./.github/scripts/end2end/operator
- name: Deploy metadata
shell: bash
run: bash deploy-metadata.sh
run: ./deploy-metadata.sh
working-directory: ./.github/scripts/end2end
if: ${{ inputs.deploy_metadata == 'true' }}
- name: End-to-end configuration
shell: bash
run: bash configure-e2e.sh "end2end" ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG} "default"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/end2end.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ env:
GCP_BACKEND_SERVICE_KEY: ${{ secrets.GCP_BACKEND_SERVICE_KEY }}
GCP_BACKEND_SERVICE_EMAIL: ${{ secrets.GCP_BACKEND_SERVICE_EMAIL }}
# Enable this for Ring tests
ENABLE_RING_TESTS: "true"
ENABLE_RING_TESTS: "false"
RING_S3C_ACCESS_KEY: accessKey1
RING_S3C_SECRET_KEY: verySecretKey1
RING_S3C_ENDPOINT: http://s3c.local:8000
Expand Down Expand Up @@ -553,6 +553,8 @@ jobs:
needs: [build-kafka, build-test-image]
runs-on:
- ubuntu-22.04-8core
env:
ENABLE_RING_TESTS: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -570,6 +572,8 @@ jobs:
uses: ./.github/actions/deploy
env:
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
with:
deploy_metadata: ${{ env.ENABLE_RING_TESTS }}
- name: Run backbeat end to end tests
run: bash run-e2e-test.sh "end2end" ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG} "backbeat" "default"
working-directory: ./.github/scripts/end2end
Expand Down
6 changes: 6 additions & 0 deletions tests/zenko_tests/e2e_config/locations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

import logging
import os

_log = logging.getLogger("end2end configuration")

Expand All @@ -11,6 +12,11 @@ def create_location(client, uuid, location):
:param uuid: zenko instance uuid
:param location: location details
"""

ENABLE_RING_TESTS = os.environ['ENABLE_RING_TESTS']
if ENABLE_RING_TESTS == "false" and location["locationType"] == "location-scality-ring-s3-v1":
return

try:
Location_V1 = client.get_model('location-v1')
if "bootstrapList" not in location["details"]:
Expand Down

0 comments on commit 0deadb5

Please sign in to comment.