[static-web] Store curl command in a variable to avoid the colon to confuse yaml parser



commit eb85424aef70ed9cbffa4789d2cd8203d724a148
Author: Andrea Veri <averi redhat com>
Date:   Mon Jan 31 19:19:18 2022 +0100

    Store curl command in a variable to avoid the colon to confuse yaml parser

 .gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c87ff7d..fb22387 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,13 +10,14 @@ s3:
     LANG: "en_US.UTF-8"
     LANGUAGE: "en_US.UTF-8"
     LC_ALL: "en_US.UTF-8"
+    DEPLOY_CURL_COMMAND: 'curl --fail-with-body -X POST -H "Authorization: Bearer ${CDN_TOKEN}" 
https://api.cdn77.com/v3/cdn/$CDN_RESOURCE_ID/job/purge-all'
   script:
     - yum install rsync -y
     - mkdir public
     - rsync -avz --exclude=".*" --exclude=*.doap $CI_PROJECT_DIR/* public/
     - aws --version
     - aws s3 sync public s3://$S3_BUCKET --delete --size-only
-    - curl --fail-with-body -X POST -H "Authorization: Bearer ${CDN_TOKEN}" 
https://api.cdn77.com/v3/cdn/$CDN_RESOURCE_ID/job/purge-all
+    - 'eval "$DEPLOY_CURL_COMMAND"'
   only:
     refs:
       - master


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]