Commit 02ab0191 by Arve Knudsen Committed by GitHub

CircleCI: Execute enterprise tests (#27675)

* CircleCI: Execute enterprise tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent b33dcf82
......@@ -48,7 +48,7 @@ commands:
- run:
name: "Install Grafana build pipeline tool"
command: |
VERSION=0.5.8
VERSION=0.5.9
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl
chmod +x grabpl
mv grabpl /tmp
......@@ -832,6 +832,9 @@ jobs:
./scripts/tidy-check.sh
test-frontend:
parameters:
edition:
type: string
executor: node
steps:
- checkout
......@@ -854,7 +857,19 @@ jobs:
- run:
name: frontend tests
command: |
./scripts/circle-test-frontend.sh
if [[ -n $CIRCLE_TAG ]]; then
# A release build
/tmp/grabpl test-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
$CIRCLE_TAG
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
# We're testing the release pipeline
/tmp/grabpl test-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
v7.0.0-test
else
# A master build
/tmp/grabpl test-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
--build-id $CIRCLE_WORKFLOW_ID
fi
- store_test_results:
path: reports/junit
- run:
......@@ -868,14 +883,30 @@ jobs:
test-backend:
executor: go
parameters:
edition:
type: string
steps:
- checkout
- run:
name: CI job started
command: "./scripts/ci-job-started.sh"
- run:
name: build backend and run go tests
command: "./scripts/circle-test-backend.sh"
name: back-end tests
command: |
if [[ -n $CIRCLE_TAG ]]; then
# A release build
/tmp/grabpl test-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
$CIRCLE_TAG
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
# We're testing the release pipeline
/tmp/grabpl test-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
v7.0.0-test
else
# A master build
/tmp/grabpl test-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
--build-id $CIRCLE_WORKFLOW_ID
fi
- run:
name: CI job failed
command: "./scripts/ci-job-failed.sh"
......@@ -1165,22 +1196,36 @@ workflows:
filters: *filter-master-or-release
- test-backend:
filters: *filter-master-or-release
name: test-oss-backend
edition: oss
requires:
- lint-go
- test-backend:
filters: *filter-master-or-release
name: test-enterprise-backend
edition: enterprise
requires:
- lint-go
- test-frontend:
filters: *filter-master-or-release
name: test-oss-frontend
edition: oss
- test-frontend:
filters: *filter-master-or-release
name: test-enterprise-frontend
edition: enterprise
- mysql-integration-test:
filters: *filter-master-or-release
requires:
- lint-go
- test-backend
- test-frontend
- test-oss-backend
- test-oss-frontend
- postgres-integration-test:
filters: *filter-master-or-release
requires:
- lint-go
- test-backend
- test-frontend
- test-oss-backend
- test-oss-frontend
- package-oss:
filters: *filter-master-or-release
requires:
......@@ -1194,8 +1239,8 @@ workflows:
- build-oss-backend-linux-x64
- build-oss-backend-linux-x64-musl
- build-oss-frontend
- test-backend
- test-frontend
- test-oss-backend
- test-oss-frontend
- codespell
- shellcheck
- build-oss-plugins
......@@ -1212,8 +1257,8 @@ workflows:
- build-enterprise-backend-linux-x64
- build-enterprise-backend-linux-x64-musl
- build-enterprise-frontend
- test-backend
- test-frontend
- test-enterprise-backend
- test-enterprise-frontend
- codespell
- shellcheck
- build-enterprise-plugins
......@@ -1260,8 +1305,8 @@ workflows:
- publish-storybook:
filters: *filter-master-or-release
requires:
- test-backend
- test-frontend
- test-oss-backend
- test-oss-frontend
- build-docker-images:
filters: *filter-master-or-release
name: build-oss-docker-images
......
......@@ -26,7 +26,7 @@ steps:
- yarn install --frozen-lockfile --no-progress
environment:
DOCKERIZE_VERSION: 0.6.1
GRABPL_VERSION: 0.5.8
GRABPL_VERSION: 0.5.9
- name: lint-backend
image: grafana/build-container:1.2.26
......@@ -250,7 +250,7 @@ steps:
- yarn install --frozen-lockfile --no-progress
environment:
DOCKERIZE_VERSION: 0.6.1
GRABPL_VERSION: 0.5.8
GRABPL_VERSION: 0.5.9
- name: lint-backend
image: grafana/build-container:1.2.26
......@@ -525,7 +525,7 @@ steps:
- gcloud auth activate-service-account --key-file=gcpkey.json
- rm gcpkey.json
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.8/windows/grabpl.exe -OutFile grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.9/windows/grabpl.exe -OutFile grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/oss/master/grafana-7.2.0-9fffe273pre.windows-amd64.zip -OutFile grafana.zip
- cp C:\App\nssm-2.24.zip .
- ./grabpl.exe windows-installer --edition oss grafana.zip
......
......@@ -3,7 +3,7 @@ publish_image = 'grafana/grafana-ci-deploy:1.2.6'
grafana_docker_image = 'grafana/drone-grafana-docker:0.2.0'
alpine_image = 'alpine:3.12'
windows_image = 'mcr.microsoft.com/windows:1809'
grabpl_version = '0.5.8'
grabpl_version = '0.5.9'
def pr_pipelines(edition):
services = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment