Drone: Update pipelines for Enterprise (#29939)

* update E2E tests

* fix e2e tests for new pipelines

* Add enterprise2 test, build, package and upload steps

* fix missing linting step

* Upgrade build pipeline tool

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grabpl lint-backend

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor publishing

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor package publishing

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Supply --simulate-release flag to publish-packages for simulating a release

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Run e2e tests with specific ports

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* e2e/start-server: Make more robust

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Agnès Toulet
2020-12-23 15:42:20 +01:00
committed by GitHub
parent 551f96089b
commit 4de784065d
7 changed files with 537 additions and 223 deletions
+13 -4
View File
@@ -4,6 +4,7 @@ set -eo pipefail
. e2e/variables
PORT=${PORT:-$DEFAULT_PORT}
PACKAGE_FILE=${PACKAGE_FILE:-$DEFAULT_PACKAGE_FILE}
./e2e/kill-server
@@ -11,12 +12,20 @@ mkdir $RUNDIR
echo -e "Copying grafana backend files to temp dir..."
if [ -f $PACKAGE_FILE ]; then
echo "Found package tar file, extracting..."
tar zxf $PACKAGE_FILE -C $RUNDIR
# Expand any wildcards
pkgs=(${PACKAGE_FILE})
pkg=${pkgs[0]}
if [[ -f ${pkg} ]]; then
echo "Found package tar file ${pkg}, extracting..."
tar zxf ${pkg} -C $RUNDIR
mv $RUNDIR/grafana-*/* $RUNDIR
else
echo "Copying local dev files"
echo "Couldn't find package ${PACKAGE_FILE} - copying local dev files"
if [[ ! -f bin/grafana-server ]]; then
echo bin/grafana-server missing
exit 1
fi
cp -r ./bin $RUNDIR
cp -r ./public $RUNDIR
+3 -2
View File
@@ -1,8 +1,9 @@
#!/bin/bash
RUNDIR=e2e/tmp
DEFAULT_RUNDIR=e2e/tmp
RUNDIR=${RUNDIR:-$DEFAULT_RUNDIR}
PIDFILE=$RUNDIR/pid
PACKAGE_FILE=dist/grafana-*linux-amd64.tar.gz
DEFAULT_PACKAGE_FILE=dist/grafana-*linux-amd64.tar.gz
PROV_DIR=$RUNDIR/conf/provisioning
DEFAULT_HOST=localhost
DEFAULT_PORT=3001