From 5a463186446cffe8250e61ab6703339cd4e9559a Mon Sep 17 00:00:00 2001 From: Trystan Schneider Date: Fri, 27 Dec 2024 14:34:50 +0100 Subject: [PATCH] Change S3 file naming --- .github/workflows/bench-benchmark.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bench-benchmark.yml b/.github/workflows/bench-benchmark.yml index d8efbe9e8..033f56719 100644 --- a/.github/workflows/bench-benchmark.yml +++ b/.github/workflows/bench-benchmark.yml @@ -69,10 +69,15 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION: eu-west-3 - - name: Get core version + - name: Set env variables run: | set -ex echo "core-version=$(cat versions.tfvars.json | jq -r '.armonik_versions.core')" >> $GITHUB_ENV + if [[ ${{ github.event_name == 'release' }} ]]; then + echo "FILE_PREFIX="release/${{ github.ref_name }}" >> $GITHUB_ENV + else + echo "FILE_PREFIX=${{ github.ref_name }}" >> $GITHUB_ENV + fi - id: deploy name: "Deploy ArmoniK" @@ -91,7 +96,7 @@ jobs: set -ex grpc_endpoint=$(cat "infrastructure/quick-deploy/$TYPE/generated/armonik-output.json" | jq -r '.armonik.control_plane_url' | sed -r 's/(http:\/\/)([^:]*)(:.*)/\2/') echo "grpc-endpoint=$grpc_endpoint" >> "$GITHUB_OUTPUT" - sleep 10 + sleep 30 - id: bench name: Run Bench @@ -122,7 +127,6 @@ jobs: env: EVENT_NAME: ${{ github.event_name }} BENCH_RESULTS_PATH: ${{ steps.get-bench-stats.outputs.bench-file-path }} - REF_NAME: ${{ github.ref_name }} TYPE: ${{ matrix.type }} GHRUNID: ${{ github.run_id }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -130,7 +134,7 @@ jobs: AWS_EC2_METADATA_DISABLED: true run: | DATE=$(date +"%Y-%m-%d") - aws s3 cp "$BENCH_RESULTS_PATH" "s3://armonik-bench-storage/${REF_NAME}/${GHRUNID}_${DATE}/benchclient_benchmark_${EVENT_NAME}_${TYPE}.json" + aws s3 cp "$BENCH_RESULTS_PATH" "s3://armonik-bench-storage/${FILE_PREFIX}/${GHRUNID}_${DATE}/benchclient_benchmark_${EVENT_NAME}_${TYPE}.json" - if: ${{ (github.event_name == 'workflow_dispatch' && inputs.destroy-on-session-end) || (github.event_name != 'workflow_dispatch' && always()) }} id: destroy