Chore: Move from master to main branch (#33693)

* Chore: Move from master branch to main

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

* CI: Upgrade build pipeline tool to v2

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
pull/33719/head
Arve Knudsen 4 years ago committed by GitHub
parent 263d751860
commit c2c1ec7d0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .circleci/config.yml
  2. 4
      .drone.star
  3. 72
      .drone.yml
  4. 4
      .github/ISSUE_TEMPLATE/4-grafana_ui_component.md
  5. 4
      .github/PULL_REQUEST_TEMPLATE.md
  6. 4
      .github/bot.md
  7. 6
      .github/commands.json
  8. 18
      .github/workflows/bump-version.yml
  9. 6
      .github/workflows/codeql-analysis.yml
  10. 2
      .github/workflows/publish.yml
  11. 2
      CONTRIBUTING.md
  12. 4
      GOVERNANCE.md
  13. 4
      ISSUE_TRIAGE.md
  14. 2
      PLUGIN_DEV.md
  15. 4
      UPGRADING_DEPENDENCIES.md
  16. 12
      WORKFLOW.md
  17. 2
      build.go
  18. 2
      contribute/architecture/backend/database.md
  19. 2
      contribute/architecture/frontend-data-requests.md
  20. 2
      contribute/create-pull-request.md
  21. 2
      contribute/style-guides/backend.md
  22. 2
      contribute/style-guides/documentation-style-guide.md
  23. 2
      contribute/style-guides/storybook.md
  24. 2
      docs/README.md
  25. 2
      docs/sources/administration/image_rendering.md
  26. 2
      docs/sources/datasources/azuremonitor.md
  27. 26
      docs/sources/developers/contribute.md
  28. 2
      docs/sources/developers/plugins/data-frames.md
  29. 2
      docs/sources/developers/plugins/error-handling.md
  30. 10
      docs/sources/developers/plugins/legacy/_index.md
  31. 2
      docs/sources/developers/plugins/legacy/defaults-and-editor-mode.md
  32. 2
      docs/sources/developers/plugins/legacy/panels.md
  33. 2
      docs/sources/getting-started/getting-started-sql.md
  34. 8
      docs/sources/installation/docker.md
  35. 2
      docs/sources/installation/requirements.md
  36. 2
      docs/sources/installation/upgrading.md
  37. 6
      packages/README.md
  38. 2
      packages/grafana-e2e/README.md
  39. 6
      packages/grafana-toolkit/README.md
  40. 4
      packages/grafana-toolkit/docker/grafana-plugin-ci-alpine/install/bin/ginstall
  41. 4
      packages/grafana-toolkit/docker/grafana-plugin-ci-e2e/install/ginstall
  42. 4
      packages/grafana-toolkit/docker/grafana-plugin-ci/install/gget
  43. 4
      packages/grafana-ui/README.md
  44. 6
      packages/grafana-ui/src/Intro.story.mdx
  45. 2
      packages/grafana-ui/src/components/DataSourceSettings/DataSourceHttpSettings.mdx
  46. 6
      packaging/docker/build-enterprise.sh
  47. 4
      packaging/docker/build.sh
  48. 4
      packaging/docker/push_to_docker_hub.sh
  49. 12
      pkg/README.md
  50. 2
      pkg/cmd/grafana-cli/main.go
  51. 2
      pkg/cmd/grafana-server/main.go
  52. 2
      pkg/plugins/manager/update_checker.go
  53. 2
      pkg/services/sqlstore/migrations/migrations.go
  54. 2
      pkg/tsdb/azuremonitor/azuremonitor-datasource.go
  55. 2
      public/app/plugins/datasource/testdata/TestInfoTab.tsx
  56. 4
      public/app/plugins/panel/annolist/AnnoListPanel.tsx
  57. 2
      scripts/build/ci-msi-build/Dockerfile
  58. 2
      scripts/build/release_publisher/main.go
  59. 2
      scripts/ci-job-failed.sh
  60. 2
      scripts/ci-job-succeeded.sh
  61. 2
      scripts/ci-reference-docs-lint.sh
  62. 2
      scripts/circle-test-frontend.sh
  63. 18
      scripts/lib.star
  64. 34
      scripts/main.star
  65. 4
      scripts/tag_release.sh
  66. 2
      scripts/trigger_windows_build.sh

@ -2,9 +2,9 @@ version: 2.1
aliases: aliases:
# Workflow filters # Workflow filters
- &filter-only-master - &filter-only-main
branches: branches:
only: master only: main
jobs: jobs:
scan-docker-image: scan-docker-image:
@ -51,10 +51,10 @@ workflows:
triggers: triggers:
- schedule: - schedule:
cron: "0 0 * * *" cron: "0 0 * * *"
filters: *filter-only-master filters: *filter-only-main
jobs: jobs:
- scan-docker-image: - scan-docker-image:
matrix: matrix:
parameters: parameters:
image: [grafana/grafana, grafana/grafana-enterprise] image: [grafana/grafana, grafana/grafana-enterprise]
tag: [latest, master, latest-ubuntu, master-ubuntu] tag: [latest, main, latest-ubuntu, main-ubuntu]

@ -1,9 +1,9 @@
load('scripts/pr.star', 'pr_pipelines') load('scripts/pr.star', 'pr_pipelines')
load('scripts/master.star', 'master_pipelines') load('scripts/main.star', 'main_pipelines')
load('scripts/release.star', 'release_pipelines', 'test_release_pipelines') load('scripts/release.star', 'release_pipelines', 'test_release_pipelines')
load('scripts/version.star', 'version_branch_pipelines') load('scripts/version.star', 'version_branch_pipelines')
def main(ctx): def main(ctx):
edition = 'oss' edition = 'oss'
return pr_pipelines(edition=edition) + master_pipelines(edition=edition) + release_pipelines() + \ return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \
test_release_pipelines() + version_branch_pipelines() test_release_pipelines() + version_branch_pipelines()

@ -17,7 +17,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- ./bin/grabpl verify-drone - ./bin/grabpl verify-drone
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
@ -235,7 +235,7 @@ trigger:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: build-master name: build-main
platform: platform:
os: linux os: linux
@ -251,7 +251,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- ./bin/grabpl verify-drone - ./bin/grabpl verify-drone
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
@ -551,14 +551,14 @@ services:
trigger: trigger:
branch: branch:
- master - main
event: event:
- push - push
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: windows-master name: windows-main
platform: platform:
os: windows os: windows
@ -575,7 +575,7 @@ steps:
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
commands: commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/windows/grabpl.exe -OutFile grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- .\grabpl.exe verify-drone - .\grabpl.exe verify-drone
- name: build-windows-installer - name: build-windows-installer
@ -589,8 +589,8 @@ steps:
- cp C:\App\nssm-2.24.zip . - cp C:\App\nssm-2.24.zip .
- .\grabpl.exe windows-installer --edition oss --build-id $$env:DRONE_BUILD_NUMBER - .\grabpl.exe windows-installer --edition oss --build-id $$env:DRONE_BUILD_NUMBER
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0] - $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
- gsutil cp $$fname gs://grafana-downloads/oss/master/ - gsutil cp $$fname gs://grafana-downloads/oss/main/
- gsutil cp "$$fname.sha256" gs://grafana-downloads/oss/master/ - gsutil cp "$$fname.sha256" gs://grafana-downloads/oss/main/
environment: environment:
GCP_KEY: GCP_KEY:
from_secret: gcp_key from_secret: gcp_key
@ -599,17 +599,17 @@ steps:
trigger: trigger:
branch: branch:
- master - main
event: event:
- push - push
depends_on: depends_on:
- build-master - build-main
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: publish-master name: publish-main
platform: platform:
os: linux os: linux
@ -625,7 +625,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- ./bin/grabpl verify-drone - ./bin/grabpl verify-drone
environment: environment:
@ -652,18 +652,18 @@ steps:
trigger: trigger:
branch: branch:
- master - main
event: event:
- push - push
depends_on: depends_on:
- build-master - build-main
- windows-master - windows-main
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: notify-master name: notify-main
platform: platform:
os: linux os: linux
@ -680,16 +680,16 @@ steps:
trigger: trigger:
branch: branch:
- master - main
event: event:
- push - push
status: status:
- failure - failure
depends_on: depends_on:
- build-master - build-main
- windows-master - windows-main
- publish-master - publish-main
--- ---
kind: pipeline kind: pipeline
@ -710,7 +710,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- ./bin/grabpl verify-drone - ./bin/grabpl verify-drone
- ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl verify-version ${DRONE_TAG}
@ -1009,7 +1009,7 @@ steps:
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
commands: commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/windows/grabpl.exe -OutFile grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- .\grabpl.exe verify-drone - .\grabpl.exe verify-drone
- name: build-windows-installer - name: build-windows-installer
@ -1060,7 +1060,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise - cd grafana-enterprise
@ -1474,7 +1474,7 @@ steps:
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
commands: commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/windows/grabpl.exe -OutFile grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise - cd grafana-enterprise
- git checkout ${DRONE_TAG} - git checkout ${DRONE_TAG}
@ -1540,7 +1540,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- ./bin/grabpl verify-drone - ./bin/grabpl verify-drone
- ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl verify-version ${DRONE_TAG}
@ -1645,7 +1645,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- ./bin/grabpl verify-drone - ./bin/grabpl verify-drone
- ./bin/grabpl verify-version v7.3.0-test - ./bin/grabpl verify-version v7.3.0-test
@ -1933,7 +1933,7 @@ steps:
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
commands: commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/windows/grabpl.exe -OutFile grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- .\grabpl.exe verify-drone - .\grabpl.exe verify-drone
- name: build-windows-installer - name: build-windows-installer
@ -1984,11 +1984,11 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise - cd grafana-enterprise
- git checkout master - git checkout main
environment: environment:
GITHUB_TOKEN: GITHUB_TOKEN:
from_secret: github_token from_secret: github_token
@ -2392,10 +2392,10 @@ steps:
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
commands: commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/windows/grabpl.exe -OutFile grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise - cd grafana-enterprise
- git checkout master - git checkout main
environment: environment:
GITHUB_TOKEN: GITHUB_TOKEN:
from_secret: github_token from_secret: github_token
@ -2458,7 +2458,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- ./bin/grabpl verify-drone - ./bin/grabpl verify-drone
- ./bin/grabpl verify-version v7.3.0-test - ./bin/grabpl verify-version v7.3.0-test
@ -2563,7 +2563,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- ./bin/grabpl verify-drone - ./bin/grabpl verify-drone
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
@ -2826,7 +2826,7 @@ steps:
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
commands: commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/windows/grabpl.exe -OutFile grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- .\grabpl.exe verify-drone - .\grabpl.exe verify-drone
- name: build-windows-installer - name: build-windows-installer
@ -2873,7 +2873,7 @@ steps:
image: grafana/build-container:1.4.1 image: grafana/build-container:1.4.1
commands: commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise - cd grafana-enterprise
@ -3284,7 +3284,7 @@ steps:
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
commands: commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.57/windows/grabpl.exe -OutFile grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise - cd grafana-enterprise
- git checkout $$env:DRONE_BRANCH - git checkout $$env:DRONE_BRANCH

@ -25,9 +25,9 @@ ___
**Implementation** (Checklist meant for the person implementing the component) **Implementation** (Checklist meant for the person implementing the component)
- [ ] Component has a story in Storybook. - [ ] Component has a story in Storybook.
- [ ] Props and naming follows [our style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/frontend.md). - [ ] Props and naming follows [our style guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/frontend.md).
- [ ] It is extendable (rest props are spread, styles with className work, and so on). - [ ] It is extendable (rest props are spread, styles with className work, and so on).
- [ ] Uses [theme for spacing, colors, and so on](https://github.com/grafana/grafana/blob/master/contribute/style-guides/themes.md). - [ ] Uses [theme for spacing, colors, and so on](https://github.com/grafana/grafana/blob/main/contribute/style-guides/themes.md).
- [ ] Works with both light and dark theme. - [ ] Works with both light and dark theme.
**Documentation** **Documentation**

@ -2,7 +2,7 @@
Thank you for sending a pull request! Here are some tips: Thank you for sending a pull request! Here are some tips:
1. If this is your first time, please read our contribution guide at https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md 1. If this is your first time, please read our contribution guide at https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md
2. Ensure you include and run the appropriate tests as part of your Pull Request. 2. Ensure you include and run the appropriate tests as part of your Pull Request.
@ -10,7 +10,7 @@ Thank you for sending a pull request! Here are some tips:
4. If the Pull Request is a work in progress, make use of GitHub's "Draft PR" feature and mark it as such. 4. If the Pull Request is a work in progress, make use of GitHub's "Draft PR" feature and mark it as such.
5. If you can not merge your Pull Request due to a merge conflict, Rebase it. This gets it in sync with the master branch. 5. If you can not merge your Pull Request due to a merge conflict, Rebase it. This gets it in sync with the main branch.
6. Name your PR as "<FeatureArea>: Describe your change", e.g. Alerting: Prevent race condition. If it's a fix or feature relevant for the changelog describe the user impact in the title. The PR title is used to auto-generate the changelog for issues marked with the "add to changelog" label. 6. Name your PR as "<FeatureArea>: Describe your change", e.g. Alerting: Prevent race condition. If it's a fix or feature relevant for the changelog describe the user impact in the title. The PR title is used to auto-generate the changelog for issues marked with the "add to changelog" label.

@ -1,6 +1,6 @@
# GitHub & grafanabot automation # GitHub & grafanabot automation
The bot is configured via [commands.json](https://github.com/grafana/grafana/blob/master/.github/commands.json) and some other GitHub workflows [workflows](https://github.com/grafana/grafana/tree/master/.github/workflows). The bot is configured via [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json) and some other GitHub workflows [workflows](https://github.com/grafana/grafana/tree/main/.github/workflows).
Comment commands: Comment commands:
@ -17,7 +17,7 @@ Label commands:
## Metrics ## Metrics
Metrics are configured in [metrics-collector.json](https://github.com/grafana/grafana/blob/master/.github/metrics-collector.json) and are also defined in the Metrics are configured in [metrics-collector.json](https://github.com/grafana/grafana/blob/main/.github/metrics-collector.json) and are also defined in the
[metrics-collector](https://github.com/grafana/grafana-github-actions/blob/main/metrics-collector/index.ts) GitHub action. [metrics-collector](https://github.com/grafana/grafana-github-actions/blob/main/metrics-collector/index.ts) GitHub action.
## Backport PR ## Backport PR

@ -5,7 +5,7 @@
"addLabel": "type/question", "addLabel": "type/question",
"removeLabel": "bot/question", "removeLabel": "bot/question",
"action": "close", "action": "close",
"comment": "Please ask your question on [community.grafana.com/](https://community.grafana.com/). To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!" "comment": "Please ask your question on [community.grafana.com/](https://community.grafana.com/). To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
}, },
{ {
"type": "comment", "type": "comment",
@ -20,7 +20,7 @@
"addLabel": "type/duplicate", "addLabel": "type/duplicate",
"removeLabel": "bot/duplicate", "removeLabel": "bot/duplicate",
"action": "close", "action": "close",
"comment": "Thanks for creating this issue! It looks like this has already been reported by another user. We’ve closed this in favor of the existing one. Please consider adding any details you think is missing to that issue.\n\nTo avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!" "comment": "Thanks for creating this issue! It looks like this has already been reported by another user. We’ve closed this in favor of the existing one. Please consider adding any details you think is missing to that issue.\n\nTo avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
}, },
{ {
"type": "comment", "type": "comment",
@ -41,7 +41,7 @@
"type": "label", "type": "label",
"name": "bot/no new info", "name": "bot/no new info",
"action": "close", "action": "close",
"comment": "We've closed this issue since it needs more information and hasn't had any activity recently. We can re-open it after you you add more information. To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!" "comment": "We've closed this issue since it needs more information and hasn't had any activity recently. We can re-open it after you you add more information. To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
}, },
{ {
"type": "label", "type": "label",

@ -15,7 +15,7 @@ jobs:
with: with:
text: ${{ github.event.inputs.version }} text: ${{ github.event.inputs.version }}
regex: '^(\d+.\d+).\d+(?:-beta.\d+)?$' regex: '^(\d+.\d+).\d+(?:-beta.\d+)?$'
- name: Validate input version - name: Validate input version
if: ${{ steps.regex-match.outputs.match == '' }} if: ${{ steps.regex-match.outputs.match == '' }}
run: | run: |
@ -24,29 +24,29 @@ jobs:
example: 7.4.3 or 7.4.3-beta.1" example: 7.4.3 or 7.4.3-beta.1"
exit 1 exit 1
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set intermedia variables - name: Set intermedia variables
id: intermedia id: intermedia
run: | run: |
echo "::set-output name=short_ref::${GITHUB_REF#refs/*/}" echo "::set-output name=short_ref::${GITHUB_REF#refs/*/}"
echo "::set-output name=check_passed::false" echo "::set-output name=check_passed::false"
echo "::set-output name=branch_name::v${{steps.regex-match.outputs.group1}}" echo "::set-output name=branch_name::v${{steps.regex-match.outputs.group1}}"
echo "::set-output name=branch_exist::$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)" echo "::set-output name=branch_exist::$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)"
- name: Check input version is aligned with branch(not master) - name: Check input version is aligned with branch(not main)
if: steps.intermedia.outputs.branch_exist != '0' && !contains(steps.intermedia.outputs.short_ref, steps.intermedia.outputs.branch_name) if: steps.intermedia.outputs.branch_exist != '0' && !contains(steps.intermedia.outputs.short_ref, steps.intermedia.outputs.branch_name)
run: | run: |
echo " You need to run the workflow on branch v${{steps.regex-match.outputs.group1}}.x echo " You need to run the workflow on branch v${{steps.regex-match.outputs.group1}}.x
exit 1 exit 1
- name: Check input version is aligned with branch(master) - name: Check input version is aligned with branch(main)
if: steps.intermedia.outputs.branch_exist == '0' && !contains(steps.intermedia.outputs.short_ref, 'main') if: steps.intermedia.outputs.branch_exist == '0' && !contains(steps.intermedia.outputs.short_ref, 'main')
run: | run: |
echo "When you want to deliver a new new minor version, you might want to create a new branch first \ echo "When you want to deliver a new new minor version, you might want to create a new branch first \
with naming convention v[major].[minor].x, and just run the workflow on that branch. \ with naming convention v[major].[minor].x, and just run the workflow on that branch. \
Run the workflow on master only when needed" Run the workflow on main only when needed"
exit 1 exit 1
- name: Checkout Actions - name: Checkout Actions
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:

@ -7,10 +7,10 @@ name: "CodeQL"
on: on:
push: push:
branches: [master, v1.8.x, v2.0.x, v2.1.x, v2.6.x, v3.0.x, v3.1.x, v4.0.x, v4.1.x, v4.2.x, v4.3.x, v4.4.x, v4.5.x, v4.6.x, v4.7.x, v5.0.x, v5.1.x, v5.2.x, v5.3.x, v5.4.x, v6.0.x, v6.1.x, v6.2.x, v6.3.x, v6.4.x, v6.5.x, v6.6.x, v6.7.x, v7.0.x, v7.1.x, v7.2.x] branches: [main, v1.8.x, v2.0.x, v2.1.x, v2.6.x, v3.0.x, v3.1.x, v4.0.x, v4.1.x, v4.2.x, v4.3.x, v4.4.x, v4.5.x, v4.6.x, v4.7.x, v5.0.x, v5.1.x, v5.2.x, v5.3.x, v5.4.x, v6.0.x, v6.1.x, v6.2.x, v6.3.x, v6.4.x, v6.5.x, v6.6.x, v6.7.x, v7.0.x, v7.1.x, v7.2.x]
pull_request: pull_request:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [master] branches: [main]
schedule: schedule:
- cron: '0 4 * * 6' - cron: '0 4 * * 6'
@ -42,7 +42,7 @@ jobs:
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file. # By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file. # Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main # queries: ./path/to/local/query, your-org/your-repo/queries@main

@ -3,7 +3,7 @@ name: publish_docs
on: on:
push: push:
branches: branches:
- master - main
paths: paths:
- 'docs/sources/**' - 'docs/sources/**'
- 'packages/grafana-*/**' - 'packages/grafana-*/**'

@ -76,4 +76,4 @@ Before we can accept your pull request, you need to [sign our CLA](https://grafa
- Set up your [development environment](contribute/developer-guide.md). - Set up your [development environment](contribute/developer-guide.md).
- Learn how to [contribute documentation](contribute/documentation.md). - Learn how to [contribute documentation](contribute/documentation.md).
- Get started [developing plugins](https://grafana.com/docs/grafana/latest/developers/plugins/) for Grafana. - Get started [developing plugins](https://grafana.com/docs/grafana/latest/developers/plugins/) for Grafana.
- Look through the resources in the [contribute](https://github.com/grafana/grafana/tree/master/contribute) folder. - Look through the resources in the [contribute](https://github.com/grafana/grafana/tree/main/contribute) folder.

@ -198,8 +198,8 @@ The ex-member is
If needed, we reserve the right to publicly announce removal. If needed, we reserve the right to publicly announce removal.
[coc]: https://github.com/grafana/grafana/blob/master/CODE_OF_CONDUCT.md [coc]: https://github.com/grafana/grafana/blob/main/CODE_OF_CONDUCT.md
[devs]: https://groups.google.com/forum/#!forum/grafana-developers [devs]: https://groups.google.com/forum/#!forum/grafana-developers
[maintainers]: https://github.com/grafana/grafana/blob/master/MAINTAINERS.md [maintainers]: https://github.com/grafana/grafana/blob/main/MAINTAINERS.md
[rough]: https://tools.ietf.org/html/rfc7282 [rough]: https://tools.ietf.org/html/rfc7282
[team]: https://groups.google.com/forum/#!forum/grafana-team [team]: https://groups.google.com/forum/#!forum/grafana-team

@ -301,12 +301,12 @@ Even if you don't have the time or knowledge to investigate an issue we highly r
## Automation ## Automation
We have some automation that triggers on comments or labels being added to issues. Many of these automated behaviors are defined in [commands.json](https://github.com/grafana/grafana/blob/master/.github/commands.json). Or in other [GitHub Actions](https://github.com/grafana/grafana/tree/master/.github/workflows) We have some automation that triggers on comments or labels being added to issues. Many of these automated behaviors are defined in [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json). Or in other [GitHub Actions](https://github.com/grafana/grafana/tree/main/.github/workflows)
* Add /duplicate `#<issue number>` to have Grafana label & close issue with an appropriate message. * Add /duplicate `#<issue number>` to have Grafana label & close issue with an appropriate message.
* Add `bot/question` and the bot will close it with an appropriate message. * Add `bot/question` and the bot will close it with an appropriate message.
[Read more on bot actions](https://github.com/grafana/grafana/blob/master/.github/bot.md) [Read more on bot actions](https://github.com/grafana/grafana/blob/main/.github/bot.md)
## External PRs ## External PRs

@ -17,7 +17,7 @@ for built-in plugins and everything internal. External plugins still use systemj
set of Grafana components they can import. Plugins can depend on libs like lodash & moment and internal components set of Grafana components they can import. Plugins can depend on libs like lodash & moment and internal components
like before using the same import paths. However since everything in Grafana is no longer accessible, a few plugins could encounter issues when importing a Grafana dependency. like before using the same import paths. However since everything in Grafana is no longer accessible, a few plugins could encounter issues when importing a Grafana dependency.
[List of exposed components plugins can import/require](https://github.com/grafana/grafana/blob/master/public/app/features/plugins/plugin_loader.ts#L48) [List of exposed components plugins can import/require](https://github.com/grafana/grafana/blob/main/public/app/features/plugins/plugin_loader.ts#L48)
If you think we missed exposing a crucial lib or Grafana component let us know by opening an issue. If you think we missed exposing a crucial lib or Grafana component let us know by opening an issue.

@ -68,7 +68,7 @@ Our builds run on CircleCI through our build script.
The main build step (in CircleCI) is built using a custom build container that comes pre-baked with some of the necessary dependencies. The main build step (in CircleCI) is built using a custom build container that comes pre-baked with some of the necessary dependencies.
Link: [grafana/build-container](https://github.com/grafana/grafana/tree/master/scripts/build/ci-build) Link: [grafana/build-container](https://github.com/grafana/grafana/tree/main/scripts/build/ci-build)
#### Dependencies #### Dependencies
@ -79,7 +79,7 @@ Link: [grafana/build-container](https://github.com/grafana/grafana/tree/master/s
### Appveyor ### Appveyor
Master and release builds trigger test runs on Appveyors build environment so that tests will run on Windows. Main and release builds trigger test runs on Appveyors build environment so that tests will run on Windows.
#### Files: #### Files:

@ -12,7 +12,7 @@ Team members and their access to repositories is maintained through [GitHub team
## Proposing changes ## Proposing changes
Examples of proposed changes are overarching architecture, component design, and specific code or graphical elements. Proposed changes SHOULD cover the big picture and intention, but individual parts SHOULD be split into the smallest possible changes. Changes SHOULD be based on and target the master branch. Depending on size of the proposed change, each change SHOULD be discussed, in increasing order of change size and complexity: Examples of proposed changes are overarching architecture, component design, and specific code or graphical elements. Proposed changes SHOULD cover the big picture and intention, but individual parts SHOULD be split into the smallest possible changes. Changes SHOULD be based on and target the main branch. Depending on size of the proposed change, each change SHOULD be discussed, in increasing order of change size and complexity:
- Directly in a RR (Pull Request) - this MAY be done, but SHOULD not be the common case. - Directly in a RR (Pull Request) - this MAY be done, but SHOULD not be the common case.
- Issue - Issue
- Developer mailing list - Developer mailing list
@ -23,7 +23,7 @@ Significant changes MUST be discussed and agreed upon with the relevant subsyste
## Merging PRs (Pull Requests) ## Merging PRs (Pull Requests)
Depending on the size and complexity of a PR, different requirements MUST be applied. Any team member contributing substantially to a PR MUST NOT count against review requirements. Depending on the size and complexity of a PR, different requirements MUST be applied. Any team member contributing substantially to a PR MUST NOT count against review requirements.
Commits MUST be merged into master using PRs. They MUST NOT be merged into master directly. Commits MUST be merged into main using PRs. They MUST NOT be merged into main directly.
- Every merge MUST be approved by at least one team member. - Every merge MUST be approved by at least one team member.
- Non-trivial changes MUST be approved by at least - Non-trivial changes MUST be approved by at least
- two team members, or - two team members, or
@ -40,7 +40,7 @@ Once a PR is approved as per above, any team member MAY merge the PR.
## Backporting a PR ## Backporting a PR
PRs intended for inclusion in the next PATCH release they must be backported to the release branch. The bot can do this automatically. [Read more on backport PRs](https://github.com/grafana/grafana/blob/master/.github/bot.md). Both the source PR and the backport PR should be assigned to the patch release milestone, unless you are backporting to many releases then it can differ. PRs intended for inclusion in the next PATCH release they must be backported to the release branch. The bot can do this automatically. [Read more on backport PRs](https://github.com/grafana/grafana/blob/main/.github/bot.md). Both the source PR and the backport PR should be assigned to the patch release milestone, unless you are backporting to many releases then it can differ.
Backport PRs are also needed during the beta period to get fixes into the stable release. Backport PRs are also needed during the beta period to get fixes into the stable release.
@ -51,7 +51,7 @@ Backport PRs are also needed during the beta period to get fixes into the stable
Grafana uses trunk-based development. Grafana uses trunk-based development.
In particular, we found that the following principles match how we work: In particular, we found that the following principles match how we work:
- Master and release branches MUST always build without failure. - Main and release branches MUST always build without failure.
- Branches SHOULD be merged often. Larger changes SHOULD be activated with feature flags until they are ready. Long-lived development branches SHOULD be avoided. - Branches SHOULD be merged often. Larger changes SHOULD be activated with feature flags until they are ready. Long-lived development branches SHOULD be avoided.
- Changes MAY be enabled by default once they are in a complete state - Changes MAY be enabled by default once they are in a complete state
- Changes which span multiple PRs MUST be described in an overarching issue or Google Doc. - Changes which span multiple PRs MUST be described in an overarching issue or Google Doc.
@ -61,8 +61,8 @@ In particular, we found that the following principles match how we work:
Releases MUST follow [Semantic Versioning](https://semver.org/) in naming and SHOULD follow Semantic Versioning as closely as reasonably possible for non-library software. Releases MUST follow [Semantic Versioning](https://semver.org/) in naming and SHOULD follow Semantic Versioning as closely as reasonably possible for non-library software.
Release branches MUST be split from the following branches. Release branches MUST be split from the following branches.
- MAJOR release branches MUST be based on master. - MAJOR release branches MUST be based on main.
- MINOR release branches MUST be based on master. - MINOR release branches MUST be based on main.
- PATCH release branches MUST be split from the relevant MINOR release branch’s most current PATCH - PATCH release branches MUST be split from the relevant MINOR release branch’s most current PATCH
Security releases follow the same process but MUST be prepared in secret. Security releases MUST NOT include changes which are not related to the security fix. Normal release processes MUST accommodate the security release process. SECURITY.md MUST be followed. Security releases follow the same process but MUST be prepared in secret. Security releases MUST NOT include changes which are not related to the security fix. Normal release processes MUST accommodate the security release process. SECURITY.md MUST be followed.

@ -356,7 +356,7 @@ func setBuildEnv() {
func getGitBranch() string { func getGitBranch() string {
v, err := runError("git", "rev-parse", "--abbrev-ref", "HEAD") v, err := runError("git", "rev-parse", "--abbrev-ref", "HEAD")
if err != nil { if err != nil {
return "master" return "main"
} }
return string(v) return string(v)
} }

@ -79,7 +79,7 @@ To see all the types of migrations you can add, refer to [migrations.go](/pkg/se
Before you add a migration, make sure that you: Before you add a migration, make sure that you:
- Never change a migration that has been committed and pushed to master. - Never change a migration that has been committed and pushed to main.
- Always add new migrations, to change or undo previous migrations. - Always add new migrations, to change or undo previous migrations.
Add a migration using one of the following methods: Add a migration using one of the following methods:

@ -12,7 +12,7 @@ If we wait for canceled requests to complete, it might create unnecessary load o
Grafana uses a concept called _request cancelation_ to cancel any ongoing request that Grafana doesn't need. Grafana uses a concept called _request cancelation_ to cancel any ongoing request that Grafana doesn't need.
#### Before Grafana 7.2 #### Before Grafana 7.2
Before Grafana can cancel any data request, it has to identify that request. Grafana identifies a request using the property `requestId` [passed as options](https://github.com/grafana/grafana/blob/master/docs/sources/packages_api/runtime/backendsrvrequest.md) when you use [BackendSrv](https://grafana.com/docs/grafana/latest/packages_api/runtime/backendsrv). Before Grafana can cancel any data request, it has to identify that request. Grafana identifies a request using the property `requestId` [passed as options](https://github.com/grafana/grafana/blob/main/docs/sources/packages_api/runtime/backendsrvrequest.md) when you use [BackendSrv](https://grafana.com/docs/grafana/latest/packages_api/runtime/backendsrv).
The cancellation logic is as follows: The cancellation logic is as follows:
- When an ongoing request discovers that an additional request with the same `requestId` has started, then Grafana will cancel the ongoing request. - When an ongoing request discovers that an additional request with the same `requestId` has started, then Grafana will cancel the ongoing request.

@ -19,7 +19,7 @@ To increase the chance of having your pull request accepted, make sure your pull
- Commits within the pull request follow the [Formatting guidelines](#Formatting-guidelines). - Commits within the pull request follow the [Formatting guidelines](#Formatting-guidelines).
- The pull request closes one related issue. - The pull request closes one related issue.
- The pull request contains necessary tests that verify the intended behavior. - The pull request contains necessary tests that verify the intended behavior.
- If your pull request has conflicts, rebase your branch onto the master branch. - If your pull request has conflicts, rebase your branch onto the main branch.
If the pull request fixes a bug: If the pull request fixes a bug:

@ -20,7 +20,7 @@ We use the standard following linters:
In addition to the standard linters, we also use: In addition to the standard linters, we also use:
- [revive](https://revive.run/) with a [custom config](https://github.com/grafana/grafana/blob/master/conf/revive.toml) - [revive](https://revive.run/) with a [custom config](https://github.com/grafana/grafana/blob/main/conf/revive.toml)
- [GolangCI-Lint](https://github.com/golangci/golangci-lint) - [GolangCI-Lint](https://github.com/golangci/golangci-lint)
- [gosec](https://github.com/securego/gosec) - [gosec](https://github.com/securego/gosec)

@ -114,7 +114,7 @@ If that is the case, then use the following format for headings:
- Assume all graphics will be exclusively viewed on the web. - Assume all graphics will be exclusively viewed on the web.
- Maximum image size is 3840px X 2160px. - Maximum image size is 3840px X 2160px.
- Screenshots should be readable, but not too large. - Screenshots should be readable, but not too large.
- _Do not_ use image shortcodes. Follow the guidance in the [Grafana markdown guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/documentation-markdown-guide.md#images). - _Do not_ use image shortcodes. Follow the guidance in the [Grafana markdown guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/documentation-markdown-guide.md#images).
- Markdown image links are preferred. Only use the HTML image links if you need to style the image in ways unsupported in Markdown. - Markdown image links are preferred. Only use the HTML image links if you need to style the image in ways unsupported in Markdown.
- When you name a file, follow the [file naming conventions](#file-naming-conventions). Example: image-name-7-3.png - When you name a file, follow the [file naming conventions](#file-naming-conventions). Example: image-name-7-3.png

@ -147,7 +147,7 @@ The [controls addon](https://storybook.js.org/docs/react/essentials/controls) pr
#### Migrating a story from Knobs to Controls #### Migrating a story from Knobs to Controls
As a test, we migrated the [button story](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/src/components/Button/Button.story.tsx). Here's the guide on how to migrate a story to controls. As a test, we migrated the [button story](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/src/components/Button/Button.story.tsx). Here's the guide on how to migrate a story to controls.
1. Remove the `@storybook/addon-knobs` dependency. 1. Remove the `@storybook/addon-knobs` dependency.
2. Import the Story type from `@storybook/react` 2. Import the Story type from `@storybook/react`

@ -44,6 +44,6 @@ Images are currently hosted in the grafana/website repo.
## Deploy changes to grafana.com ## Deploy changes to grafana.com
When a PR is merged to master with changes in the `docs/sources` directory, those changes are automatically synced to the grafana/website repo and published to the staging site. When a PR is merged to main with changes in the `docs/sources` directory, those changes are automatically synced to the grafana/website repo and published to the staging site.
Generally, someone from marketing will publish to production each day: so as long as the sync is successful your docs edits will be published. Alternatively, you can refer to [publishing to production](https://github.com/grafana/website#publishing-to-production-grafanacom) if you'd like to do it yourself. Generally, someone from marketing will publish to production each day: so as long as the sync is successful your docs edits will be published. Alternatively, you can refer to [publishing to production](https://github.com/grafana/website#publishing-to-production-grafanacom) if you'd like to do it yourself.

@ -58,7 +58,7 @@ version: '2'
services: services:
grafana: grafana:
image: grafana/grafana:master image: grafana/grafana:main
ports: ports:
- "3000:3000" - "3000:3000"
environment: environment:

@ -153,7 +153,7 @@ types of template variables.
### List of supported Azure Monitor metrics ### List of supported Azure Monitor metrics
Not all metrics returned by the Azure Monitor Metrics API have values. To make it easier for you when building a query, the Grafana data source has a list of supported metrics and ignores metrics which will never have values. This list is updated regularly as new services and metrics are added to the Azure cloud. For more information about the list of metrics, refer to [current supported namespaces](https://github.com/grafana/grafana/blob/master/public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/supported_namespaces.ts). Not all metrics returned by the Azure Monitor Metrics API have values. To make it easier for you when building a query, the Grafana data source has a list of supported metrics and ignores metrics which will never have values. This list is updated regularly as new services and metrics are added to the Azure cloud. For more information about the list of metrics, refer to [current supported namespaces](https://github.com/grafana/grafana/blob/main/public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/supported_namespaces.ts).
### Alerting ### Alerting

@ -11,32 +11,32 @@ This page lists resources for developers who want to contribute to the Grafana s
These resources are useful for all developers. These resources are useful for all developers.
- [Contributing to Grafana](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md): Start here to learn how you can contribute your skills to make Grafana even better. - [Contributing to Grafana](https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md): Start here to learn how you can contribute your skills to make Grafana even better.
- [Developer guide](https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md): A guide to help you get started developing Grafana software, includes instructions for how to configure Grafana for development. - [Developer guide](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md): A guide to help you get started developing Grafana software, includes instructions for how to configure Grafana for development.
- [Contributing to documentation](https://github.com/grafana/grafana/blob/master/contribute/documentation.md): A guide to help you contribute to Grafana documentation, includes links to beginner-friendly issues. - [Contributing to documentation](https://github.com/grafana/grafana/blob/main/contribute/documentation.md): A guide to help you contribute to Grafana documentation, includes links to beginner-friendly issues.
- [Architecture guides](https://github.com/grafana/grafana/tree/master/contribute/architecture): These guides explain Grafana’s background architecture. - [Architecture guides](https://github.com/grafana/grafana/tree/main/contribute/architecture): These guides explain Grafana’s background architecture.
- [Create a pull request](https://github.com/grafana/grafana/blob/master/contribute/create-pull-request.md): A guide for new contributors about how to create your first Grafana pull request. - [Create a pull request](https://github.com/grafana/grafana/blob/main/contribute/create-pull-request.md): A guide for new contributors about how to create your first Grafana pull request.
- [REST APIs](https://grafana.com/docs/grafana/next/http_api/) allow you to interact programmatically with the Grafana backend. - [REST APIs](https://grafana.com/docs/grafana/next/http_api/) allow you to interact programmatically with the Grafana backend.
## Best practices and style ## Best practices and style
Our [style guides](https://github.com/grafana/grafana/tree/master/contribute/style-guides) outline Grafana style for frontend, backend, documentation, and more, including best practices. Please read through them before you start editing or coding! Our [style guides](https://github.com/grafana/grafana/tree/main/contribute/style-guides) outline Grafana style for frontend, backend, documentation, and more, including best practices. Please read through them before you start editing or coding!
- [Backend style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/backend.md) explains how we want to write Go code in the future. - [Backend style guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/backend.md) explains how we want to write Go code in the future.
- [Documentation style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/documentation-style-guide.md) applies to all documentation created for Grafana products. - [Documentation style guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/documentation-style-guide.md) applies to all documentation created for Grafana products.
- [End to end test framework](https://github.com/grafana/grafana/blob/master/contribute/style-guides/e2e.md) provides guidance for Grafana e2e tests. - [End to end test framework](https://github.com/grafana/grafana/blob/main/contribute/style-guides/e2e.md) provides guidance for Grafana e2e tests.
- [Frontend style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/frontend.md) provides rules and guidance on developing in React for Grafana. - [Frontend style guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/frontend.md) provides rules and guidance on developing in React for Grafana.
- [Redux framework](https://github.com/grafana/grafana/blob/master/contribute/style-guides/redux.md) explains how Grafana handles Redux boilerplate code. - [Redux framework](https://github.com/grafana/grafana/blob/main/contribute/style-guides/redux.md) explains how Grafana handles Redux boilerplate code.
- [Styling Grafana](https://github.com/grafana/grafana/blob/master/contribute/style-guides/styling.md) expands on styling React components with Emotion. - [Styling Grafana](https://github.com/grafana/grafana/blob/main/contribute/style-guides/styling.md) expands on styling React components with Emotion.
- [Theming Grafana](https://github.com/grafana/grafana/blob/master/contribute/style-guides/themes.md) explains how to use themes and ThemeContext in Grafana code. - [Theming Grafana](https://github.com/grafana/grafana/blob/main/contribute/style-guides/themes.md) explains how to use themes and ThemeContext in Grafana code.

@ -173,7 +173,7 @@ The data frame structure is inspired by, and uses the [Apache Arrow Project](htt
### Javascript ### Javascript
The Javascript implementation of data frames is in the [`/src/dataframe` folder](https://github.com/grafana/grafana/tree/master/packages/grafana-data/src/dataframe) and [`/src/types/dataframe.ts`](https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/dataFrame.ts) of the [`@grafana/data` package](https://github.com/grafana/grafana/tree/master/packages/grafana-data). The Javascript implementation of data frames is in the [`/src/dataframe` folder](https://github.com/grafana/grafana/tree/main/packages/grafana-data/src/dataframe) and [`/src/types/dataframe.ts`](https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/types/dataFrame.ts) of the [`@grafana/data` package](https://github.com/grafana/grafana/tree/main/packages/grafana-data).
### Go ### Go

@ -44,7 +44,7 @@ try {
} }
``` ```
> **Note:** Grafana displays the exception message in the UI as written, so we recommend using grammatically correct sentences. For more information, refer to the [Documentation style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/documentation-style-guide.md). > **Note:** Grafana displays the exception message in the UI as written, so we recommend using grammatically correct sentences. For more information, refer to the [Documentation style guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/documentation-style-guide.md).
Here are some examples of situations where you might want to display an error to the user. Here are some examples of situations where you might want to display an error to the user.

@ -13,7 +13,7 @@ Grafana already has a strong community of contributors and plugin developers. By
## Short version ## Short version
1. [Set up Grafana](https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md) 1. [Set up Grafana](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md)
1. Clone an example plugin into `/var/lib/grafana/plugins` or `data/plugins` (relative to grafana git repo if you're running development version from source dir) 1. Clone an example plugin into `/var/lib/grafana/plugins` or `data/plugins` (relative to grafana git repo if you're running development version from source dir)
1. Use one of our example plugins as a starting point 1. Use one of our example plugins as a starting point
@ -39,7 +39,7 @@ You can use any build system that supports systemjs. All the built content shoul
## Keep your plugin up to date ## Keep your plugin up to date
New versions of Grafana can sometimes cause plugins to break. Check out our [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/master/PLUGIN_DEV.md) doc for changes in New versions of Grafana can sometimes cause plugins to break. Check out our [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/main/PLUGIN_DEV.md) doc for changes in
Grafana that can impact your plugin. Grafana that can impact your plugin.
## Metadata ## Metadata
@ -55,7 +55,7 @@ and [apps]({{< relref "apps.md" >}}) plugins in the documentation.
The Grafana SDK is quite small so far and can be found here: The Grafana SDK is quite small so far and can be found here:
- [SDK file in Grafana](https://github.com/grafana/grafana/blob/master/public/app/plugins/sdk.ts) - [SDK file in Grafana](https://github.com/grafana/grafana/blob/main/public/app/plugins/sdk.ts)
The SDK contains three different plugin classes: PanelCtrl, MetricsPanelCtrl and QueryCtrl. For plugins of the panel type, the module.js file should export one of these. There are some extra classes for [data sources]({{< relref "data-sources.md" >}}). The SDK contains three different plugin classes: PanelCtrl, MetricsPanelCtrl and QueryCtrl. For plugins of the panel type, the module.js file should export one of these. There are some extra classes for [data sources]({{< relref "data-sources.md" >}}).
@ -85,7 +85,7 @@ export { WorldmapCtrl as PanelCtrl };
There are three ways that you can start developing a Grafana plugin. There are three ways that you can start developing a Grafana plugin.
1. Set up a Grafana development environment. [(described here)](https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md) and place your plugin in the `data/plugins` folder. 1. Set up a Grafana development environment. [(described here)](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md) and place your plugin in the `data/plugins` folder.
1. Install Grafana and place your plugin in the plugins directory which is set in your [config file](/administration/configuration). By default this is `/var/lib/grafana/plugins` on Linux systems. 1. Install Grafana and place your plugin in the plugins directory which is set in your [config file](/administration/configuration). By default this is `/var/lib/grafana/plugins` on Linux systems.
1. Place your plugin directory anywhere you like and specify it grafana.ini. 1. Place your plugin directory anywhere you like and specify it grafana.ini.
@ -114,7 +114,7 @@ We have three different examples that you can fork/download to get started devel
- [simple-json-datasource](https://github.com/grafana/simple-json-datasource) (small data source plugin for querying json data from backends) - [simple-json-datasource](https://github.com/grafana/simple-json-datasource) (small data source plugin for querying json data from backends)
- [simple-app-plugin](https://github.com/grafana/simple-app-plugin) - [simple-app-plugin](https://github.com/grafana/simple-app-plugin)
- [clock-panel](https://github.com/grafana/clock-panel) - [clock-panel](https://github.com/grafana/clock-panel)
- [singlestat-panel](https://github.com/grafana/grafana/tree/master/public/app/plugins/panel/singlestat) - [singlestat-panel](https://github.com/grafana/grafana/tree/main/public/app/plugins/panel/singlestat)
- [piechart-panel](https://github.com/grafana/piechart-panel) - [piechart-panel](https://github.com/grafana/piechart-panel)
## Other Articles ## Other Articles

@ -79,7 +79,7 @@ onInitEditMode() {
For editor tabs html, it is best to use Grafana css styles rather than custom styles. This is to preserve the look and feel of other tabs in Grafana. For editor tabs html, it is best to use Grafana css styles rather than custom styles. This is to preserve the look and feel of other tabs in Grafana.
Most editor tabs should use the [gf-form css class](https://github.com/grafana/grafana/blob/master/public/sass/components/_gf-form.scss) from Grafana. The example below has one row with a couple of columns and each column is wrapped in a div like this: Most editor tabs should use the [gf-form css class](https://github.com/grafana/grafana/blob/main/public/sass/components/_gf-form.scss) from Grafana. The example below has one row with a couple of columns and each column is wrapped in a div like this:
```html ```html
<div class="section gf-form-group"> <div class="section gf-form-group">

@ -24,4 +24,4 @@ In this case, make sure the template has a single `<div>...</div>` root. The pl
### Examples ### Examples
- [clock-panel](https://github.com/grafana/clock-panel) - [clock-panel](https://github.com/grafana/clock-panel)
- [singlestat-panel](https://github.com/grafana/grafana/tree/master/public/app/plugins/panel/singlestat) - [singlestat-panel](https://github.com/grafana/grafana/tree/main/public/app/plugins/panel/singlestat)

@ -39,7 +39,7 @@ To add MS SQL Server data source:
`User` | Database user's login/username. `User` | Database user's login/username.
`Password` | Database user's password. `Password` | Database user's password.
For installations from the [grafana/grafana](https://github.com/grafana/grafana/tree/master) repository, `gdev-mssql` data source is available. Once you add this data source, you can use the `Datasource tests - MSSQL` dashboard with three panels showing metrics generated from a test database. For installations from the [grafana/grafana](https://github.com/grafana/grafana/tree/main) repository, `gdev-mssql` data source is available. Once you add this data source, you can use the `Datasource tests - MSSQL` dashboard with three panels showing metrics generated from a test database.
<img src="/img/docs/getting-started/gdev-sql-dashboard.png" class="no-shadow" width="700px"> <img src="/img/docs/getting-started/gdev-sql-dashboard.png" class="no-shadow" width="700px">

@ -28,7 +28,7 @@ This image is based on [Ubuntu](https://ubuntu.com/), available in [the Ubuntu o
> **Note:** The `grafana/grafana:<version>-ubuntu` image is available for Grafana version 6.5.0 and later. > **Note:** The `grafana/grafana:<version>-ubuntu` image is available for Grafana version 6.5.0 and later.
## Run Grafana ## Run Grafana
You can run the latest Grafana version, run a specific version, or run an unstable version based on the master branch of the [grafana/grafana GitHub repository](https://github.com/grafana/grafana). You can run the latest Grafana version, run a specific version, or run an unstable version based on the main branch of the [grafana/grafana GitHub repository](https://github.com/grafana/grafana).
### Run the latest stable version of Grafana ### Run the latest stable version of Grafana
@ -51,11 +51,11 @@ docker run -d -p 3000:3000 --name grafana grafana/grafana:<version number>
docker run -d -p 3000:3000 --name grafana grafana/grafana:6.5.0 docker run -d -p 3000:3000 --name grafana grafana/grafana:6.5.0
``` ```
### Run the Grafana master branch ### Run the Grafana main branch
For every successful build of the master branch, we update the `grafana/grafana:master` and `grafana/grafana:master-ubuntu` tags. Additionally, two new tags are created, `grafana/grafana-dev:<version>-<build ID>pre` and `grafana/grafana-dev:<version>-<build ID>pre-ubuntu`, where *version* is the next version of Grafana and *build ID* is the ID of the corresponding CI build. Use these to get access to the latest master builds of Grafana. For every successful build of the main branch, we update the `grafana/grafana:main` and `grafana/grafana:main-ubuntu` tags. Additionally, two new tags are created, `grafana/grafana-dev:<version>-<build ID>pre` and `grafana/grafana-dev:<version>-<build ID>pre-ubuntu`, where *version* is the next version of Grafana and *build ID* is the ID of the corresponding CI build. Use these to get access to the latest main builds of Grafana.
When running Grafana master in production, we *strongly* recommend that you use the `grafana/grafana-dev:<version>-<build ID>pre` tag. This tag guarantees that you use a specific version of Grafana instead of whatever was the most recent commit at the time. When running Grafana main in production, we *strongly* recommend that you use the `grafana/grafana-dev:<version>-<build ID>pre` tag. This tag guarantees that you use a specific version of Grafana instead of whatever was the most recent commit at the time.
For a list of available tags, check out [grafana/grafana](https://hub.docker.com/r/grafana/grafana/tags/) and [grafana/grafana-dev](https://hub.docker.com/r/grafana/grafana-dev/tags/). For a list of available tags, check out [grafana/grafana](https://hub.docker.com/r/grafana/grafana/tags/) and [grafana/grafana-dev](https://hub.docker.com/r/grafana/grafana-dev/tags/).

@ -11,7 +11,7 @@ This page lists the minimum hardware and software requirements to install Grafan
To run Grafana, you must have a supported operating system, hardware that meets or exceeds minimum requirements, a supported database, and a supported browser. To run Grafana, you must have a supported operating system, hardware that meets or exceeds minimum requirements, a supported database, and a supported browser.
Grafana uses other open source software. Refer to [package.json](https://github.com/grafana/grafana/blob/master/package.json) for a complete list. Grafana uses other open source software. Refer to [package.json](https://github.com/grafana/grafana/blob/main/package.json) for a complete list.
## Supported operating systems ## Supported operating systems

@ -10,7 +10,7 @@ weight = 700
We recommend that you upgrade Grafana often to stay up to date with the latest fixes and enhancements. We recommend that you upgrade Grafana often to stay up to date with the latest fixes and enhancements.
In order to make this a reality, Grafana upgrades are backward compatible and the upgrade process is simple and quick. In order to make this a reality, Grafana upgrades are backward compatible and the upgrade process is simple and quick.
Upgrading is generally safe (between many minor and one major version) and dashboards and graphs will look the same. There may be minor breaking changes in some edge cases, which are outlined in the [Release Notes](https://community.grafana.com/c/releases) and [Changelog](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) Upgrading is generally safe (between many minor and one major version) and dashboards and graphs will look the same. There may be minor breaking changes in some edge cases, which are outlined in the [Release Notes](https://community.grafana.com/c/releases) and [Changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md)
## Backup ## Backup

@ -8,7 +8,7 @@ We use [Lerna](https://github.com/lerna/lerna) for packages versioning and relea
All packages are versioned according to the current Grafana version: All packages are versioned according to the current Grafana version:
- Grafana v6.3.0-alpha1 -> @grafana/* packages @ 6.3.0-alpha.1 - Grafana v6.3.0-alpha1 -> @grafana/* packages @ 6.3.0-alpha.1
- Grafana v6.2.5 -> @grafana/* packages @ 6.2.5 - Grafana v6.2.5 -> @grafana/* packages @ 6.2.5
- Grafana - master branch version (based on package.json, i.e. 6.4.0-pre) -> @grafana/* packages @ 6.4.0-pre-<COMMIT-SHA> (see details below about packages publishing channels) - Grafana - main branch version (based on package.json, i.e. 6.4.0-pre) -> @grafana/* packages @ 6.4.0-pre-<COMMIT-SHA> (see details below about packages publishing channels)
> Please note that @grafana/toolkit, @grafana/ui, @grafana/data, and @grafana/runtime packages are considered ALPHA even though they are not released as alpha versions. > Please note that @grafana/toolkit, @grafana/ui, @grafana/data, and @grafana/runtime packages are considered ALPHA even though they are not released as alpha versions.
@ -21,7 +21,7 @@ Stable releases are published under the `latest` tag on npm. If there was alpha/
Alpha and beta releases are published under the `next` tag on npm. Alpha and beta releases are published under the `next` tag on npm.
### Automatic prereleases ### Automatic prereleases
Every commit to master that has changes within the `packages` directory is a subject of npm packages release. *ALL* packages must be released under version from lerna.json file with commit SHA added to it: Every commit to main that has changes within the `packages` directory is a subject of npm packages release. *ALL* packages must be released under version from lerna.json file with commit SHA added to it:
``` ```
<lerna.json version>-<COMMIT_SHA> <lerna.json version>-<COMMIT_SHA>
@ -81,7 +81,7 @@ A known issue with @grafana/* packages is that a lot of times we discover proble
We can easily avoid that by setting up a local packages registry and test the packages before actually publishing to npm. We can easily avoid that by setting up a local packages registry and test the packages before actually publishing to npm.
In this guide you will set up [Verdaccio](https://verdaccio.org/) registry locally to fake npm registry. This will enable testing @grafana/* packages without the need for pushing to master. In this guide you will set up [Verdaccio](https://verdaccio.org/) registry locally to fake npm registry. This will enable testing @grafana/* packages without the need for pushing to main.
#### Setting up local npm registry #### Setting up local npm registry

@ -2,4 +2,4 @@
> **@grafana/e2e is currently in BETA**. > **@grafana/e2e is currently in BETA**.
This package contains an API wrapper built on top of [Cypress](https://www.cypress.io) that simplifies creating end-to-end tests for Grafana. More information can be found [here](https://github.com/grafana/grafana/blob/master/contribute/style-guides/e2e.md). This package contains an API wrapper built on top of [Cypress](https://www.cypress.io) that simplifies creating end-to-end tests for Grafana. More information can be found [here](https://github.com/grafana/grafana/blob/main/contribute/style-guides/e2e.md).

@ -124,7 +124,7 @@ To generate a signature, you will need to sign up for a free account on https://
### Which version of grafana-toolkit should I use? ### Which version of grafana-toolkit should I use?
See [Grafana packages versioning guide](https://github.com/grafana/grafana/blob/master/packages/README.md#versioning). See [Grafana packages versioning guide](https://github.com/grafana/grafana/blob/main/packages/README.md#versioning).
### What tools does grafana-toolkit use? ### What tools does grafana-toolkit use?
@ -240,7 +240,7 @@ const MyComponent = () => {
}; };
``` ```
To learn more about using Grafana theme please refer to [Theme usage guide](https://github.com/grafana/grafana/blob/master/style_guides/themes.md#react) To learn more about using Grafana theme please refer to [Theme usage guide](https://github.com/grafana/grafana/blob/main/style_guides/themes.md#react)
> We do not support Emotion's `css` prop. Use className instead! > We do not support Emotion's `css` prop. Use className instead!
@ -261,7 +261,7 @@ Yes! However, it's important that your `tsconfig.json` file contains the followi
### Can I adjust ESLint configuration to suit my needs? ### Can I adjust ESLint configuration to suit my needs?
grafana-toolkit comes with [default config for ESLint](https://github.com/grafana/grafana/blob/master/packages/grafana-toolkit/src/config/eslint.plugin.json). For now, there is no way to customise ESLint config. grafana-toolkit comes with [default config for ESLint](https://github.com/grafana/grafana/blob/main/packages/grafana-toolkit/src/config/eslint.plugin.json). For now, there is no way to customise ESLint config.
### How is Prettier integrated into grafana-toolkit workflow? ### How is Prettier integrated into grafana-toolkit workflow?

@ -5,7 +5,7 @@
# for usage information see "show_help" below. # for usage information see "show_help" below.
# #
latest=$(wget -O - 'https://raw.githubusercontent.com/grafana/grafana/master/latest.json' | jq -r '.stable') latest=$(wget -O - 'https://raw.githubusercontent.com/grafana/grafana/main/latest.json' | jq -r '.stable')
canary=$(wget -O - "https://grafana.com/api/grafana/versions" | jq ".items[0].version" | tr -d '"') canary=$(wget -O - "https://grafana.com/api/grafana/versions" | jq ".items[0].version" | tr -d '"')
show_help() { show_help() {
@ -62,7 +62,7 @@ if [ "$version" == "latest" ]; then
wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf - wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
elif [ "$version" == "canary" ]; then elif [ "$version" == "canary" ]; then
version="$canary" version="$canary"
wget -O - "https://dl.grafana.com/oss/master/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf - wget -O - "https://dl.grafana.com/oss/main/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
else else
wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf - wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
fi fi

@ -5,7 +5,7 @@
# for usage information see "show_help" below. # for usage information see "show_help" below.
# #
latest=$(wget -O - 'https://raw.githubusercontent.com/grafana/grafana/master/latest.json' | jq -r '.stable') latest=$(wget -O - 'https://raw.githubusercontent.com/grafana/grafana/main/latest.json' | jq -r '.stable')
canary=$(wget -O - "https://grafana.com/api/grafana/versions" | jq ".items[0].version" | tr -d '"') canary=$(wget -O - "https://grafana.com/api/grafana/versions" | jq ".items[0].version" | tr -d '"')
show_help() { show_help() {
@ -62,7 +62,7 @@ if [ "$version" == "latest" ]; then
wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf - wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
elif [ "$version" == "canary" ]; then elif [ "$version" == "canary" ]; then
version="$canary" version="$canary"
wget -O - "https://dl.grafana.com/oss/master/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf - wget -O - "https://dl.grafana.com/oss/main/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
else else
wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf - wget -O - "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz" | tar -C /opt -zxf -
fi fi

@ -5,7 +5,7 @@
# for usage information see "show_help" below. # for usage information see "show_help" below.
# #
latest=$(curl -s 'https://raw.githubusercontent.com/grafana/grafana/master/latest.json' | jq -r '.stable') latest=$(curl -s 'https://raw.githubusercontent.com/grafana/grafana/main/latest.json' | jq -r '.stable')
canary=$(curl -s "https://grafana.com/api/grafana/versions" | jq ".items[0].version" | tr -d '"') canary=$(curl -s "https://grafana.com/api/grafana/versions" | jq ".items[0].version" | tr -d '"')
show_help() { show_help() {
@ -47,7 +47,7 @@ done
# Make sure the script is being run as root # Make sure the script is being run as root
if [ $EUID -ne 0 ]; then if [ $EUID -ne 0 ]; then
echo "This script must be run as root" echo "This script must be run as root"
exit 1 exit 1
fi fi

@ -8,7 +8,7 @@ Our goal is to deliver Grafana's common UI elements for plugins developers and c
Browse the [Storybook catalog of the components](http://developers.grafana.com/). Browse the [Storybook catalog of the components](http://developers.grafana.com/).
See [package source](https://github.com/grafana/grafana/tree/master/packages/grafana-ui) for more details. See [package source](https://github.com/grafana/grafana/tree/main/packages/grafana-ui) for more details.
## Installation ## Installation
@ -22,4 +22,4 @@ For development purposes we suggest using `yarn link` that will create symlink t
### Storybook 6.x migration ### Storybook 6.x migration
We've upgraded Storybook to version 6 and with that we will convert to using [controls](https://storybook.js.org/docs/react/essentials/controls) instead of knobs for manipulating components. Controls will not require as much coding as knobs do. Please refer to the [storybook style-guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/storybook.md#contrls) for further information. We've upgraded Storybook to version 6 and with that we will convert to using [controls](https://storybook.js.org/docs/react/essentials/controls) instead of knobs for manipulating components. Controls will not require as much coding as knobs do. Please refer to the [storybook style-guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/storybook.md#contrls) for further information.

@ -10,7 +10,7 @@ With the design system @grafana/ui, we want to democratize development. This lib
## Our vision ## Our vision
Grafana Labs started @grafana/ui to make contributing to Grafana as easy as possible for Grafanistas and community members of all fields. We want to create a component library that results in: Grafana Labs started @grafana/ui to make contributing to Grafana as easy as possible for Grafanistas and community members of all fields. We want to create a component library that results in:
- Understanding of how each component works and how you can use it to create a great user experience. - Understanding of how each component works and how you can use it to create a great user experience.
- Short development times and consistent code quality. - Short development times and consistent code quality.
- A beautiful, visually consistent Grafana experience. - A beautiful, visually consistent Grafana experience.
- Transparency about how we work and what we do. - Transparency about how we work and what we do.
@ -19,7 +19,7 @@ Grafana Labs started @grafana/ui to make contributing to Grafana as easy as poss
Grafana Labs has a task force that helps create and maintain components. We make sure that components are documented and easy to use. The current status of the @grafana/ui development is available on [GitHub](https://github.com/grafana/grafana/projects/26). Feel free to contribute! Grafana Labs has a task force that helps create and maintain components. We make sure that components are documented and easy to use. The current status of the @grafana/ui development is available on [GitHub](https://github.com/grafana/grafana/projects/26). Feel free to contribute!
### How to get involved ### How to get involved
When we notice that we need to change something, we determine together what the change should be, then we put the change in place and communicate it publicly. Developers and designers create and improve @grafana/ui together. Throughout the process, we strive to involve you and meet your needs. We are looking forward to discussing your design and improvement ideas on [GitHub](https://github.com/grafana/grafana/projects/26). When we notice that we need to change something, we determine together what the change should be, then we put the change in place and communicate it publicly. Developers and designers create and improve @grafana/ui together. Throughout the process, we strive to involve you and meet your needs. We are looking forward to discussing your design and improvement ideas on [GitHub](https://github.com/grafana/grafana/projects/26).
## Get started ## Get started
@ -31,7 +31,7 @@ When we notice that we need to change something, we determine together what the
- **Use them** - **Use them**
Once you've found the right component for your use case, click the **Story** tab to see the code implementation, or look at examples under **Docs**. Once you've found the right component for your use case, click the **Story** tab to see the code implementation, or look at examples under **Docs**.
For more details, refer to the [package source](https://github.com/grafana/grafana/tree/master/packages/grafana-ui). For more details, refer to the [package source](https://github.com/grafana/grafana/tree/main/packages/grafana-ui).
## Installation ## Installation

@ -8,7 +8,7 @@ Component for displaying the configuration options for a data source plugin.
### When to use ### When to use
It is used in a `ConfigEditor` for data source plugins. You can find more examples in our core data source It is used in a `ConfigEditor` for data source plugins. You can find more examples in our core data source
plugins [here](https://github.com/grafana/grafana/tree/master/public/app/plugins/datasource). plugins [here](https://github.com/grafana/grafana/tree/main/public/app/plugins/datasource).
### Example usage ### Example usage
```jsx ```jsx

@ -22,8 +22,8 @@ _docker_repo=${2:-grafana/grafana-enterprise}
if echo "$_raw_grafana_tag" | grep -q "^v"; then if echo "$_raw_grafana_tag" | grep -q "^v"; then
_grafana_tag=$(echo "${_raw_grafana_tag}" | cut -d "v" -f 2) _grafana_tag=$(echo "${_raw_grafana_tag}" | cut -d "v" -f 2)
elif echo "$_raw_grafana_tag" | grep -q "^master-"; then elif echo "$_raw_grafana_tag" | grep -q "^main-"; then
_grafana_tag="master" _grafana_tag="main"
else else
_grafana_tag="${_raw_grafana_tag}" _grafana_tag="${_raw_grafana_tag}"
fi fi
@ -52,7 +52,7 @@ if echo "$_raw_grafana_tag" | grep -q "^v" && echo "$_raw_grafana_tag" | grep -q
fi fi
if echo "${_raw_grafana_tag}" | grep -q "^master-" && [ ${UBUNTU_BASE} = "1" ]; then if echo "${_raw_grafana_tag}" | grep -q "^main-" && [ ${UBUNTU_BASE} = "1" ]; then
docker tag "${_docker_repo}:${_grafana_tag}${TAG_SUFFIX}" "grafana/grafana-enterprise-dev:${_raw_grafana_tag}" docker tag "${_docker_repo}:${_grafana_tag}${TAG_SUFFIX}" "grafana/grafana-enterprise-dev:${_raw_grafana_tag}"
docker push "grafana/grafana-enterprise-dev:${_raw_grafana_tag}" docker push "grafana/grafana-enterprise-dev:${_raw_grafana_tag}"
fi fi

@ -100,12 +100,12 @@ if [ $BUILD_FAST = "0" ]; then
docker_build "arm64" docker_build "arm64"
fi fi
# Tag as 'latest' for official release; otherwise tag as grafana/grafana:master # Tag as 'latest' for official release; otherwise tag as grafana/grafana:main
if echo "$_grafana_tag" | grep -q "^v"; then if echo "$_grafana_tag" | grep -q "^v"; then
docker_tag_all "latest" docker_tag_all "latest"
# Create the expected tag for running the end to end tests successfully # Create the expected tag for running the end to end tests successfully
docker tag "${_docker_repo}:${_grafana_version}${TAG_SUFFIX}" "grafana/grafana-dev:${_grafana_tag}${TAG_SUFFIX}" docker tag "${_docker_repo}:${_grafana_version}${TAG_SUFFIX}" "grafana/grafana-dev:${_grafana_tag}${TAG_SUFFIX}"
else else
docker_tag_all "master" docker_tag_all "main"
docker tag "${_docker_repo}:${_grafana_version}${TAG_SUFFIX}" "grafana/grafana-dev:${_grafana_version}${TAG_SUFFIX}" docker tag "${_docker_repo}:${_grafana_version}${TAG_SUFFIX}" "grafana/grafana-dev:${_grafana_version}${TAG_SUFFIX}"
fi fi

@ -63,7 +63,7 @@ elif echo "$_grafana_tag" | grep -q "^v" && echo "$_grafana_tag" | grep -q "beta
# Push to the grafana-dev repository with the expected tag # Push to the grafana-dev repository with the expected tag
# for running the end to end tests successfully # for running the end to end tests successfully
docker push "grafana/grafana-dev:${_grafana_tag}${TAG_SUFFIX}" docker push "grafana/grafana-dev:${_grafana_tag}${TAG_SUFFIX}"
elif echo "$_grafana_tag" | grep -q "master"; then elif echo "$_grafana_tag" | grep -q "main"; then
docker_push_all "${_docker_repo}" "master" docker_push_all "${_docker_repo}" "main"
docker push "grafana/grafana-dev:${_grafana_version}${TAG_SUFFIX}" docker push "grafana/grafana-dev:${_grafana_version}${TAG_SUFFIX}"
fi fi

@ -32,17 +32,17 @@ For more information on developing for the backend:
## Dependency management ## Dependency management
Refer to [UPGRADING_DEPENDENCIES.md](https://github.com/grafana/grafana/blob/master/UPGRADING_DEPENDENCIES.md). Refer to [UPGRADING_DEPENDENCIES.md](https://github.com/grafana/grafana/blob/main/UPGRADING_DEPENDENCIES.md).
## Ongoing refactoring ## Ongoing refactoring
These issues are not something we want to address all at once but something we will improve incrementally. Since Grafana is released at a regular schedule the preferred approach is to do this in batches. Not only is it easier to review, but it also reduces the risk of conflicts when cherry-picking fixes from master to release branches. Please try to submit changes that span multiple locations at the end of the release cycle. We prefer to wait until the end because we make fewer patch releases at the end of the release cycle, so there are fewer opportunities for complications. These issues are not something we want to address all at once but something we will improve incrementally. Since Grafana is released at a regular schedule the preferred approach is to do this in batches. Not only is it easier to review, but it also reduces the risk of conflicts when cherry-picking fixes from main to release branches. Please try to submit changes that span multiple locations at the end of the release cycle. We prefer to wait until the end because we make fewer patch releases at the end of the release cycle, so there are fewer opportunities for complications.
### Global state ### Global state
Global state makes testing and debugging software harder and it's something we want to avoid when possible. Unfortunately, there is quite a lot of global state in Grafana. Global state makes testing and debugging software harder and it's something we want to avoid when possible. Unfortunately, there is quite a lot of global state in Grafana.
We want to migrate away from this by using the `inject` package to wire up all dependencies either in `pkg/cmd/grafana-server/main.go` or self-registering using `registry.RegisterService` ex https://github.com/grafana/grafana/blob/master/pkg/services/cleanup/cleanup.go#L25. We want to migrate away from this by using the `inject` package to wire up all dependencies either in `pkg/cmd/grafana-server/main.go` or self-registering using `registry.RegisterService` ex https://github.com/grafana/grafana/blob/main/pkg/services/cleanup/cleanup.go#L25.
### Limit the use of the init() function ### Limit the use of the init() function
@ -79,8 +79,8 @@ Use of the `simplejson` package (`pkg/components/simplejson`) in place of types
All new features that require state should be possible to configure using config files. For example: All new features that require state should be possible to configure using config files. For example:
- [Data sources](https://github.com/grafana/grafana/tree/master/pkg/services/provisioning/datasources) - [Data sources](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/datasources)
- [Alert notifiers](https://github.com/grafana/grafana/tree/master/pkg/services/provisioning/notifiers) - [Alert notifiers](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/notifiers)
- [Dashboards](https://github.com/grafana/grafana/tree/master/pkg/services/provisioning/dashboards) - [Dashboards](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/dashboards)
Today its only possible to provision data sources and dashboards but this is something we want to support all over Grafana. Today its only possible to provision data sources and dashboards but this is something we want to support all over Grafana.

@ -13,7 +13,7 @@ import (
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
var version = "master" var version = "main"
func main() { func main() {
setupLogging() setupLogging()

@ -40,7 +40,7 @@ import (
// The following variables cannot be constants, since they can be overridden through the -X link flag // The following variables cannot be constants, since they can be overridden through the -X link flag
var version = "5.0.0" var version = "5.0.0"
var commit = "NA" var commit = "NA"
var buildBranch = "master" var buildBranch = "main"
var buildstamp string var buildstamp string
type exitWithCode struct { type exitWithCode struct {

@ -88,7 +88,7 @@ func (pm *PluginManager) checkForUpdates() {
} }
} }
resp2, err := httpClient.Get("https://raw.githubusercontent.com/grafana/grafana/master/latest.json") resp2, err := httpClient.Get("https://raw.githubusercontent.com/grafana/grafana/main/latest.json")
if err != nil { if err != nil {
log.Tracef("Failed to get latest.json repo from github.com: %v", err.Error()) log.Tracef("Failed to get latest.json repo from github.com: %v", err.Error())
return return

@ -6,7 +6,7 @@ import (
) )
// --- Migration Guide line --- // --- Migration Guide line ---
// 1. Never change a migration that is committed and pushed to master // 1. Never change a migration that is committed and pushed to main
// 2. Always add new migrations (to change or undo previous migrations) // 2. Always add new migrations (to change or undo previous migrations)
// 3. Some migrations are not yet written (rename column, table, drop table, index etc) // 3. Some migrations are not yet written (rename column, table, drop table, index etc)

@ -415,7 +415,7 @@ func formatAzureMonitorLegendKey(alias string, resourceName string, metricName s
// Map values from: // Map values from:
// https://docs.microsoft.com/en-us/rest/api/monitor/metrics/list#unit // https://docs.microsoft.com/en-us/rest/api/monitor/metrics/list#unit
// to // to
// https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/valueFormats/categories.ts#L24 // https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts#L24
func toGrafanaUnit(unit string) string { func toGrafanaUnit(unit string) string {
switch unit { switch unit {
case "BitsPerSecond": case "BitsPerSecond":

@ -20,7 +20,7 @@ export class TestInfoTab extends PureComponent<Props> {
<br /> <br />
<LinkButton <LinkButton
variant="secondary" variant="secondary"
href="https://github.com/grafana/grafana/tree/master/devenv" href="https://github.com/grafana/grafana/tree/main/devenv"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >

@ -56,8 +56,8 @@ export class AnnoListPanel extends PureComponent<Props, State> {
async doSearch() { async doSearch() {
// http://docs.grafana.org/http_api/annotations/ // http://docs.grafana.org/http_api/annotations/
// https://github.com/grafana/grafana/blob/master/public/app/core/services/backend_srv.ts // https://github.com/grafana/grafana/blob/main/public/app/core/services/backend_srv.ts
// https://github.com/grafana/grafana/blob/master/public/app/features/annotations/annotations_srv.ts // https://github.com/grafana/grafana/blob/main/public/app/features/annotations/annotations_srv.ts
const { options } = this.props; const { options } = this.props;
const { queryUser, queryTags } = this.state; const { queryUser, queryTags } = this.state;

@ -2,7 +2,7 @@ FROM grafana/wix-toolset-ci:v3
RUN mkdir -p /tmp/dist /tmp/cache && \ RUN mkdir -p /tmp/dist /tmp/cache && \
cd /tmp/dist && \ cd /tmp/dist && \
wget https://dl.grafana.com/enterprise/master/grafana-enterprise-6.6.0-ca61af52pre.windows-amd64.zip && \ wget https://dl.grafana.com/enterprise/main/grafana-enterprise-6.6.0-ca61af52pre.windows-amd64.zip && \
unzip -l *.zip unzip -l *.zip
COPY . /package-grafana COPY . /package-grafana

@ -71,7 +71,7 @@ func main() {
func createBaseURL(root string, bucketName string, product string, nightly bool) string { func createBaseURL(root string, bucketName string, product string, nightly bool) string {
var subPath string var subPath string
if nightly { if nightly {
subPath = "master" subPath = "main"
} else { } else {
subPath = "release" subPath = "release"
} }

@ -10,7 +10,7 @@ runtime=$((($(date +%s%N) - start)/1000000))
echo -e "The job $CIRCLE_JOB took $runtime (ms)" echo -e "The job $CIRCLE_JOB took $runtime (ms)"
if [ "${CIRCLE_BRANCH}" == "master" ]; then if [ "${CIRCLE_BRANCH}" == "main" ]; then
exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildtimes.$CIRCLE_JOB=$runtime" exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildtimes.$CIRCLE_JOB=$runtime"
exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildoutcome.$CIRCLE_JOB=0" exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildoutcome.$CIRCLE_JOB=0"
fi fi

@ -10,7 +10,7 @@ runtime=$((($(date +%s%N) - start)/1000000))
echo -e "The job $CIRCLE_JOB took $runtime (ms)" echo -e "The job $CIRCLE_JOB took $runtime (ms)"
if [ "${CIRCLE_BRANCH}" == "master" ]; then if [ "${CIRCLE_BRANCH}" == "main" ]; then
exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildtimes.$CIRCLE_JOB=$runtime" exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildtimes.$CIRCLE_JOB=$runtime"
exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildoutcome.$CIRCLE_JOB=1" exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildoutcome.$CIRCLE_JOB=1"
fi fi

@ -33,7 +33,7 @@ WARNINGS_COUNT_LIMIT=1072
if [ "$WARNINGS_COUNT" -gt $WARNINGS_COUNT_LIMIT ]; then if [ "$WARNINGS_COUNT" -gt $WARNINGS_COUNT_LIMIT ]; then
echo -e "API Extractor warnings/errors $WARNINGS_COUNT exceeded $WARNINGS_COUNT_LIMIT so failing build.\n" echo -e "API Extractor warnings/errors $WARNINGS_COUNT exceeded $WARNINGS_COUNT_LIMIT so failing build.\n"
echo "Please go to: https://github.com/grafana/grafana/blob/master/contribute/style-guides/code-comments.md for more information on how to add code comments." echo "Please go to: https://github.com/grafana/grafana/blob/main/contribute/style-guides/code-comments.md for more information on how to add code comments."
exit 1 exit 1
fi fi

@ -14,7 +14,7 @@ seconds=$((end - start))
exit_if_fail ./scripts/ci-frontend-metrics.sh exit_if_fail ./scripts/ci-frontend-metrics.sh
if [ "${CIRCLE_BRANCH}" == "master" ]; then if [ "${CIRCLE_BRANCH}" == "main" ]; then
exit_if_fail ./scripts/ci-metrics-publisher.sh grafana.ci-performance.frontend-tests=$seconds exit_if_fail ./scripts/ci-metrics-publisher.sh grafana.ci-performance.frontend-tests=$seconds
fi fi

@ -1,4 +1,4 @@
grabpl_version = '0.5.57' grabpl_version = '2.0.0'
build_image = 'grafana/build-container:1.4.1' build_image = 'grafana/build-container:1.4.1'
publish_image = 'grafana/grafana-ci-deploy:1.3.1' publish_image = 'grafana/grafana-ci-deploy:1.3.1'
grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2' grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2'
@ -124,7 +124,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr
committish = '${DRONE_TAG}' committish = '${DRONE_TAG}'
source_commit = ' ${DRONE_TAG}' source_commit = ' ${DRONE_TAG}'
elif ver_mode == 'test-release': elif ver_mode == 'test-release':
committish = 'master' committish = 'main'
elif ver_mode == 'release-branch': elif ver_mode == 'release-branch':
committish = '${DRONE_BRANCH}' committish = '${DRONE_BRANCH}'
else: else:
@ -569,7 +569,7 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False):
if variants: if variants:
variants_str = ' --variants {}'.format(','.join(variants)) variants_str = ' --variants {}'.format(','.join(variants))
if ver_mode in ('master', 'release', 'test-release', 'release-branch'): if ver_mode in ('main', 'release', 'test-release', 'release-branch'):
sign_args = ' --sign' sign_args = ' --sign'
env = { env = {
'GRAFANA_API_KEY': { 'GRAFANA_API_KEY': {
@ -866,7 +866,7 @@ def enterprise2_sfx(edition):
return '' return ''
def upload_packages_step(edition, ver_mode, is_downstream=False): def upload_packages_step(edition, ver_mode, is_downstream=False):
if ver_mode == 'master' and edition in ('enterprise', 'enterprise2') and not is_downstream: if ver_mode == 'main' and edition in ('enterprise', 'enterprise2') and not is_downstream:
return None return None
packages_bucket = ' --packages-bucket grafana-downloads' + enterprise2_sfx(edition) packages_bucket = ' --packages-bucket grafana-downloads' + enterprise2_sfx(edition)
@ -911,7 +911,7 @@ def publish_packages_step(edition, ver_mode, is_downstream=False):
cmd = './bin/grabpl publish-packages --edition {} --gcp-key /tmp/gcpkey.json ${{DRONE_TAG}}'.format( cmd = './bin/grabpl publish-packages --edition {} --gcp-key /tmp/gcpkey.json ${{DRONE_TAG}}'.format(
edition, edition,
) )
elif ver_mode == 'master': elif ver_mode == 'main':
if not is_downstream: if not is_downstream:
build_no = '${DRONE_BUILD_NUMBER}' build_no = '${DRONE_BUILD_NUMBER}'
else: else:
@ -974,7 +974,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
'commands': init_cmds, 'commands': init_cmds,
}, },
] ]
if (ver_mode == 'master' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in ( if (ver_mode == 'main' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in (
'release', 'test-release', 'release-branch', 'release', 'test-release', 'release-branch',
): ):
bucket_part = '' bucket_part = ''
@ -988,7 +988,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
bucket = 'grafana-downloads-test' bucket = 'grafana-downloads-test'
bucket_part = ' --packages-bucket {}'.format(bucket) bucket_part = ' --packages-bucket {}'.format(bucket)
else: else:
dir = 'master' dir = 'main'
if not is_downstream: if not is_downstream:
build_no = 'DRONE_BUILD_NUMBER' build_no = 'DRONE_BUILD_NUMBER'
else: else:
@ -1003,7 +1003,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
'rm gcpkey.json', 'rm gcpkey.json',
'cp C:\\App\\nssm-2.24.zip .', 'cp C:\\App\\nssm-2.24.zip .',
] ]
if (ver_mode == 'master' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in ( if (ver_mode == 'main' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in (
'release', 'test-release', 'release', 'test-release',
): ):
installer_commands.extend([ installer_commands.extend([
@ -1030,7 +1030,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
if ver_mode == 'release': if ver_mode == 'release':
committish = '${DRONE_TAG}' committish = '${DRONE_TAG}'
elif ver_mode == 'test-release': elif ver_mode == 'test-release':
committish = 'master' committish = 'main'
elif ver_mode == 'release-branch': elif ver_mode == 'release-branch':
committish = '$$env:DRONE_BRANCH' committish = '$$env:DRONE_BRANCH'
else: else:

@ -36,7 +36,7 @@ load(
'upload_cdn' 'upload_cdn'
) )
ver_mode = 'master' ver_mode = 'main'
def get_steps(edition, is_downstream=False): def get_steps(edition, is_downstream=False):
publish = edition != 'enterprise' or is_downstream publish = edition != 'enterprise' or is_downstream
@ -109,11 +109,11 @@ def get_steps(edition, is_downstream=False):
return steps, windows_steps, publish_steps return steps, windows_steps, publish_steps
def master_pipelines(edition): def main_pipelines(edition):
services = integration_test_services(edition) services = integration_test_services(edition)
trigger = { trigger = {
'event': ['push',], 'event': ['push',],
'branch': 'master', 'branch': 'main',
} }
steps, windows_steps, publish_steps = get_steps(edition=edition) steps, windows_steps, publish_steps = get_steps(edition=edition)
@ -123,23 +123,23 @@ def master_pipelines(edition):
pipelines = [ pipelines = [
pipeline( pipeline(
name='build-master', edition=edition, trigger=trigger, services=services, steps=steps, name='build-main', edition=edition, trigger=trigger, services=services, steps=steps,
ver_mode=ver_mode, ver_mode=ver_mode,
), ),
pipeline( pipeline(
name='windows-master', edition=edition, trigger=trigger, steps=windows_steps, platform='windows', name='windows-main', edition=edition, trigger=trigger, steps=windows_steps, platform='windows',
depends_on=['build-master'], ver_mode=ver_mode, depends_on=['build-main'], ver_mode=ver_mode,
), ),
] ]
if edition != 'enterprise': if edition != 'enterprise':
pipelines.append(pipeline( pipelines.append(pipeline(
name='publish-master', edition=edition, trigger=trigger, steps=publish_steps, name='publish-main', edition=edition, trigger=trigger, steps=publish_steps,
depends_on=['build-master', 'windows-master',], install_deps=False, ver_mode=ver_mode, depends_on=['build-main', 'windows-main',], install_deps=False, ver_mode=ver_mode,
)) ))
pipelines.append(notify_pipeline( pipelines.append(notify_pipeline(
name='notify-master', slack_channel='grafana-ci-notifications', trigger=trigger, name='notify-main', slack_channel='grafana-ci-notifications', trigger=trigger,
depends_on=['build-master', 'windows-master', 'publish-master'], depends_on=['build-main', 'windows-main', 'publish-main'],
)) ))
else: else:
# Add downstream enterprise pipelines triggerable from OSS builds # Add downstream enterprise pipelines triggerable from OSS builds
@ -148,22 +148,22 @@ def master_pipelines(edition):
} }
steps, windows_steps, publish_steps = get_steps(edition=edition, is_downstream=True) steps, windows_steps, publish_steps = get_steps(edition=edition, is_downstream=True)
pipelines.append(pipeline( pipelines.append(pipeline(
name='build-master-downstream', edition=edition, trigger=trigger, services=services, steps=steps, name='build-main-downstream', edition=edition, trigger=trigger, services=services, steps=steps,
is_downstream=True, ver_mode=ver_mode, is_downstream=True, ver_mode=ver_mode,
)) ))
pipelines.append(pipeline( pipelines.append(pipeline(
name='windows-master-downstream', edition=edition, trigger=trigger, steps=windows_steps, name='windows-main-downstream', edition=edition, trigger=trigger, steps=windows_steps,
platform='windows', depends_on=['build-master-downstream'], is_downstream=True, ver_mode=ver_mode, platform='windows', depends_on=['build-main-downstream'], is_downstream=True, ver_mode=ver_mode,
)) ))
pipelines.append(pipeline( pipelines.append(pipeline(
name='publish-master-downstream', edition=edition, trigger=trigger, steps=publish_steps, name='publish-main-downstream', edition=edition, trigger=trigger, steps=publish_steps,
depends_on=['build-master-downstream', 'windows-master-downstream'], is_downstream=True, install_deps=False, depends_on=['build-main-downstream', 'windows-main-downstream'], is_downstream=True, install_deps=False,
ver_mode=ver_mode, ver_mode=ver_mode,
)) ))
pipelines.append(notify_pipeline( pipelines.append(notify_pipeline(
name='notify-master-downstream', slack_channel='grafana-enterprise-ci-notifications', trigger=trigger, name='notify-main-downstream', slack_channel='grafana-enterprise-ci-notifications', trigger=trigger,
depends_on=['build-master-downstream', 'windows-master-downstream', 'publish-master-downstream'], depends_on=['build-main-downstream', 'windows-main-downstream', 'publish-main-downstream'],
)) ))
return pipelines return pipelines

@ -11,8 +11,8 @@ if [ "${_tag}" == "" ]; then
exit 1 exit 1
fi fi
if [ "${_branch}" == "master" ]; then if [ "${_branch}" == "main" ]; then
echo "you cannot tag releases from the master branch" echo "you cannot tag releases from the main branch"
echo "please checkout the release branch" echo "please checkout the release branch"
echo "ex 'git checkout v5.1.x'" echo "ex 'git checkout v5.1.x'"
exit 1 exit 1

@ -8,7 +8,7 @@ post_data=$(cat <<EOF
{ {
"accountName": "Torkeldegaard", "accountName": "Torkeldegaard",
"projectSlug": "grafana", "projectSlug": "grafana",
"branch": "master", "branch": "main",
"commitId": "${_commit}", "commitId": "${_commit}",
"environmentVariables": { "environmentVariables": {
"buildType": "${_buildType}" "buildType": "${_buildType}"

Loading…
Cancel
Save