]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-deploy-build: inject chacractl credentials 1672/head
authorKefu Chai <kchai@redhat.com>
Thu, 1 Oct 2020 11:46:24 +0000 (19:46 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 1 Oct 2020 12:16:57 +0000 (20:16 +0800)
otherwise we would have

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://chacra.ceph.com/binaries/ceph-deploy/test/c6ff0a05523cdeda86ebac732dd186620261dc01/centos/7/source/

when posting the created package to chacra

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph-deploy-build/build/setup
ceph-deploy-build/config/definitions/ceph-deploy-build.yml

index 7a0baed3d0f91f4cb545418d0618b5a584e7877d..a1fa6a8c7b88985d127c92ae761ff63659ec27f9 100644 (file)
@@ -24,5 +24,7 @@ fi
 pkgs=( "chacractl>=0.0.21" )
 install_python_packages "pkgs[@]"
 
+# ask shaman which chacra instance to use
+chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
 # create the .chacractl config file using global variables
-make_chacractl_config
+make_chacractl_config $chacra_url
index 6ff60a69df5ed692863dfd639a6f74a75b6714e4..f071007fd9500ff635e44ca1be430feb33848e7b 100644 (file)
       - inject-passwords:
           global: true
           mask-password-params: true
+      - credentials-binding:
+          - text:
+              credential-id: chacractl-key
+              variable: CHACRACTL_KEY
+          - text:
+              credential-id: shaman-api-key
+              variable: SHAMAN_API_KEY