#!/bin/bash

cd ${WORKSPACE}/test

TEST_RESULTS="test_results"
ARCHIVE_NAME="${TEST_RESULTS}_${JOB_BASE_NAME}_${BUILD_NUMBER}.zip"

find $TEST_RESULTS/  -name "*.zip" | xargs -I '{}' mv '{}' ../

zip -qr ${ARCHIVE_NAME} ${TEST_RESULTS}
mv ${ARCHIVE_NAME} ../

rm -rf ./${TEST_RESULTS}

#!/bin/bash

cd ${WORKSPACE}/test

TEST_RESULTS="test_results"
ARCHIVE_NAME="${TEST_RESULTS}_${JOB_BASE_NAME}_${BUILD_NUMBER}_${STAGE_NAME/ /}.zip"

find $TEST_RESULTS/  -name "*.zip" | xargs -I '{}' mv '{}' ../

zip -qr ${ARCHIVE_NAME} ${TEST_RESULTS}
mv ${ARCHIVE_NAME} ../

rm -rf ./${TEST_RESULTS}

Archive artifacts with the stage name.
CI: Archive artifacts with the stage name.

On multiple stages that creates multiple artifacts (Ginkgo kubernetes
all) the artifacts are not updating correctly because the zip file has
the same output name. With this change all artifacts has the stage name
in there too.

Signed-off-by: Eloy Coto <2a8acc28452926ceac4d9db555411743254cf5f9@gmail.com>
