From ff468d4325a4656c6dcc93cdc4a1b50050386cbc Mon Sep 17 00:00:00 2001 From: Matthew Defenderfer <mdefende@uab.edu> Date: Fri, 25 Oct 2024 14:06:10 -0500 Subject: [PATCH] add tool for secure files --- .gitlab-ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90da61a..0493519 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,12 @@ default: - docker:dind before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash interruptible: true +variables: + - SECURE_FILES_DOWNLOAD_PATH='.secure' + stages: - pre-build - build @@ -14,9 +18,8 @@ get-credentials: stage: pre-build script: - echo "Copying secure file with FeBio login ..." - - cp $CI_SECURE_FILE_PATH/febio_login.txt ./febio_login.txt - - export USERNAME=$(grep 'username:' secure_file.txt | cut -d ':' -f2 | tr -d ' ') - - export PASSWORD=$(grep 'password:' secure_file.txt | cut -d ':' -f2 | tr -d ' ') + - export USERNAME=$(grep 'username:' ${SECURE_FILE_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ') + - export PASSWORD=$(grep 'password:' ${SECURE_FILE_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ') - echo "Extracted username $USERNAME" - echo "Extracted password $PASSWORD" -- GitLab