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: ...@@ -48,7 +48,7 @@ commands:
- run: - run:
name: "Install Grafana build pipeline tool" name: "Install Grafana build pipeline tool"
command: | command: |
VERSION=0.5.8 VERSION=0.5.9
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl
chmod +x grabpl chmod +x grabpl
mv grabpl /tmp mv grabpl /tmp
...@@ -832,6 +832,9 @@ jobs: ...@@ -832,6 +832,9 @@ jobs:
./scripts/tidy-check.sh ./scripts/tidy-check.sh
test-frontend: test-frontend:
parameters:
edition:
type: string
executor: node executor: node
steps: steps:
- checkout - checkout
...@@ -854,7 +857,19 @@ jobs: ...@@ -854,7 +857,19 @@ jobs:
- run: - run:
name: frontend tests name: frontend tests
command: | 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: - store_test_results:
path: reports/junit path: reports/junit
- run: - run:
...@@ -868,14 +883,30 @@ jobs: ...@@ -868,14 +883,30 @@ jobs:
test-backend: test-backend:
executor: go executor: go
parameters:
edition:
type: string
steps: steps:
- checkout - checkout
- run: - run:
name: CI job started name: CI job started
command: "./scripts/ci-job-started.sh" command: "./scripts/ci-job-started.sh"
- run: - run:
name: build backend and run go tests name: back-end tests
command: "./scripts/circle-test-backend.sh" 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: - run:
name: CI job failed name: CI job failed
command: "./scripts/ci-job-failed.sh" command: "./scripts/ci-job-failed.sh"
...@@ -1165,22 +1196,36 @@ workflows: ...@@ -1165,22 +1196,36 @@ workflows:
filters: *filter-master-or-release filters: *filter-master-or-release
- test-backend: - test-backend:
filters: *filter-master-or-release 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: requires:
- lint-go - lint-go
- test-frontend: - test-frontend:
filters: *filter-master-or-release 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: - mysql-integration-test:
filters: *filter-master-or-release filters: *filter-master-or-release
requires: requires:
- lint-go - lint-go
- test-backend - test-oss-backend
- test-frontend - test-oss-frontend
- postgres-integration-test: - postgres-integration-test:
filters: *filter-master-or-release filters: *filter-master-or-release
requires: requires:
- lint-go - lint-go
- test-backend - test-oss-backend
- test-frontend - test-oss-frontend
- package-oss: - package-oss:
filters: *filter-master-or-release filters: *filter-master-or-release
requires: requires:
...@@ -1194,8 +1239,8 @@ workflows: ...@@ -1194,8 +1239,8 @@ workflows:
- build-oss-backend-linux-x64 - build-oss-backend-linux-x64
- build-oss-backend-linux-x64-musl - build-oss-backend-linux-x64-musl
- build-oss-frontend - build-oss-frontend
- test-backend - test-oss-backend
- test-frontend - test-oss-frontend
- codespell - codespell
- shellcheck - shellcheck
- build-oss-plugins - build-oss-plugins
...@@ -1212,8 +1257,8 @@ workflows: ...@@ -1212,8 +1257,8 @@ workflows:
- build-enterprise-backend-linux-x64 - build-enterprise-backend-linux-x64
- build-enterprise-backend-linux-x64-musl - build-enterprise-backend-linux-x64-musl
- build-enterprise-frontend - build-enterprise-frontend
- test-backend - test-enterprise-backend
- test-frontend - test-enterprise-frontend
- codespell - codespell
- shellcheck - shellcheck
- build-enterprise-plugins - build-enterprise-plugins
...@@ -1260,8 +1305,8 @@ workflows: ...@@ -1260,8 +1305,8 @@ workflows:
- publish-storybook: - publish-storybook:
filters: *filter-master-or-release filters: *filter-master-or-release
requires: requires:
- test-backend - test-oss-backend
- test-frontend - test-oss-frontend
- build-docker-images: - build-docker-images:
filters: *filter-master-or-release filters: *filter-master-or-release
name: build-oss-docker-images name: build-oss-docker-images
......
...@@ -26,7 +26,7 @@ steps: ...@@ -26,7 +26,7 @@ steps:
- yarn install --frozen-lockfile --no-progress - yarn install --frozen-lockfile --no-progress
environment: environment:
DOCKERIZE_VERSION: 0.6.1 DOCKERIZE_VERSION: 0.6.1
GRABPL_VERSION: 0.5.8 GRABPL_VERSION: 0.5.9
- name: lint-backend - name: lint-backend
image: grafana/build-container:1.2.26 image: grafana/build-container:1.2.26
...@@ -250,7 +250,7 @@ steps: ...@@ -250,7 +250,7 @@ steps:
- yarn install --frozen-lockfile --no-progress - yarn install --frozen-lockfile --no-progress
environment: environment:
DOCKERIZE_VERSION: 0.6.1 DOCKERIZE_VERSION: 0.6.1
GRABPL_VERSION: 0.5.8 GRABPL_VERSION: 0.5.9
- name: lint-backend - name: lint-backend
image: grafana/build-container:1.2.26 image: grafana/build-container:1.2.26
...@@ -525,7 +525,7 @@ steps: ...@@ -525,7 +525,7 @@ steps:
- gcloud auth activate-service-account --key-file=gcpkey.json - gcloud auth activate-service-account --key-file=gcpkey.json
- rm gcpkey.json - rm gcpkey.json
- $$ProgressPreference = "SilentlyContinue" - $$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 - 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 . - cp C:\App\nssm-2.24.zip .
- ./grabpl.exe windows-installer --edition oss grafana.zip - ./grabpl.exe windows-installer --edition oss grafana.zip
......
...@@ -3,7 +3,7 @@ publish_image = 'grafana/grafana-ci-deploy:1.2.6' ...@@ -3,7 +3,7 @@ publish_image = 'grafana/grafana-ci-deploy:1.2.6'
grafana_docker_image = 'grafana/drone-grafana-docker:0.2.0' grafana_docker_image = 'grafana/drone-grafana-docker:0.2.0'
alpine_image = 'alpine:3.12' alpine_image = 'alpine:3.12'
windows_image = 'mcr.microsoft.com/windows:1809' windows_image = 'mcr.microsoft.com/windows:1809'
grabpl_version = '0.5.8' grabpl_version = '0.5.9'
def pr_pipelines(edition): def pr_pipelines(edition):
services = [ 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