diff --git a/.drone.yml b/.drone.yml index f8d744be837..fa0cfee8ed5 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.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -111,7 +111,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -309,15 +309,18 @@ steps: - package image: grafana/build-container:1.4.9 name: copy-packages-for-docker -- depends_on: +- commands: + - ./bin/grabpl build-docker --edition oss -archs amd64 + depends_on: - copy-packages-for-docker - image: grafana/drone-grafana-docker:0.3.2 + environment: + GCP_KEY: + from_secret: gcp_key + image: google/cloud-sdk name: build-docker-images - settings: - archs: amd64 - dry_run: true - edition: oss - ubuntu: false + volumes: + - name: docker + path: /var/run/docker.sock trigger: event: - pull_request @@ -359,7 +362,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -420,7 +423,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -521,7 +524,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -761,30 +764,66 @@ steps: - package image: grafana/build-container:1.4.9 name: copy-packages-for-docker -- depends_on: +- commands: + - ./bin/grabpl build-docker --edition oss + depends_on: - copy-packages-for-docker - image: grafana/drone-grafana-docker:0.3.2 + environment: + GCP_KEY: + from_secret: gcp_key + image: google/cloud-sdk name: build-docker-images - settings: - dry_run: false - edition: oss - password: - from_secret: docker_password - ubuntu: false - username: - from_secret: docker_user -- depends_on: + volumes: + - name: docker + path: /var/run/docker.sock +- commands: + - ./bin/grabpl build-docker --edition oss --ubuntu + depends_on: - copy-packages-for-docker - image: grafana/drone-grafana-docker:0.3.2 + environment: + GCP_KEY: + from_secret: gcp_key + image: google/cloud-sdk name: build-docker-images-ubuntu - settings: - dry_run: false - edition: oss - password: + volumes: + - name: docker + path: /var/run/docker.sock +- commands: + - ./bin/grabpl artifacts docker publish --dockerhub-repo grafana --base alpine --base + ubuntu --arch amd64 --arch arm64 --arch armv7 + depends_on: + - build-docker-images + - build-docker-images-ubuntu + environment: + DOCKER_PASSWORD: from_secret: docker_password - ubuntu: true - username: - from_secret: docker_user + DOCKER_USER: + from_secret: docker_username + GCP_KEY: + from_secret: gcp_key + image: google/cloud-sdk + name: publish-images-grafana + volumes: + - name: docker + path: /var/run/docker.sock +- commands: + - ./bin/grabpl artifacts docker publish --dockerhub-repo grafana-oss --base alpine + --base ubuntu --arch amd64 --arch arm64 --arch armv7 + depends_on: + - build-docker-images + - build-docker-images-ubuntu + environment: + DOCKER_PASSWORD: + from_secret: docker_password + DOCKER_USER: + from_secret: docker_username + GCP_KEY: + from_secret: gcp_key + image: google/cloud-sdk + name: publish-images-grafana-oss + volumes: + - name: docker + path: /var/run/docker.sock - commands: - ./scripts/circle-release-canary-packages.sh depends_on: @@ -805,18 +844,18 @@ steps: - end-to-end-tests-smoke-tests-suite - end-to-end-tests-various-suite environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket image: grafana/grafana-ci-deploy:1.3.1 name: upload-packages - commands: - - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" + - ./bin/grabpl upload-cdn --edition oss --src-bucket "grafana-static-assets" depends_on: - grafana-server environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -870,7 +909,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -938,7 +977,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -1021,7 +1060,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1034,7 +1073,6 @@ steps: image: grafana/build-container:1.4.9 name: initialize - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - ./bin/grabpl store-packages --edition oss --gcp-key /tmp/gcpkey.json --build-id ${DRONE_BUILD_NUMBER} depends_on: @@ -1094,7 +1132,7 @@ type: docker --- depends_on: [] kind: pipeline -name: oss-build-publish-e2e-release +name: oss-build-e2e-publish-release node: type: no-parallel platform: @@ -1104,7 +1142,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1202,8 +1240,6 @@ steps: image: grafana/build-container:1.4.9 name: copy-packages-for-docker - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - ./bin/grabpl build-docker --edition oss --shouldSave depends_on: - copy-packages-for-docker @@ -1211,13 +1247,11 @@ steps: GCP_KEY: from_secret: gcp_key image: google/cloud-sdk - name: package-docker-images + name: build-docker-images volumes: - name: docker path: /var/run/docker.sock - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - ./bin/grabpl build-docker --edition oss --shouldSave --ubuntu depends_on: - copy-packages-for-docker @@ -1225,7 +1259,7 @@ steps: GCP_KEY: from_secret: gcp_key image: google/cloud-sdk - name: package-docker-images-ubuntu + name: build-docker-images-ubuntu volumes: - name: docker path: /var/run/docker.sock @@ -1319,11 +1353,12 @@ steps: image: grafana/build-container:1.4.9 name: build-storybook - commands: - - ./bin/grabpl upload-cdn --edition oss --bucket "$${PRERELEASE_BUCKET}/artifacts/static-assets" + - ./bin/grabpl upload-cdn --edition oss --src-bucket "$${PRERELEASE_BUCKET}" --src-dir + artifacts/static-assets depends_on: - grafana-server environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -1337,7 +1372,7 @@ steps: - end-to-end-tests-smoke-tests-suite - end-to-end-tests-various-suite environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -1411,7 +1446,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1532,7 +1567,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1599,7 +1634,7 @@ volumes: medium: memory --- depends_on: -- oss-build-publish-e2e-release +- oss-build-e2e-publish-release - oss-test-release - oss-integration-tests-release kind: pipeline @@ -1616,7 +1651,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -1675,7 +1710,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1807,8 +1842,6 @@ steps: image: grafana/build-container:1.4.9 name: copy-packages-for-docker - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - ./bin/grabpl build-docker --edition enterprise --shouldSave depends_on: - copy-packages-for-docker @@ -1816,13 +1849,11 @@ steps: GCP_KEY: from_secret: gcp_key image: google/cloud-sdk - name: package-docker-images + name: build-docker-images volumes: - name: docker path: /var/run/docker.sock - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - ./bin/grabpl build-docker --edition enterprise --shouldSave --ubuntu depends_on: - copy-packages-for-docker @@ -1830,7 +1861,7 @@ steps: GCP_KEY: from_secret: gcp_key image: google/cloud-sdk - name: package-docker-images-ubuntu + name: build-docker-images-ubuntu volumes: - name: docker path: /var/run/docker.sock @@ -1916,11 +1947,12 @@ steps: - success - failure - commands: - - ./bin/grabpl upload-cdn --edition enterprise --bucket "$${PRERELEASE_BUCKET}/artifacts/static-assets" + - ./bin/grabpl upload-cdn --edition enterprise --src-bucket "$${PRERELEASE_BUCKET}" + --src-dir artifacts/static-assets depends_on: - package environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -1931,7 +1963,7 @@ steps: depends_on: - package environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -1959,11 +1991,12 @@ steps: image: grafana/build-container:1.4.9 name: package-enterprise2 - commands: - - ./bin/grabpl upload-cdn --edition enterprise2 --bucket "$${PRERELEASE_BUCKET}/artifacts/static-assets" + - ./bin/grabpl upload-cdn --edition enterprise2 --src-bucket "$${PRERELEASE_BUCKET}" + --src-dir artifacts/static-assets depends_on: - package-enterprise2 environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -1974,7 +2007,7 @@ steps: depends_on: - package-enterprise2 environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -2017,7 +2050,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2190,7 +2223,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2318,7 +2351,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -2393,7 +2426,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2415,8 +2448,8 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./bin/grabpl artifacts docker publish --version-tag ${TAG} --dockerhub-repo grafana - --base alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 + - ./bin/grabpl artifacts docker publish --dockerhub-repo grafana --base alpine --base + ubuntu --arch amd64 --arch arm64 --arch armv7 --version-tag ${TAG} depends_on: - fetch-images-oss environment: @@ -2432,8 +2465,8 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./bin/grabpl artifacts docker publish --version-tag ${TAG} --dockerhub-repo grafana-oss - --base alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 + - ./bin/grabpl artifacts docker publish --dockerhub-repo grafana-oss --base alpine + --base ubuntu --arch amd64 --arch arm64 --arch armv7 --version-tag ${TAG} depends_on: - fetch-images-oss environment: @@ -2471,7 +2504,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2493,8 +2526,8 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./bin/grabpl artifacts docker publish --version-tag ${TAG} --dockerhub-repo grafana-enterprise - --base alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 + - ./bin/grabpl artifacts docker publish --dockerhub-repo grafana-enterprise --base + alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 --version-tag ${TAG} depends_on: - fetch-images-enterprise environment: @@ -2532,7 +2565,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2554,8 +2587,8 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./bin/grabpl artifacts docker publish --security --version-tag ${TAG} --dockerhub-repo - grafana --base alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 + - ./bin/grabpl artifacts docker publish --security --dockerhub-repo grafana --base + alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 --version-tag ${TAG} depends_on: - fetch-images-oss environment: @@ -2571,8 +2604,9 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./bin/grabpl artifacts docker publish --security --version-tag ${TAG} --dockerhub-repo - grafana-oss --base alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 + - ./bin/grabpl artifacts docker publish --security --dockerhub-repo grafana-oss + --base alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 --version-tag + ${TAG} depends_on: - fetch-images-oss environment: @@ -2610,7 +2644,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2632,9 +2666,9 @@ steps: - name: docker path: /var/run/docker.sock - commands: - - ./bin/grabpl artifacts docker publish --security --version-tag ${TAG} --dockerhub-repo - grafana-enterprise --base alpine --base ubuntu --arch amd64 --arch arm64 --arch - armv7 + - ./bin/grabpl artifacts docker publish --security --dockerhub-repo grafana-enterprise + --base alpine --base ubuntu --arch amd64 --arch arm64 --arch armv7 --version-tag + ${TAG} depends_on: - fetch-images-enterprise environment: @@ -2672,7 +2706,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2708,7 +2742,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2755,7 +2789,7 @@ steps: name: initialize - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2803,12 +2837,11 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - ./bin/grabpl store-packages --edition oss --packages-bucket grafana-downloads --gcp-key /tmp/gcpkey.json ${DRONE_TAG} depends_on: @@ -2827,7 +2860,6 @@ steps: image: grafana/grafana-ci-deploy:1.3.1 name: store-packages-oss - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - ./bin/grabpl store-packages --edition enterprise --packages-bucket grafana-downloads --gcp-key /tmp/gcpkey.json ${DRONE_TAG} depends_on: @@ -2858,7 +2890,7 @@ volumes: --- depends_on: [] kind: pipeline -name: oss-build-publish-e2e-release-branch +name: oss-build-e2e-publish-release-branch node: type: no-parallel platform: @@ -2868,7 +2900,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2963,8 +2995,6 @@ steps: image: grafana/build-container:1.4.9 name: copy-packages-for-docker - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - ./bin/grabpl build-docker --edition oss --shouldSave depends_on: - copy-packages-for-docker @@ -2972,13 +3002,11 @@ steps: GCP_KEY: from_secret: gcp_key image: google/cloud-sdk - name: package-docker-images + name: build-docker-images volumes: - name: docker path: /var/run/docker.sock - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - ./bin/grabpl build-docker --edition oss --shouldSave --ubuntu depends_on: - copy-packages-for-docker @@ -2986,7 +3014,7 @@ steps: GCP_KEY: from_secret: gcp_key image: google/cloud-sdk - name: package-docker-images-ubuntu + name: build-docker-images-ubuntu volumes: - name: docker path: /var/run/docker.sock @@ -3080,11 +3108,11 @@ steps: image: grafana/build-container:1.4.9 name: build-storybook - commands: - - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" + - ./bin/grabpl upload-cdn --edition oss --src-bucket "grafana-static-assets" depends_on: - grafana-server environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -3098,7 +3126,7 @@ steps: - end-to-end-tests-smoke-tests-suite - end-to-end-tests-various-suite environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -3131,7 +3159,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3245,7 +3273,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3305,7 +3333,7 @@ volumes: medium: memory --- depends_on: -- oss-build-publish-e2e-release-branch +- oss-build-e2e-publish-release-branch - oss-test-release-branch - oss-integration-tests-release-branch kind: pipeline @@ -3322,7 +3350,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -3370,7 +3398,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3496,8 +3524,6 @@ steps: image: grafana/build-container:1.4.9 name: copy-packages-for-docker - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - ./bin/grabpl build-docker --edition enterprise --shouldSave depends_on: - copy-packages-for-docker @@ -3505,13 +3531,11 @@ steps: GCP_KEY: from_secret: gcp_key image: google/cloud-sdk - name: package-docker-images + name: build-docker-images volumes: - name: docker path: /var/run/docker.sock - commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - ./bin/grabpl build-docker --edition enterprise --shouldSave --ubuntu depends_on: - copy-packages-for-docker @@ -3519,7 +3543,7 @@ steps: GCP_KEY: from_secret: gcp_key image: google/cloud-sdk - name: package-docker-images-ubuntu + name: build-docker-images-ubuntu volumes: - name: docker path: /var/run/docker.sock @@ -3614,11 +3638,11 @@ steps: image: grafana/build-container:1.4.9 name: build-storybook - commands: - - ./bin/grabpl upload-cdn --edition enterprise --bucket "grafana-static-assets" + - ./bin/grabpl upload-cdn --edition enterprise --src-bucket "grafana-static-assets" depends_on: - package environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -3629,7 +3653,7 @@ steps: depends_on: - package environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -3657,11 +3681,11 @@ steps: image: grafana/build-container:1.4.9 name: package-enterprise2 - commands: - - ./bin/grabpl upload-cdn --edition enterprise2 --bucket "grafana-static-assets" + - ./bin/grabpl upload-cdn --edition enterprise2 --src-bucket "grafana-static-assets" depends_on: - package-enterprise2 environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -3672,7 +3696,7 @@ steps: depends_on: - package-enterprise2 environment: - GCP_GRAFANA_UPLOAD_KEY: + GCP_KEY: from_secret: gcp_key PRERELEASE_BUCKET: from_secret: prerelease_bucket @@ -3709,7 +3733,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3874,7 +3898,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3994,7 +4018,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.7/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.0/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -4191,6 +4215,6 @@ kind: secret name: gcp_upload_artifacts_key --- kind: signature -hmac: 4d1a5696bf1e510fb51a021c07e240c50cb913724ce08ed52cce037ff02dd8de +hmac: 713e8fdfc36e773a17e3fc79107bd1dd1647400f83f6d40922f566b1c7f97edb ... diff --git a/.github/workflows/detect-breaking-changes-build.yml b/.github/workflows/detect-breaking-changes-build.yml index c6ceb52d9dd..333061c3c1d 100644 --- a/.github/workflows/detect-breaking-changes-build.yml +++ b/.github/workflows/detect-breaking-changes-build.yml @@ -43,18 +43,18 @@ jobs: name: buildPr path: './pr/pr_built_packages.zip' - buildMain: - name: Build Main + buildBase: + name: Build Base runs-on: ubuntu-latest defaults: run: - working-directory: './main' + working-directory: './base' steps: - uses: actions/checkout@v2 with: - path: './main' - ref: 'main' + path: './base' + ref: ${{ github.event.pull_request.base.ref }} - name: Get yarn cache directory path id: yarn-cache-dir-path @@ -76,18 +76,18 @@ jobs: run: yarn packages:build - name: Zip built packages - run: zip -r ./main_built_packages.zip ./packages/**/dist + run: zip -r ./base_built_packages.zip ./packages/**/dist - name: Upload build output as artifact uses: actions/upload-artifact@v2 with: - name: buildMain - path: './main/main_built_packages.zip' + name: buildBase + path: './base/base_built_packages.zip' Detect: name: Detect breaking changes runs-on: ubuntu-latest - needs: ['buildPR', 'buildMain'] + needs: ['buildPR', 'buildBase'] env: GITHUB_STEP_NUMBER: 7 @@ -99,16 +99,16 @@ jobs: with: name: buildPr - - name: Get built packages from main + - name: Get built packages from base uses: actions/download-artifact@v2 with: - name: buildMain + name: buildBase - name: Unzip artifact from pr run: unzip pr_built_packages.zip -d ./pr && rm pr_built_packages.zip - - name: Unzip artifact from main - run: unzip main_built_packages.zip -d ./main && rm main_built_packages.zip + - name: Unzip artifact from base + run: unzip base_built_packages.zip -d ./base && rm base_built_packages.zip - name: Get link for the Github Action job id: job diff --git a/.yarnrc.yml b/.yarnrc.yml index 0a07e82236b..6cc7483e6ed 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -9,28 +9,28 @@ packageExtensions: "@mdx-js/loader@1.6.22": peerDependencies: react: 17.0.1 - "@storybook/addon-docs@6.4.13": + "@storybook/addon-docs@6.4.15": peerDependencies: - "@storybook/manager-webpack5": 6.4.13 - "@storybook/addon-essentials@6.4.13": + "@storybook/manager-webpack5": 6.4.15 + "@storybook/addon-essentials@6.4.15": peerDependencies: - "@storybook/components": 6.4.13 - "@storybook/core-events": 6.4.13 - "@storybook/manager-webpack5": 6.4.13 - "@storybook/theming": 6.4.13 - "@storybook/core-server@6.4.13": + "@storybook/components": 6.4.15 + "@storybook/core-events": 6.4.15 + "@storybook/manager-webpack5": 6.4.15 + "@storybook/theming": 6.4.15 + "@storybook/core-server@6.4.15": peerDependencies: "@babel/core": ^7.0.0 - "@storybook/core@6.4.13": + "@storybook/core@6.4.15": peerDependencies: "@babel/core": ^7.0.0 - "@storybook/manager-webpack5": 6.4.13 - "@storybook/csf-tools@6.4.13": + "@storybook/manager-webpack5": 6.4.15 + "@storybook/csf-tools@6.4.15": peerDependencies: "@babel/core": ^7.0.0 - "@storybook/react@6.4.13": + "@storybook/react@6.4.15": peerDependencies: - "@storybook/manager-webpack5": 6.4.13 + "@storybook/manager-webpack5": 6.4.15 doctrine@3.0.0: dependencies: assert: 2.0.0 @@ -60,10 +60,6 @@ packageExtensions: react-simple-compat: 1.2.1 peerDependencies: framework-utils: ^1.1.0 - react-dev-utils@11.0.4: - peerDependencies: - typescript: 4.4.3 - webpack: 5.51.1 react-docgen-typescript-loader@3.7.2: peerDependencies: webpack: 4.41.5 diff --git a/CHANGELOG.md b/CHANGELOG.md index 94e10774dee..6d2878e5a33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,32 @@ + + +# 8.4.0-beta1 (2022-02-02) + +### Features and enhancements + +- **Alerting:** Support WeCom as a contact point type. [#40975](https://github.com/grafana/grafana/pull/40975), [@smallpath](https://github.com/smallpath) +- **Alerting:** UI for mute timings. [#41578](https://github.com/grafana/grafana/pull/41578), [@nathanrodman](https://github.com/nathanrodman) +- **Alerting:** add settings for peer reconnection in HA mode. [#42300](https://github.com/grafana/grafana/pull/42300), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ) +- **Auth:** implement auto_sign_up for auth.jwt. [#37040](https://github.com/grafana/grafana/pull/37040), [@Roguelazer](https://github.com/Roguelazer) +- **Dashboard:** Add Show unknown variables toggle to dashboard settings. [#41854](https://github.com/grafana/grafana/pull/41854), [@hugohaggmark](https://github.com/hugohaggmark) +- **Instrumentation:** Logger migration from log15 to gokit/log. [#41636](https://github.com/grafana/grafana/pull/41636), [@ying-jeanne](https://github.com/ying-jeanne) +- **MSSQL:** Change regex to validate Provider connection string. [#40248](https://github.com/grafana/grafana/pull/40248), [@ianselmi](https://github.com/ianselmi) +- **MSSQL:** Configuration of certificate verification for TLS connection. [#31865](https://github.com/grafana/grafana/pull/31865), [@mortenaa](https://github.com/mortenaa) +- **Middleware:** Don't require HTTPS for HSTS headers to be emitted. [#35147](https://github.com/grafana/grafana/pull/35147), [@alexmv](https://github.com/alexmv) +- **Navigation:** Implement Keyboard Navigation. [#41618](https://github.com/grafana/grafana/pull/41618), [@axelavargas](https://github.com/axelavargas) +- **News:** Reload feed when changing the time range or refreshing. [#42217](https://github.com/grafana/grafana/pull/42217), [@ashharrison90](https://github.com/ashharrison90) +- **UI/Plot:** Implement keyboard controls for plot cursor. [#42244](https://github.com/grafana/grafana/pull/42244), [@kaydelaney](https://github.com/kaydelaney) + + + + +# 8.3.5 (2022-02-08) + +- **Security**: Fixes CVE-2022-21702. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/) +- **Security**: Fixes CVE-2022-21703. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/) +- **Security**: Fixes CVE-2022-21713. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/) + + # 8.3.4 (2022-01-17) @@ -1259,7 +1288,15 @@ Issue [#33352](https://github.com/grafana/grafana/issues/33352) - **AGPL License:** Update license from Apache 2.0 to the GNU Affero General Public License (AGPL). [#33184](https://github.com/grafana/grafana/pull/33184) + +# 7.5.15 (2022-02-08) + +- **Security**: Fixes CVE-2022-21702. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/) +- **Security**: Fixes CVE-2022-21703. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/) +- **Security**: Fixes CVE-2022-21713. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/) + + # 7.5.13 (2022-01-18) diff --git a/Dockerfile b/Dockerfile index 8dd105f442a..618c0fa1e88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ COPY plugins-bundled plugins-bundled RUN yarn install -COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json ./ +COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./ COPY public public COPY tools tools COPY scripts scripts @@ -30,6 +30,7 @@ COPY go.mod go.sum embed.go Makefile build.go package.json ./ COPY cue cue COPY packages/grafana-schema packages/grafana-schema COPY public/app/plugins public/app/plugins +COPY public/api-spec.json public/api-spec.json COPY pkg pkg COPY scripts scripts COPY cue.mod cue.mod diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 9323c935bdb..db3794d1bb1 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -12,7 +12,7 @@ COPY plugins-bundled plugins-bundled RUN yarn install -COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json ./ +COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./ COPY public public COPY tools tools COPY scripts scripts @@ -33,6 +33,7 @@ COPY cue cue/ COPY cue.mod cue.mod/ COPY packages/grafana-schema packages/grafana-schema/ COPY public/app/plugins public/app/plugins/ +COPY public/api-spec.json public/api-spec.json RUN go mod verify RUN make build-go diff --git a/Makefile b/Makefile index 45544ca5e8a..1c74cc3569a 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,13 @@ WIRE_TAGS = "oss" -include local/Makefile include .bingo/Variables.mk -.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-full lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help +.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-full build-docker-full-ubuntu lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help GO = go GO_FILES ?= ./pkg/... SH_FILES ?= $(shell find ./scripts -name *.sh) +API_DEFINITION_FILES = $(shell find ./pkg/api/docs/definitions -name '*.go' -print) +SWAGGER_TAG ?= latest all: deps build @@ -28,13 +30,62 @@ node_modules: package.json yarn.lock ## Install node modules. @echo "install frontend dependencies" YARN_ENABLE_PROGRESS_BARS=false yarn install --immutable +##@ Swagger +SPEC_TARGET = public/api-spec.json +MERGED_SPEC_TARGET := public/api-merged.json +NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/post.json + +$(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec + docker run --rm -it \ + -e GOPATH=${HOME}/go:/go \ + -e SWAGGER_GENERATE_EXTENSION=false \ + -v ${HOME}/go:/go \ + -v $$(pwd):/grafana \ + -w $$(pwd)/pkg/api/docs quay.io/goswagger/swagger:$(SWAGGER_TAG) \ + generate spec -m -o /grafana/public/api-spec.json \ + -w /grafana/pkg/server \ + -x "grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \ + -x "github.com/prometheus/alertmanager" \ + -i /grafana/pkg/api/docs/tags.json + +swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) + +$(NGALERT_SPEC_TARGET): + +$(MAKE) -C pkg/services/ngalert/api/tooling post.json + +$(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) ## Merge generated and ngalert API specs + go run pkg/api/docs/merge/merge_specs.go -o=public/api-merged.json $(<) pkg/services/ngalert/api/tooling/post.json + +ensure_go-swagger_mac: + @hash swagger &>/dev/null || (brew tap go-swagger/go-swagger && brew install go-swagger) + +--swagger-api-spec-mac: ensure_go-swagger_mac $(API_DEFINITION_FILES) ## Generate API spec (for M1 Mac) + swagger generate spec -m -w pkg/server -o public/api-spec.json \ + -x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \ + -x "github.com/prometheus/alertmanager" \ + -i pkg/api/docs/tags.json + +swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET) + +validate-api-spec: $(MERGED_SPEC_TARGET) ## Validate API spec + docker run --rm -it \ + -e GOPATH=${HOME}/go:/go \ + -e SWAGGER_GENERATE_EXTENSION=false \ + -v ${HOME}/go:/go \ + -v $$(pwd):/grafana \ + -w $$(pwd)/pkg/api/docs quay.io/goswagger/swagger:$(SWAGGER_TAG) \ + validate /grafana/$(<) + +clean-api-spec: + rm $(SPEC_TARGET) $(MERGED_SPEC_TARGET) + ##@ Building gen-go: $(WIRE) @echo "generate go files" $(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server ./pkg/cmd/grafana-cli/runner -build-go: gen-go ## Build all Go binaries. +build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries. @echo "build go files" $(GO) run build.go build @@ -99,6 +150,11 @@ build-docker-full: ## Build Docker image for development. @echo "build docker container" docker build --tag grafana/grafana:dev . +build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development. + @echo "build docker container" + docker build --tag grafana/grafana:dev-ubuntu -f ./Dockerfile.ubuntu . + + ##@ Services # create docker-compose file with provided sources and start them diff --git a/conf/defaults.ini b/conf/defaults.ini index 03aad2655a1..a852dee4e75 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -122,6 +122,9 @@ path = grafana.db # For "sqlite3" only. cache mode setting used for connecting to the database cache_mode = private +# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0. +locking_attempt_timeout_sec = 0 + #################################### Cache server ############################# [remote_cache] # Either "redis", "memcached" or "database" default is "database" @@ -403,6 +406,9 @@ api_key_max_seconds_to_live = -1 # Set to true to enable SigV4 authentication option for HTTP-based datasources sigv4_auth_enabled = false +# Set to true to enable verbose logging of SigV4 request signing +sigv4_verbose_logging = false + #################################### Anonymous Auth ###################### [auth.anonymous] # enable anonymous access diff --git a/conf/sample.ini b/conf/sample.ini index 2a7355fea4d..710a8ea4810 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -123,6 +123,9 @@ # For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared) ;cache_mode = private +# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0. +;locking_attempt_timeout_sec = 0 + ################################### Data sources ######################### [datasources] # Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API. @@ -397,6 +400,9 @@ # Set to true to enable SigV4 authentication option for HTTP-based datasources. ;sigv4_auth_enabled = false +# Set to true to enable verbose logging of SigV4 request signing +;sigv4_verbose_logging = false + #################################### Anonymous Auth ###################### [auth.anonymous] # enable anonymous access diff --git a/docs/sources/administration/configuration.md b/docs/sources/administration/configuration.md index 088d8fdc9d3..97d454d71ad 100644 --- a/docs/sources/administration/configuration.md +++ b/docs/sources/administration/configuration.md @@ -314,6 +314,10 @@ The maximum number of open connections to the database. Sets the maximum amount of time a connection may be reused. The default is 14400 (which means 14400 seconds or 4 hours). For MySQL, this setting should be shorter than the [`wait_timeout`](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout) variable. +### locking_attempt_timeout_sec + +For "mysql", if `lockingMigration` feature toggle is set, specify the time (in seconds) to wait before failing to lock the database for the migrations. Default is 0. + ### log_queries Set to `true` to log the sql calls and execution times. @@ -757,6 +761,12 @@ Limit of API key seconds to live before expiration. Default is -1 (unlimited). Set to `true` to enable the AWS Signature Version 4 Authentication option for HTTP-based datasources. Default is `false`. +### sigv4_verbose_logging + +> Only available in Grafana 8.4+. + +Set to `true` to enable verbose request signature logging when AWS Signature Version 4 Authentication is enabled. Default is `false`. +
| - Firing: [[ .Alerts.Firing | len ]] alert[[ if gt (len .Alerts.Firing) 1 ]]s[[ end ]][[ if gt (len .GroupLabels.SortedPairs) 1 ]] for - [[ range .GroupLabels.SortedPairs ]] - [[ .Name ]]=[[ .Value ]] - [[ end ]][[ end ]] - | -|||
| + Firing: [[ .Alerts.Firing | len ]] alert[[ if gt (len .Alerts.Firing) 1 ]]s[[ end ]][[ if gt (len .GroupLabels.SortedPairs) 1 ]] for + [[ range .GroupLabels.SortedPairs ]] + [[ .Name ]]=[[ .Value ]] + [[ end ]][[ end ]] + | +|||
| + Firing + | ++ [[ .Labels.alertname ]] + | +||
| + Resolved: [[ .Alerts.Resolved | len ]] alert[[ if gt (len .Alerts.Resolved) 1 ]]s[[ end ]][[ if gt (len .GroupLabels.SortedPairs) 1 ]] for + [[ range .GroupLabels.SortedPairs ]] + [[ .Name ]]=[[ .Value ]] + [[ end ]][[ end ]] + | +|||
| + Resolved + | ++ [[ .Labels.alertname ]] + | +||
| - Firing - | -- [[ .Labels.alertname ]] + | + Go to alerts page | |
| - Resolved: [[ .Alerts.Resolved | len ]] alert[[ if gt (len .Alerts.Resolved) 1 ]]s[[ end ]][[ if gt (len .GroupLabels.SortedPairs) 1 ]] for - [[ range .GroupLabels.SortedPairs ]] - [[ .Name ]]=[[ .Value ]] - [[ end ]][[ end ]] - | -|||
| - Resolved - | -- [[ .Labels.alertname ]] - | -||
| - Go to alerts page - | -|||