From dd3175620964cbdaf5d2bdce98db81b20106de0b Mon Sep 17 00:00:00 2001
From: Krish Moodbidri <krish94@uab.edu>
Date: Fri, 12 Jan 2024 08:37:46 -0600
Subject: [PATCH] test with s3cmd

---
 .gitlab-ci.yml | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fcece05..f3a2cba 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,7 +13,9 @@ variables:
   GIT_SUBMODULE_STRATEGY: "recursive"
   GIT_SUBMODULE_UPDATE_FLAGS: "--force"
   AWS_PROFILE: "krish94"
-  S3_ENDPOINT: "https://s3.lts.rc.uab.edu"
+  ANSIBLE_REMOTE_TMP: "/tmp"
+  AWS_DEFAULT_REGION: "bhm"
+  AWS_HOST: "s3.lts.rc.uab.edu"
   BUCKET_NAME: "xdmod-vol"
   FILE_NAME: "xdmod-dev-volume-snap.raw"
 
@@ -29,6 +31,10 @@ stages:          # List of stages for jobs, and their order of execution
   - deploy
   - cleanup
 
+
+.get_ansible_files: &get_ansible_files
+  - s3cmd get --force -r --host=$AWS_HOST --host-bucket=$AWS_HOST s3://xdmod-vol/ /tmp
+  
 prep-deploy:
   stage: .pre
   tags: [build]
@@ -37,7 +43,6 @@ prep-deploy:
   script:
     - export BUILD_DATE=$(TZ=America/Chicago date +%Y-%m-%dT%H%M%S)
     - apt-get update && apt-get install -y awscli
-    - aws s3 --profile="${AWS_PROFILE}" --endpoint="${S3_ENDPOINT}" cp "s3://${BUCKET_NAME}/${FILE_NAME}" "${FILE_NAME}"
     - |
       if [ "$TARGET_ENV" = "dev" ]; then
            TF_VAR_data_volume="xdmod-dev-volume-$BUILD_DATE"
-- 
GitLab