Untitled

 avatar
unknown
plain_text
2 years ago
474 B
3
Indexable
#!/bin/bash

profile=$1
[[ ! -z "$profile" ]] && profile=,$profile

host=http://consul-dev.mmt.com:8500

find flights-gi-backend/cb-config -type f -name '**.yml' | while read file; do
    key=$(echo $file | sed 's#/cb-config/#/cb-config'$profile'/#')
    # echo http://my-consul-server:8500/v1/kv/FLIGHTS/$key
    curl -v --request PUT --data-binary @$file "$host/v1/kv/FLIGHTS/$key"
done


# to upload consul file for GI backend run `sh upload-gi-backend.sh {profile_name}`
Editor is loading...