generated from pulumi/pulumi-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-jotform-example
executable file
·45 lines (37 loc) · 1004 Bytes
/
run-jotform-example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -euo pipefail
EXAMPLE_DIR=/data/examples/jotform
if [[ ! -d "$EXAMPLE_DIR" ]]
then
echo "Could not find $EXAMPLE_DIR. Make sure you started Docker with '-v GIT_REPO_ROOT:/data'"
exit 1
fi
cd "$EXAMPLE_DIR"
if [[ $(pulumi stack ls --non-interactive | wc -l) -le 1 ]]
then
echo "Run these commands to create a pulumi stack, then run this script again."
echo ""
echo "cd $EXAMPLE_DIR"
echo "pulumi stack init -s myjot"
echo "pulumi config set --secret jotform_api_key"
exit 2
fi
if [[ ! -d "venv" ]]
then
echo "Creating virtual environment"
/usr/bin/python3 -m venv venv
. venv/bin/activate
fi
. venv/bin/activate
pip uninstall pulumi-jotform -y
# Do the build
cd /data
make provider python_sdk
rm -rf /root/.pulumi/plugins/resource-*
pulumi plugin install resource jotform v0.0.0 -f /data/bin/pulumi-resource-jotform
# Stand up the example project
cd /data/examples/jotform/
. venv/bin/activate
pip install -r requirements.txt
pulumi destroy -y
pulumi up -y