From 55b29f45f4401092c43a098f0c7e774e8562fdfb Mon Sep 17 00:00:00 2001 From: Kerkesni Date: Tue, 7 Jan 2025 15:43:05 +0100 Subject: [PATCH] deploy metadata in tests Issue: BB-496 --- .github/dockerfiles/metadata/Dockerfile | 4 ++++ .github/dockerfiles/metadata/config.json | 14 ++++++++++++++ .github/workflows/tests.yaml | 13 +++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 .github/dockerfiles/metadata/Dockerfile create mode 100644 .github/dockerfiles/metadata/config.json diff --git a/.github/dockerfiles/metadata/Dockerfile b/.github/dockerfiles/metadata/Dockerfile new file mode 100644 index 000000000..dc07fbb52 --- /dev/null +++ b/.github/dockerfiles/metadata/Dockerfile @@ -0,0 +1,4 @@ +FROM ghcr.io/scality/metadata:7.70.45-standalone + +COPY config.json /mnt/standalone_workdir/config.json + diff --git a/.github/dockerfiles/metadata/config.json b/.github/dockerfiles/metadata/config.json new file mode 100644 index 000000000..780a7dfb2 --- /dev/null +++ b/.github/dockerfiles/metadata/config.json @@ -0,0 +1,14 @@ +{ + "raftSessions": 3, + "raftMembers": 5, + "bucketdCount": 1, + "basePorts": { + "bucketd": 9000, + "repd": 4200, + "repdAdmin": 4250 + }, + "logLevel": "info", + "env": { + "METADATA_NEW_BUCKETS_VFORMAT": "v0" + } +} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0aaff96c9..cf34f7183 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -59,6 +59,15 @@ jobs: cache-from: type=gha,scope=ci-mongodb cache-to: type=gha,mode=max,scope=ci-mongodb + - name: Build and push Metadata + uses: docker/build-push-action@v5 + with: + push: true + context: .github/dockerfiles/metadata + tags: ghcr.io/${{ github.repository }}/ci-metadata:${{ github.sha }} + cache-from: type=gha,scope=ci-metadata + cache-to: type=gha,mode=max,scope=ci-metadata + bucket-scanner: runs-on: ubuntu-latest steps: @@ -115,6 +124,10 @@ jobs: - 27017:27017 - 27018:27018 - 27019:27019 + metadata: + image: ghcr.io/${{ github.repository }}/ci-metadata:${{ github.sha }} + ports: + - 9000:9000 steps: - name: Checkout uses: actions/checkout@v4