forked from Sunbird-Lern/userorg-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
23 lines (19 loc) · 668 Bytes
/
deploy.sh
File metadata and controls
23 lines (19 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# Build script
# set -o errexit
e () {
echo $( echo ${1} | jq ".${2}" | sed 's/\"//g')
}
m=$(./metadata.sh)
org=$(e "${m}" "org")
name=$(e "${m}" "name")
version=$(e "${m}" "version")
artifactLabel=${ARTIFACT_LABEL:-bronze}
env=${ENV:-null}
echo "artifactLabel: ${artifactLabel}"
echo "env: ${env}"
echo "org: ${org}"
echo "name: ${name}"
echo "version: ${version}"
ansible-playbook --version
ansible-playbook -i ansible/inventory/dev ansible/deploy.yml --tags "stack-sunbird" --extra-vars "hub_org=${org} image_name=${name} image_tag=${version}-${artifactLabel}" --vault-password-file /run/secrets/vault-pass