From 918cb580e80835af3d7acbe4a349723f07bcff67 Mon Sep 17 00:00:00 2001 From: Dimitris Sotirakis Date: Fri, 21 Jan 2022 11:09:31 +0200 Subject: [PATCH] E2E: Rename `end-to-end-tests-server` to `grafana-server` (#44249) (#44282) * Rename to grafana-server / move scripts into new directory * Change grafana-server step command * Change scripts paths * Use test grabpl version * Update run-suite script * Further name updates * Update grabpl version * Update contribute/style-guides/e2e-core.md Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com> Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com> (cherry picked from commit 22eb2df60272544f212b63aee3fae858abf6a641) --- .drone.yml | 156 +++++++++--------- .eslintignore | 1 + .gitignore | 4 + .prettierignore | 1 + contribute/style-guides/e2e-core.md | 4 +- e2e/run-suite | 2 +- e2e/start-and-run-suite | 6 +- e2e/verify-release | 2 +- public/locales/en/messages.js | 1 + public/locales/es/messages.js | 1 + public/locales/fr/messages.js | 1 + public/locales/pseudo-LOCALE/messages.js | 1 + scripts/drone/steps/lib.star | 16 +- scripts/generate-a11y-report.sh | 4 +- scripts/grafana-server/custom.ini | 0 {e2e => scripts/grafana-server}/kill-server | 4 +- {e2e => scripts/grafana-server}/start-server | 4 +- {e2e => scripts/grafana-server}/variables | 2 +- .../grafana-server}/wait-for-grafana | 2 +- 19 files changed, 111 insertions(+), 101 deletions(-) create mode 100644 public/locales/en/messages.js create mode 100644 public/locales/es/messages.js create mode 100644 public/locales/fr/messages.js create mode 100644 public/locales/pseudo-LOCALE/messages.js create mode 100644 scripts/grafana-server/custom.ini rename {e2e => scripts/grafana-server}/kill-server (67%) rename {e2e => scripts/grafana-server}/start-server (94%) rename {e2e => scripts/grafana-server}/variables (83%) rename {e2e => scripts/grafana-server}/wait-for-grafana (87%) diff --git a/.drone.yml b/.drone.yml index c20a597a0e8..f4ec5a3fa70 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -110,7 +110,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -186,21 +186,21 @@ steps: image: grafana/build-container:1.4.9 name: package - commands: - - ./e2e/start-server + - ./scripts/grafana-server/start-server depends_on: - package detach: true environment: PORT: 3001 image: grafana/build-container:1.4.9 - name: end-to-end-tests-server + name: grafana-server - commands: - apt-get install -y netcat - ./bin/grabpl e2e-tests --port 3001 --suite dashboards-suite depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-dashboards-suite - commands: @@ -209,7 +209,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-smoke-tests-suite - commands: @@ -218,7 +218,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-panels-suite - commands: @@ -227,7 +227,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-various-suite - commands: @@ -243,11 +243,11 @@ steps: - yarn wait-on http://$HOST:$PORT - pa11y-ci --config .pa11yci-pr.conf.js depends_on: - - end-to-end-tests-server + - grafana-server environment: GRAFANA_MISC_STATS_API_KEY: from_secret: grafana_misc_stats_api_key - HOST: end-to-end-tests-server + HOST: grafana-server PORT: 3001 failure: always image: grafana/docker-puppeteer:1.0.0 @@ -323,7 +323,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -394,7 +394,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -494,7 +494,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -593,21 +593,21 @@ steps: image: grafana/build-container:1.4.9 name: package - commands: - - ./e2e/start-server + - ./scripts/grafana-server/start-server depends_on: - package detach: true environment: PORT: 3001 image: grafana/build-container:1.4.9 - name: end-to-end-tests-server + name: grafana-server - commands: - apt-get install -y netcat - ./bin/grabpl e2e-tests --port 3001 --suite dashboards-suite depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-dashboards-suite - commands: @@ -616,7 +616,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-smoke-tests-suite - commands: @@ -625,7 +625,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-panels-suite - commands: @@ -634,7 +634,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-various-suite - commands: @@ -667,11 +667,11 @@ steps: - yarn wait-on http://$HOST:$PORT - pa11y-ci --config .pa11yci.conf.js --json > pa11y-ci-results.json depends_on: - - end-to-end-tests-server + - grafana-server environment: GRAFANA_MISC_STATS_API_KEY: from_secret: grafana_misc_stats_api_key - HOST: end-to-end-tests-server + HOST: grafana-server PORT: 3001 failure: ignore image: grafana/docker-puppeteer:1.0.0 @@ -752,7 +752,7 @@ steps: - commands: - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" depends_on: - - end-to-end-tests-server + - grafana-server environment: GCP_GRAFANA_UPLOAD_KEY: from_secret: gcp_key @@ -808,7 +808,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -886,7 +886,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -940,7 +940,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1023,7 +1023,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1149,21 +1149,21 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./e2e/start-server + - ./scripts/grafana-server/start-server depends_on: - package detach: true environment: PORT: 3001 image: grafana/build-container:1.4.9 - name: end-to-end-tests-server + name: grafana-server - commands: - apt-get install -y netcat - ./bin/grabpl e2e-tests --port 3001 --suite dashboards-suite --tries 3 depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-dashboards-suite - commands: @@ -1172,7 +1172,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-smoke-tests-suite - commands: @@ -1181,7 +1181,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-panels-suite - commands: @@ -1190,7 +1190,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-various-suite - commands: @@ -1205,7 +1205,7 @@ steps: - commands: - ./bin/grabpl upload-cdn --edition oss --bucket "$${PRERELEASE_BUCKET}/artifacts/static-assets" depends_on: - - end-to-end-tests-server + - grafana-server environment: GCP_GRAFANA_UPLOAD_KEY: from_secret: gcp_key @@ -1295,7 +1295,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1415,7 +1415,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1499,7 +1499,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -1558,7 +1558,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1718,23 +1718,23 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./e2e/start-server + - ./scripts/grafana-server/start-server depends_on: - package detach: true environment: PACKAGE_FILE: dist/grafana-enterprise-*linux-amd64.tar.gz PORT: 3001 - RUNDIR: e2e/tmp-grafana-enterprise + RUNDIR: scripts/grafana-server/tmp-grafana-enterprise image: grafana/build-container:1.4.9 - name: end-to-end-tests-server + name: grafana-server - commands: - apt-get install -y netcat - ./bin/grabpl e2e-tests --port 3001 --suite dashboards-suite --tries 3 depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-dashboards-suite - commands: @@ -1743,7 +1743,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-smoke-tests-suite - commands: @@ -1752,7 +1752,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-panels-suite - commands: @@ -1761,7 +1761,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-various-suite - commands: @@ -1866,7 +1866,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2038,7 +2038,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2166,7 +2166,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -2241,7 +2241,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2319,7 +2319,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2380,7 +2380,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2458,7 +2458,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2520,7 +2520,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2556,7 +2556,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2603,7 +2603,7 @@ steps: name: initialize - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2651,7 +2651,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2716,7 +2716,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2839,21 +2839,21 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./e2e/start-server + - ./scripts/grafana-server/start-server depends_on: - package detach: true environment: PORT: 3001 image: grafana/build-container:1.4.9 - name: end-to-end-tests-server + name: grafana-server - commands: - apt-get install -y netcat - ./bin/grabpl e2e-tests --port 3001 --suite dashboards-suite --tries 3 depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-dashboards-suite - commands: @@ -2862,7 +2862,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-smoke-tests-suite - commands: @@ -2871,7 +2871,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-panels-suite - commands: @@ -2880,7 +2880,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-various-suite - commands: @@ -2895,7 +2895,7 @@ steps: - commands: - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" depends_on: - - end-to-end-tests-server + - grafana-server environment: GCP_GRAFANA_UPLOAD_KEY: from_secret: gcp_key @@ -2944,7 +2944,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3057,7 +3057,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3134,7 +3134,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -3182,7 +3182,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3336,23 +3336,23 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./e2e/start-server + - ./scripts/grafana-server/start-server depends_on: - package detach: true environment: PACKAGE_FILE: dist/grafana-enterprise-*linux-amd64.tar.gz PORT: 3001 - RUNDIR: e2e/tmp-grafana-enterprise + RUNDIR: scripts/grafana-server/tmp-grafana-enterprise image: grafana/build-container:1.4.9 - name: end-to-end-tests-server + name: grafana-server - commands: - apt-get install -y netcat - ./bin/grabpl e2e-tests --port 3001 --suite dashboards-suite --tries 3 depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-dashboards-suite - commands: @@ -3361,7 +3361,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-smoke-tests-suite - commands: @@ -3370,7 +3370,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-panels-suite - commands: @@ -3379,7 +3379,7 @@ steps: depends_on: - package environment: - HOST: end-to-end-tests-server + HOST: grafana-server image: cypress/included:8.4.1 name: end-to-end-tests-various-suite - commands: @@ -3487,7 +3487,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3651,7 +3651,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3771,7 +3771,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.5/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -3883,6 +3883,6 @@ kind: secret name: prerelease_bucket --- kind: signature -hmac: 576e82239dd66ba1d627a13ee089c3b4562ffb55afa7839ab22fedf846a22fa2 +hmac: e75eec01a1f581db887d9e697569dfcdcdb6cabcc7b62c149f3fc6e7f1fdc599 ... diff --git a/.eslintignore b/.eslintignore index 7f3757c172b..69879bc52b9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,5 +6,6 @@ devenv data dist e2e/tmp +scripts/grafana-server/tmp public/lib/monaco deployment_tools_config.json diff --git a/.gitignore b/.gitignore index 124db041693..e9078e91bdb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ public/dist/tsconfig.tsbuildinfo /emails/dist /reports /e2e/tmp +/scripts/grafana-server/tmp vendor/ /docs/menu.yaml /requests @@ -137,6 +138,9 @@ compilation-stats.json !/e2e/**/screenshots/expected/* /e2e/**/videos/* +# grafana server +/scripts/grafana-server/server.log + # a11y tests /pa11y-ci-results.json /pa11y-ci-report diff --git a/.prettierignore b/.prettierignore index 9f8fae45f84..951a41382f5 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,6 +7,7 @@ public/vendor/ vendor/ /data/ e2e/tmp +scripts/grafana-server/tmp public/build/ public/sass/*.generated.scss devenv/ diff --git a/contribute/style-guides/e2e-core.md b/contribute/style-guides/e2e-core.md index 813ec9fe574..fb2c24e0bfc 100644 --- a/contribute/style-guides/e2e-core.md +++ b/contribute/style-guides/e2e-core.md @@ -16,8 +16,8 @@ BASE_URL=http://172.0.10.2:3333 yarn e2e The above commands use some utils scripts under [_\/e2e_](../../e2e) that can also be used for more control. -- `./e2e/start-server` This creates a fresh new grafana server working dir, setup's config and starts the server. It will also kill any previously started server that is still running using pid file at _\/e2e/tmp/pid_. -- `./e2e/wait-for-grafana` waits for `$HOST` and `$PORT` to be available. Per default localhost and 3001. +- `./scripts/grafana-server/start-server` This creates a fresh new grafana server working dir, setup's config and starts the server. It will also kill any previously started server that is still running using pid file at _\/scripts/grafana-server/tmp/pid_. +- `./scripts/grafana-server/wait-for-grafana` waits for `$HOST` and `$PORT` to be available. Per default localhost and 3001. - `./e2e/run-suite ` Starts cypress in different modes. ## Test suites diff --git a/e2e/run-suite b/e2e/run-suite index a03e5f86144..dad79eb257b 100755 --- a/e2e/run-suite +++ b/e2e/run-suite @@ -1,7 +1,7 @@ #!/bin/bash set -xeo pipefail -. e2e/variables +. scripts/grafana-server/variables HOST=${HOST:-$DEFAULT_HOST} PORT=${PORT:-$DEFAULT_PORT} diff --git a/e2e/start-and-run-suite b/e2e/start-and-run-suite index 9aac995b61f..2c5c7d1d996 100755 --- a/e2e/start-and-run-suite +++ b/e2e/start-and-run-suite @@ -1,13 +1,13 @@ #!/bin/bash -. e2e/variables +. scripts/grafana-server/variables if [ "$BASE_URL" != "" ]; then echo -e "BASE_URL set, skipping starting server" else # Start it in the background - ./e2e/start-server 2>&1 > e2e/server.log & - ./e2e/wait-for-grafana + ./scripts/grafana-server/start-server 2>&1 > scripts/grafana-server/server.log & + ./scripts/grafana-server/wait-for-grafana fi ./e2e/run-suite "$@" diff --git a/e2e/verify-release b/e2e/verify-release index 3e40a635741..2bb9df037fa 100755 --- a/e2e/verify-release +++ b/e2e/verify-release @@ -1,5 +1,5 @@ #!/bin/bash -. e2e/variables +. scripts/grafana-server/variables ./e2e/run-suite verify/specs diff --git a/public/locales/en/messages.js b/public/locales/en/messages.js new file mode 100644 index 00000000000..b1df0e93e34 --- /dev/null +++ b/public/locales/en/messages.js @@ -0,0 +1 @@ +/*eslint-disable*/module.exports={messages:{"common.save":"Save","shared-dashboard.fields.timezone-label":"Timezone","shared-preferences.fields.home-dashboard-label":"Home Dashboard","shared-preferences.fields.home-dashboard-placeholder":"Choose default dashboard","shared-preferences.fields.home-dashboard-tooltip":"Not finding the dashboard you want? Star it first, then it should appear in this select box.","shared-preferences.fields.theme-label":"UI Theme","shared-preferences.fields.week-start-label":"Week start","shared-preferences.theme.dark-label":"Dark","shared-preferences.theme.default-label":"Default","shared-preferences.theme.light-label":"Light","shared-preferences.title":"Preferences","user-orgs.current-org-button":"Current","user-orgs.name-column":"Name","user-orgs.role-column":"Role","user-orgs.select-org-button":"Select","user-orgs.title":"Organizations","user-profile.fields.email-error":"Email is required","user-profile.fields.email-label":"Email","user-profile.fields.name-error":"Name is required","user-profile.fields.name-label":"Name","user-profile.fields.username-label":"Username","user-profile.title":"Edit profile","user-session.browser-column":"Browser & OS","user-session.created-at-column":"Logged on","user-session.ip-column":"IP address","user-session.revoke":"Revoke user session","user-session.seen-at-column":"Last seen","user-sessions.loading":"Loading sessions..."}}; \ No newline at end of file diff --git a/public/locales/es/messages.js b/public/locales/es/messages.js new file mode 100644 index 00000000000..1a9e9895c6e --- /dev/null +++ b/public/locales/es/messages.js @@ -0,0 +1 @@ +/*eslint-disable*/module.exports={messages:{"common.save":"Save","shared-dashboard.fields.timezone-label":"Timezone","shared-preferences.fields.home-dashboard-label":"Home Dashboard","shared-preferences.fields.home-dashboard-placeholder":"Choose default dashboard","shared-preferences.fields.home-dashboard-tooltip":"Not finding the dashboard you want? Star it first, then it should appear in this select box.","shared-preferences.fields.theme-label":"UI Theme","shared-preferences.fields.week-start-label":"Week start","shared-preferences.theme.dark-label":"Dark","shared-preferences.theme.default-label":"Default","shared-preferences.theme.light-label":"Light","shared-preferences.title":"Preferences","user-orgs.current-org-button":"Current","user-orgs.name-column":"Name","user-orgs.role-column":"Role","user-orgs.select-org-button":"Select","user-orgs.title":"Organizations","user-profile.fields.email-error":"Email is required","user-profile.fields.email-label":"Email","user-profile.fields.name-error":"Name is required","user-profile.fields.name-label":"Name","user-profile.fields.username-label":"Username","user-profile.title":"Editar perfil","user-session.browser-column":"Browser & OS","user-session.created-at-column":"Logged on","user-session.ip-column":"IP address","user-session.revoke":"Revoke user session","user-session.seen-at-column":"Last seen","user-sessions.loading":"Loading sessions..."}}; \ No newline at end of file diff --git a/public/locales/fr/messages.js b/public/locales/fr/messages.js new file mode 100644 index 00000000000..9b1764d7451 --- /dev/null +++ b/public/locales/fr/messages.js @@ -0,0 +1 @@ +/*eslint-disable*/module.exports={messages:{"common.save":"Save","shared-dashboard.fields.timezone-label":"Timezone","shared-preferences.fields.home-dashboard-label":"Home Dashboard","shared-preferences.fields.home-dashboard-placeholder":"Choose default dashboard","shared-preferences.fields.home-dashboard-tooltip":"Not finding the dashboard you want? Star it first, then it should appear in this select box.","shared-preferences.fields.theme-label":"UI Theme","shared-preferences.fields.week-start-label":"Week start","shared-preferences.theme.dark-label":"Dark","shared-preferences.theme.default-label":"Default","shared-preferences.theme.light-label":"Light","shared-preferences.title":"Preferences","user-orgs.current-org-button":"Current","user-orgs.name-column":"Name","user-orgs.role-column":"Role","user-orgs.select-org-button":"Select","user-orgs.title":"Organizations","user-profile.fields.email-error":"Email is required","user-profile.fields.email-label":"Email","user-profile.fields.name-error":"Name is required","user-profile.fields.name-label":"Name","user-profile.fields.username-label":"Username","user-profile.title":"Editer le profil","user-session.browser-column":"Browser & OS","user-session.created-at-column":"Logged on","user-session.ip-column":"IP address","user-session.revoke":"Revoke user session","user-session.seen-at-column":"Last seen","user-sessions.loading":"Loading sessions..."}}; \ No newline at end of file diff --git a/public/locales/pseudo-LOCALE/messages.js b/public/locales/pseudo-LOCALE/messages.js new file mode 100644 index 00000000000..762ed35b219 --- /dev/null +++ b/public/locales/pseudo-LOCALE/messages.js @@ -0,0 +1 @@ +/*eslint-disable*/module.exports={messages:{"common.save":"ćōmmōń.śàvē","shared-dashboard.fields.timezone-label":"śĥàŕēď-ďàśĥƀōàŕď.ƒĩēĺďś.ţĩmēźōńē-ĺàƀēĺ","shared-preferences.fields.home-dashboard-label":"śĥàŕēď-ƥŕēƒēŕēńćēś.ƒĩēĺďś.ĥōmē-ďàśĥƀōàŕď-ĺàƀēĺ","shared-preferences.fields.home-dashboard-placeholder":"śĥàŕēď-ƥŕēƒēŕēńćēś.ƒĩēĺďś.ĥōmē-ďàśĥƀōàŕď-ƥĺàćēĥōĺďēŕ","shared-preferences.fields.home-dashboard-tooltip":"śĥàŕēď-ƥŕēƒēŕēńćēś.ƒĩēĺďś.ĥōmē-ďàśĥƀōàŕď-ţōōĺţĩƥ","shared-preferences.fields.theme-label":"śĥàŕēď-ƥŕēƒēŕēńćēś.ƒĩēĺďś.ţĥēmē-ĺàƀēĺ","shared-preferences.fields.week-start-label":"śĥàŕēď-ƥŕēƒēŕēńćēś.ƒĩēĺďś.ŵēēķ-śţàŕţ-ĺàƀēĺ","shared-preferences.theme.dark-label":"śĥàŕēď-ƥŕēƒēŕēńćēś.ţĥēmē.ďàŕķ-ĺàƀēĺ","shared-preferences.theme.default-label":"śĥàŕēď-ƥŕēƒēŕēńćēś.ţĥēmē.ďēƒàũĺţ-ĺàƀēĺ","shared-preferences.theme.light-label":"śĥàŕēď-ƥŕēƒēŕēńćēś.ţĥēmē.ĺĩĝĥţ-ĺàƀēĺ","shared-preferences.title":"śĥàŕēď-ƥŕēƒēŕēńćēś.ţĩţĺē","user-orgs.current-org-button":"ũśēŕ-ōŕĝś.ćũŕŕēńţ-ōŕĝ-ƀũţţōń","user-orgs.name-column":"ũśēŕ-ōŕĝś.ńàmē-ćōĺũmń","user-orgs.role-column":"ũśēŕ-ōŕĝś.ŕōĺē-ćōĺũmń","user-orgs.select-org-button":"ũśēŕ-ōŕĝś.śēĺēćţ-ōŕĝ-ƀũţţōń","user-orgs.title":"ũśēŕ-ōŕĝś.ţĩţĺē","user-profile.fields.email-error":"ũśēŕ-ƥŕōƒĩĺē.ƒĩēĺďś.ēmàĩĺ-ēŕŕōŕ","user-profile.fields.email-label":"ũśēŕ-ƥŕōƒĩĺē.ƒĩēĺďś.ēmàĩĺ-ĺàƀēĺ","user-profile.fields.name-error":"ũśēŕ-ƥŕōƒĩĺē.ƒĩēĺďś.ńàmē-ēŕŕōŕ","user-profile.fields.name-label":"ũśēŕ-ƥŕōƒĩĺē.ƒĩēĺďś.ńàmē-ĺàƀēĺ","user-profile.fields.username-label":"ũśēŕ-ƥŕōƒĩĺē.ƒĩēĺďś.ũśēŕńàmē-ĺàƀēĺ","user-profile.title":"ũśēŕ-ƥŕōƒĩĺē.ţĩţĺē","user-session.browser-column":"ũśēŕ-śēśśĩōń.ƀŕōŵśēŕ-ćōĺũmń","user-session.created-at-column":"ũśēŕ-śēśśĩōń.ćŕēàţēď-àţ-ćōĺũmń","user-session.ip-column":"ũśēŕ-śēśśĩōń.ĩƥ-ćōĺũmń","user-session.revoke":"ũśēŕ-śēśśĩōń.ŕēvōķē","user-session.seen-at-column":"ũśēŕ-śēśśĩōń.śēēń-àţ-ćōĺũmń","user-sessions.loading":"ũśēŕ-śēśśĩōńś.ĺōàďĩńĝ"}}; \ No newline at end of file diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index ed9b60a1acf..6641f5d5279 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -1,6 +1,6 @@ load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket') -grabpl_version = 'v2.8.4' +grabpl_version = 'v2.8.5' build_image = 'grafana/build-container:1.4.9' publish_image = 'grafana/grafana-ci-deploy:1.3.1' grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2' @@ -290,7 +290,7 @@ def upload_cdn_step(edition, ver_mode): ]) else: deps.extend([ - 'end-to-end-tests-server', + 'grafana-server', ]) return { @@ -490,11 +490,11 @@ def test_a11y_frontend_step(ver_mode, edition, port=3001): 'name': 'test-a11y-frontend' + enterprise2_suffix(edition), 'image': 'grafana/docker-puppeteer:1.0.0', 'depends_on': [ - 'end-to-end-tests-server' + enterprise2_suffix(edition), + 'grafana-server' + enterprise2_suffix(edition), ], 'environment': { 'GRAFANA_MISC_STATS_API_KEY': from_secret('grafana_misc_stats_api_key'), - 'HOST': 'end-to-end-tests-server' + enterprise2_suffix(edition), + 'HOST': 'grafana-server' + enterprise2_suffix(edition), 'PORT': port, }, 'failure': failure, @@ -621,10 +621,10 @@ def e2e_tests_server_step(edition, port=3001): } if package_file_pfx: environment['PACKAGE_FILE'] = 'dist/{}-*linux-amd64.tar.gz'.format(package_file_pfx) - environment['RUNDIR'] = 'e2e/tmp-{}'.format(package_file_pfx) + environment['RUNDIR'] = 'scripts/grafana-server/tmp-{}'.format(package_file_pfx) return { - 'name': 'end-to-end-tests-server' + enterprise2_suffix(edition), + 'name': 'grafana-server' + enterprise2_suffix(edition), 'image': build_image, 'detach': True, 'depends_on': [ @@ -632,7 +632,7 @@ def e2e_tests_server_step(edition, port=3001): ], 'environment': environment, 'commands': [ - './e2e/start-server', + './scripts/grafana-server/start-server', ], } @@ -647,7 +647,7 @@ def e2e_tests_step(suite, edition, port=3001, tries=None): 'package', ], 'environment': { - 'HOST': 'end-to-end-tests-server' + enterprise2_suffix(edition), + 'HOST': 'grafana-server' + enterprise2_suffix(edition), }, 'commands': [ 'apt-get install -y netcat', diff --git a/scripts/generate-a11y-report.sh b/scripts/generate-a11y-report.sh index 17e12598e1d..d499af62b94 100755 --- a/scripts/generate-a11y-report.sh +++ b/scripts/generate-a11y-report.sh @@ -22,8 +22,8 @@ if [ "$BASE_URL" != "" ]; then echo -e "BASE_URL set, skipping starting server" else # Start it in the background - ./e2e/start-server > e2e/server.log & - ./e2e/wait-for-grafana + ./scripts/grafana-server/start-server > scripts/grafana-server/server.log & + ./scripts/grafana-server/wait-for-grafana fi # Run accessibility command diff --git a/scripts/grafana-server/custom.ini b/scripts/grafana-server/custom.ini new file mode 100644 index 00000000000..e69de29bb2d diff --git a/e2e/kill-server b/scripts/grafana-server/kill-server similarity index 67% rename from e2e/kill-server rename to scripts/grafana-server/kill-server index 70bf9f909fd..7b9e38cda78 100755 --- a/e2e/kill-server +++ b/scripts/grafana-server/kill-server @@ -1,6 +1,6 @@ #!/bin/bash -. e2e/variables +. scripts/grafana-server/variables if [ -f "$PIDFILE" ]; then echo -e "Found pidfile, killing running grafana-server" @@ -8,4 +8,4 @@ if [ -f "$PIDFILE" ]; then rm $PIDFILE fi -rm -rf e2e/tmp +rm -rf scripts/grafana-server/tmp diff --git a/e2e/start-server b/scripts/grafana-server/start-server similarity index 94% rename from e2e/start-server rename to scripts/grafana-server/start-server index 57a79b8645f..b672a8abd0c 100755 --- a/e2e/start-server +++ b/scripts/grafana-server/start-server @@ -1,12 +1,12 @@ #!/bin/bash set -eo pipefail -. e2e/variables +. scripts/grafana-server/variables PORT=${PORT:-$DEFAULT_PORT} PACKAGE_FILE=${PACKAGE_FILE:-$DEFAULT_PACKAGE_FILE} -./e2e/kill-server +./scripts/grafana-server/kill-server mkdir $RUNDIR diff --git a/e2e/variables b/scripts/grafana-server/variables similarity index 83% rename from e2e/variables rename to scripts/grafana-server/variables index 13fa4bf360b..3b1cdac4ebf 100644 --- a/e2e/variables +++ b/scripts/grafana-server/variables @@ -1,6 +1,6 @@ #!/bin/bash -DEFAULT_RUNDIR=e2e/tmp +DEFAULT_RUNDIR=scripts/grafana-server/tmp RUNDIR=${RUNDIR:-$DEFAULT_RUNDIR} HOME_PATH=$PWD/$RUNDIR PIDFILE=$RUNDIR/pid diff --git a/e2e/wait-for-grafana b/scripts/grafana-server/wait-for-grafana similarity index 87% rename from e2e/wait-for-grafana rename to scripts/grafana-server/wait-for-grafana index b3c9839918c..a77972fb167 100755 --- a/e2e/wait-for-grafana +++ b/scripts/grafana-server/wait-for-grafana @@ -1,7 +1,7 @@ #!/bin/bash set -eo pipefail -. e2e/variables +. scripts/grafana-server/variables HOST=${HOST:-$DEFAULT_HOST} PORT=${PORT:-$DEFAULT_PORT}