From 9adc0e2ced61242bbdd0d55ee4baed8b8728e169 Mon Sep 17 00:00:00 2001 From: Francisco Schulz Date: Wed, 7 Jun 2023 15:09:59 +0200 Subject: [PATCH] echo DVC vars --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12a945b..a870cf6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,3 +7,28 @@ stages: - data - build - deploy + +dvc pull: + image: python:3.8 + stage: data + script: + # install dvc + - pip install dvc + - pip install dvc-azure + # configure dvc + - echo "pulling data with remote $DVC_REMOTE_NAME, from storage $DVC_AZURE_BLOB_STORE_NAME and connection $DVC_AZURE_BLOB_STORE_CONNECTION_STRING" + - dvc remote add -d -f ${DVC_REMOTE_NAME} azure://${DVC_AZURE_BLOB_STORE_NAME}/ + - dvc remote modify ${DVC_REMOTE_NAME} connection_string "${DVC_AZURE_BLOB_STORE_CONNECTION_STRING} --verbose" + # get data + - dvc pull + rules: + - if: $CI_COMMIT_TAG + - if: $CI_COMMIT_BRANCH =~ /^release/ + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_TAG == null + when: manual + artifacts: + name: ${CI_PROJECT_DIR}-dvc-files + paths: + - data/* + expire_in: 1 day