Skip to content

add db user auth

add db user auth #52

Workflow file for this run

name: Run Demo
on:
pull_request:
jobs:
demo:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out code
uses : actions/checkout@v4
- name: Run compose demo
run: |
cp config/config.yaml.example config/config.yaml
cp config/iss.json.example config/iss.json
cp .env.example .env
sed -E -i 's/(_DB_PASSWORD=)([^ ]+)/\1\2New/;s/(_BROKER_PASSWORD=)([^ ]+)/\1\2New/ ' .env
docker compose -f docker-compose-demo.yml up -d
until [ "$(docker inspect data_loader --format='{{.State.Status}}')" = "exited" ]; do
echo "waithg for data_loader to finish"
sleep 5
done
token=$(curl -s -k https://localhost:8080/tokens | jq -r '.[0]')
if [ "$(curl -s -H "Authorization: Bearer $token" http://localhost:8443/metadata/datasets | jq -r '.[]')" != "DATASET0001" ]; then
echo "demo failed"
exit 1
fi
if [ "$(curl -s -H "Authorization: Bearer $token" http://localhost:8443/metadata/datasets/DATASET0001/files | jq length)" -ne 4 ]; then
echo "demo failed"
exit 1
fi
echo "demo completed sucessfully"
shell: bash