From 79a0220d28615ea2313627a1006836f56673e4cc Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 10 Jun 2021 16:24:48 +0100 Subject: [PATCH] ci: Make PIPELINE_ARTIFACTS_BASE a common variable $minio/artifacts/$project/$pipeline/ is common between all our CI. Signed-off-by: Daniel Stone Part-of: --- .gitlab-ci.yml | 4 +++- .gitlab-ci/common/generate-env.sh | 1 + .gitlab-ci/lava/lava-gitlab-ci.yml | 5 ++--- .gitlab-ci/prepare-artifacts.sh | 3 +-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea06160..18c5a12 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,8 @@ variables: /usr/bin/wget -q -O- ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | sh - set +o xtrace MINIO_HOST: minio-packet.freedesktop.org + # per-pipeline artifact storage on MinIO + PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID} include: - project: 'freedesktop/ci-templates' @@ -1260,7 +1262,7 @@ meson-mingw32-x86_64: # instead of fd.o. Set FDO_HTTP_CACHE_URI to an http cache for your test lab to # improve it even more (see https://docs.mesa3d.org/ci/bare-metal.html for # setup). - - wget ${FDO_HTTP_CACHE_URI:-}https://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/${MINIO_ARTIFACT_NAME}.tar.gz -S --progress=dot:giga -O- | tar -xz + - wget ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}.tar.gz -S --progress=dot:giga -O- | tar -xz artifacts: when: always name: "mesa_${CI_JOB_NAME}" diff --git a/.gitlab-ci/common/generate-env.sh b/.gitlab-ci/common/generate-env.sh index 980e246..28ecf67 100755 --- a/.gitlab-ci/common/generate-env.sh +++ b/.gitlab-ci/common/generate-env.sh @@ -61,6 +61,7 @@ for var in \ PIGLIT_REPLAY_UPLOAD_TO_MINIO \ PIGLIT_RESULTS \ PIGLIT_TESTS \ + PIPELINE_ARTIFACTS_BASE \ TEST_LD_PRELOAD \ TU_DEBUG \ VK_CPU \ diff --git a/.gitlab-ci/lava/lava-gitlab-ci.yml b/.gitlab-ci/lava/lava-gitlab-ci.yml index 3d01e11..5dcecc3 100644 --- a/.gitlab-ci/lava/lava-gitlab-ci.yml +++ b/.gitlab-ci/lava/lava-gitlab-ci.yml @@ -6,7 +6,7 @@ variables: GIT_STRATEGY: none # testing doesn't build anything from source ENV_VARS: "DEQP_PARALLEL=6" - FIXED_ENV_VARS: "CI_PIPELINE_ID=${CI_PIPELINE_ID} CI_JOB_ID=${CI_JOB_ID} CI_PAGES_DOMAIN=${CI_PAGES_DOMAIN} CI_PROJECT_NAME=${CI_PROJECT_NAME} CI_PROJECT_DIR=${CI_PROJECT_DIR} CI_PROJECT_PATH=${CI_PROJECT_PATH} CI_PROJECT_ROOT_NAMESPACE=${CI_PROJECT_ROOT_NAMESPACE} CI_SERVER_URL=${CI_SERVER_URL} DRIVER_NAME=${DRIVER_NAME} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} PIGLIT_NO_WINDOW=1 PIGLIT_REPLAY_UPLOAD_TO_MINIO=1 MINIO_HOST=${MINIO_HOST} LAVA_TEST_SCRIPT=${LAVA_TEST_SCRIPT} VK_DRIVER=${VK_DRIVER} FLAKES_CHANNEL=${FLAKES_CHANNEL}" + FIXED_ENV_VARS: "CI_PIPELINE_ID=${CI_PIPELINE_ID} CI_JOB_ID=${CI_JOB_ID} CI_PAGES_DOMAIN=${CI_PAGES_DOMAIN} CI_PROJECT_NAME=${CI_PROJECT_NAME} CI_PROJECT_DIR=${CI_PROJECT_DIR} CI_PROJECT_PATH=${CI_PROJECT_PATH} CI_PROJECT_ROOT_NAMESPACE=${CI_PROJECT_ROOT_NAMESPACE} CI_SERVER_URL=${CI_SERVER_URL} DRIVER_NAME=${DRIVER_NAME} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} PIGLIT_NO_WINDOW=1 PIGLIT_REPLAY_UPLOAD_TO_MINIO=1 MINIO_HOST=${MINIO_HOST} LAVA_TEST_SCRIPT=${LAVA_TEST_SCRIPT} VK_DRIVER=${VK_DRIVER} FLAKES_CHANNEL=${FLAKES_CHANNEL} PIPELINE_ARTIFACTS_BASE=${PIPELINE_ARTIFACTS_BASE}" DEQP_VERSION: gles2 # proxy used to cache data locally FDO_HTTP_CACHE_URI: "http://caching-proxy/cache/?uri=" @@ -14,8 +14,7 @@ BASE_SYSTEM_HOST_PREFIX: "${MINIO_HOST}/mesa-lava" BASE_SYSTEM_MAINLINE_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${FDO_UPSTREAM_REPO}/${DISTRIBUTION_TAG}/${ARCH}" BASE_SYSTEM_FORK_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${ARCH}" - # per-pipeline/job build artifacts - PIPELINE_ARTIFACTS_BASE: "${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}" + # per-job build artifacts MESA_BUILD_PATH: "${PIPELINE_ARTIFACTS_BASE}/mesa-${ARCH}.tar.gz" JOB_RESULTS_PATH: "${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}/results.tar.gz" script: diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh index 5f8f81e..d30151f 100755 --- a/.gitlab-ci/prepare-artifacts.sh +++ b/.gitlab-ci/prepare-artifacts.sh @@ -51,7 +51,6 @@ if [ -n "$MINIO_ARTIFACT_NAME" ]; then # Pass needed files to the test stage MINIO_ARTIFACT_NAME="$MINIO_ARTIFACT_NAME.tar.gz" gzip -c artifacts/install.tar > ${MINIO_ARTIFACT_NAME} - MINIO_PATH=${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID} ci-fairy minio login $CI_JOB_JWT - ci-fairy minio cp ${MINIO_ARTIFACT_NAME} minio://${MINIO_PATH}/${MINIO_ARTIFACT_NAME} + ci-fairy minio cp ${MINIO_ARTIFACT_NAME} minio://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME} fi -- 2.7.4