mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
d8a116e696
* feat: add incomplete unit test * refactor: add idea for unit test * feat: create new e2e test * feat: add some steps * feat: add comment * feat: complete prep work * feat: complete clean up * rebase * feat: add more steps to test flow * refactor: remove unit test * refactor: clean up * refactor: create a provisioned alert rule * refactor: change location and content * refactor: e2e test * refactor: betterer * refactor: move provisioned alert rule * refactor: make provisioning file available remote * refactor: clean up test * refactor: move provisioned alert rule * refactor: remove wait() * feat: restructure first test and add more tests * feat: add another provisioned alert rule * feat: add a new test * feat: complete new test * refactor: replace data-testid in alert rules * refactor: replace data-testid * refactor: fix tests for drone * refactor: fix third test after review * refactor: fix last test * temp * refactor: improve some things * refactor: adjust unit tests * refactor: remove assertions for alert rule details view * refactor: remove assertions * refactor: add check for button text * refactor: remove session storage * refactor: apply changes from code review * refactor: add codeowner * refactor * refactor * refactor: clean up * refactor: clean up * refactor: clean up * refactor: increase pa11y threshold for /alerting/list
69 lines
1.5 KiB
Bash
Executable File
69 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
set -eo pipefail
|
|
|
|
. scripts/grafana-server/variables
|
|
|
|
PORT=${PORT:-$DEFAULT_PORT}
|
|
ARCH=${ARCH:-$DEFAULT_ARCH}
|
|
|
|
if [ "$ARCH" ]; then
|
|
ARCH+="/"
|
|
fi
|
|
|
|
./scripts/grafana-server/kill-server
|
|
|
|
mkdir $RUNDIR
|
|
|
|
echo -e "Copying grafana backend files to temp dir..."
|
|
|
|
if [[ ! -f bin/"$ARCH"grafana-server ]]; then
|
|
echo "bin/linux-amd64/grafana-server missing, trying local grafana-server binary"
|
|
fi
|
|
|
|
echo starting server
|
|
|
|
cp -r ./bin $RUNDIR
|
|
cp -r ./public $RUNDIR
|
|
cp -r ./tools $RUNDIR
|
|
|
|
mkdir $RUNDIR/conf
|
|
mkdir $PROV_DIR
|
|
mkdir $PROV_DIR/datasources
|
|
mkdir $PROV_DIR/dashboards
|
|
mkdir $PROV_DIR/alerting
|
|
|
|
cp ./scripts/grafana-server/custom.ini $RUNDIR/conf/custom.ini
|
|
cp ./conf/defaults.ini $RUNDIR/conf/defaults.ini
|
|
|
|
echo -e "Copying custom plugins from e2e tests"
|
|
|
|
mkdir -p "$RUNDIR/data/plugins"
|
|
# when running in a local computer
|
|
if [ -d "./e2e/custom-plugins" ]; then
|
|
cp -r "./e2e/custom-plugins" "$RUNDIR/data/plugins"
|
|
# when running in CI
|
|
elif [ -d "../e2e/custom-plugins" ]; then
|
|
cp -r "../e2e/custom-plugins" "$RUNDIR/data/plugins"
|
|
fi
|
|
|
|
echo -e "Copy provisioning setup from devenv"
|
|
|
|
cp devenv/datasources.yaml $PROV_DIR/datasources
|
|
cp devenv/dashboards.yaml $PROV_DIR/dashboards
|
|
cp devenv/alert_rules.yaml $PROV_DIR/alerting
|
|
|
|
cp -r devenv $RUNDIR
|
|
|
|
echo -e "Starting Grafana Server port $PORT"
|
|
|
|
$RUNDIR/bin/"$ARCH"grafana-server \
|
|
--homepath=$HOME_PATH \
|
|
--pidfile=$RUNDIR/pid \
|
|
cfg:server.http_port=$PORT \
|
|
cfg:server.router_logging=1 \
|
|
cfg:app_mode=development \
|
|
cfg:enterprise.license_path=$1
|
|
|
|
# 2>&1 > $RUNDIR/output.log &
|
|
# cfg:log.level=debug \
|