Commit Graph

1477 Commits

Author SHA1 Message Date
Emil Tullstedt
e07fbeef60
Chore: Upgrade Go to 1.20.6 (#71440) 2023-07-12 15:32:40 +02:00
Emil Tullstedt
7a9847e196
CI: Provide a Drone promotion to build the build-container (#71133) 2023-07-11 13:08:05 +02:00
Laura Fernández
616126674d
GLDS: Fix className metrics (#71214) 2023-07-07 17:00:57 +02:00
Kevin Minehart
d5a4c81fa1
CI: Add GPG keys to rgm, don't clone RGM just use the docker image (#71143)
* Add GPG keys to rgm, dont' clone RGM just use the docker image

* remove the cd command

* forgot to make drone :(

* idk

* reference script more specifically

* i guess we'll just cd /src

* Only show not found artifacts
2023-07-07 16:42:40 +03:00
Laura Fernández
b34f3a6142
GLDS: Get metrics of className usage in props (#71072) 2023-07-07 13:39:52 +02:00
Sofia Papagiannaki
e82d437e0e
Drone: Enable running go benchmarks on demand (#70359)
* Add benchmark

* Run pkg/api benchmarks in CI

* Conditionally run benchmarks for provided go packages

* Bypass fork check for promotes
2023-07-07 11:55:01 +03:00
Laura Fernández
76974009d0
GLDS: Get metrics of '@emotion/css' imports (#71064) 2023-07-06 13:30:46 +02:00
Dominik Prokop
61459e2b96
Bump scenes to 0.17.2 (#70893)
* Bump scenes to 0.17.2

* Update jest config

* Update tsconfig

* Update webpack config

* Update to latest API
2023-07-05 07:24:48 -07:00
Dimitris Sotirakis
7f55ba9c6e
CI: Cleanup - Remove security related steps (#70788)
* Remove security related steps

* More cleanup
2023-06-28 11:12:47 +03:00
guangwu
80226291a1
chore: use log.Printf(...) instead of log.Println(fmt.Sprintf(...)) (#70658) 2023-06-26 10:10:12 +03:00
Andreas Deininger
95b1f3c875
Fixing typos (#70487) 2023-06-22 09:43:38 +01:00
Esteban Beltran
ed5a697825
Plugins: Sandbox frontend plugins DOM access. (#69246) 2023-06-21 14:49:22 +02:00
Jack Baldry
3d15d54a71
Use docs/reference for flexible linking for content reused in Grafana Cloud (#70253)
* Use docs/reference for flexible linking for content reused in Grafana Cloud

Documented in https://github.com/grafana/website/pull/13878

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use docs-base image that has docs/reference shortcode

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-06-16 17:24:21 +01:00
Dimitris Sotirakis
b1e219e72c
CI: Update grabpl to v3.0.39 (#70126)
Update grabpl to v3.0.39
2023-06-15 11:49:56 +03:00
owensmallwood
f649619e20
Mysql Tests: For mysql5.7 integration tests use utf8mb4 charset (#69953)
for mysql5.7 integration tests, use utf8mb4 charset
2023-06-14 17:00:45 -06:00
Dimitris Sotirakis
91272ee4f9
CI: Add CI check for what's new link (#70046)
* Add whatsnewchecker

* Add whatsnewchecker_test

* Small fixes

* Add step in CI

* Fix lint

* Fix starlark

* t.Cleanup instead of separate func

* Skip check for test tags
2023-06-14 13:51:01 +03:00
Kevin Minehart
80c8701e80
CI: Update RGM and verification pipelines to support prerelease / rc names. (#69971)
* Install bash in RGM and support prerelease names for dev/rpms which use a tilde
2023-06-13 16:40:07 +03:00
Dimitris Sotirakis
fa70fba0e3
Security Scans: Exclude windows container scans (#69977)
* Exclude windows container scans

* Fixes according to reviewer's comments
2023-06-13 10:38:18 +03:00
Dimitris Sotirakis
2cda971796
Security Scans: Add trivy scans to every docker image used for building/testing/publishing (#69911)
* Created images.star

* Fix typo

* Add cronjobs for build-images
2023-06-12 16:41:18 +03:00
Andreas Christou
a6484c6f81
Azure: Fix Kusto auto-completion for Azure datasources (#69685)
* Fix Kusto auto-completion not working in HG

* Add update to script paths

* Update CODEOWNERS

* Missed the ts
2023-06-07 11:49:43 +01:00
Tobias Skarhed
134839d701
CI: Add i18n verification step (#69384)
* Add i18n verification step

* Add check for extracted translations

* Run extract

* Add newline for pseudo

* Format JSON output with prettier

* Print file diff

* Actually run make drone

* Only deo git diff on locales

* Update error message

* Verify that step fails on dynamic phrases

* Verify that it passes when fixed

* Verify that dynamic phrase fails, for real this time

* Extract error messages

* Change echo

* Fix string format

* Try double escaping

* Escape for Drone substitution

* Update character escape

* Remove dynamic phrase

* Verify multiple keys

* Remove double keys

* Readd en locale because of reasons

* Undo changes

* Format lint_frontend.star

* Update error message

* Update .drone.yml

* Add quotes for echo

* Verify fail to extract

* Fix diff stat command

* Reset footer changes
2023-06-06 09:29:04 +02:00
Josh Hunt
b65ce6738f
Chore: Change dev sourcemaps to work around firefox warning (#67929)
Change dev sourcemaps to work around firefox warning
2023-06-05 09:51:48 +00:00
renovate[bot]
1fbff3c807
Update dependency esbuild to v0.17.19 (#61522)
* Update dependency esbuild to v0.17.18

* chore(npm): update all esbuild dependencies to use esbuild@0.17.18

* build(esbuild): update configs so esbuild-loader matches loader from file extension

* build(webpack): fix failed monaco editor loading due to require not existing

* chore(esbuild): bump to 0.17.19

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-06-01 10:23:09 +02:00
Kat Yang
293993ac09
CI: Add validate-modfile step in drone (#69232)
* chore: test drone step

* revert changes to lint_backend_step()

* try to add validate_modifle_step

* try to run check func

* remove CGO and wire-install

* update filepath to scripts/modowners

* make drone again

* correct the filepath

* try to ignore validate-modfile step if fail

* chore: remove log that says i am a programmer

* fix: spell modfile correctly

* chore: remove unecessary comment

* fix: check go.mod instead of go.txd
2023-05-31 16:57:45 -04:00
Kat Yang
f3f3b1494d
Feat: Add command line app to validate go.mod (#67796)
* chore: start modowners

* read go.mod, parse modfile, iterate through requires; add dummy go.mod

* make BEP owners of all grafana dependencies 😱

* push attempt at logging the require comments

* shrink dummy modfile

* revert changes in go.mod

* access comments suffix

* add Module struct; attempt to separate ParseGoMod functionality into its own func; add owner (third) for loop when interating modfile

* feat: print all owners in modfile

* add additional question in comment

* feat: add subcommands: check, owners, modules; chunk out some functions

* chunk out subcommand functions

* add flags

* start tests for common element

* refactor: test for common element

* attempt #1 to refactor modules to accept multiple args

* refactor: refactor modfule func to take 1+ owner arguments (0 arguments not working atm)

* chore: remove debug logging

* refine existing comments

* comment out indirect flag stuff, add example cli command for modules

* unsuccessful attempt #2 to refactor modules to accept -o and -i flags

* refactor funcs to take filesystem and logger

* test: add test for check when all modules have owners

* fail attempt 1 to get TestModules to work

* assert expected log result in TestModules; unsure if properly reading logs

* test: add TestModules to test modules func without any flags returns direct dependencies

* test: add TestInvalidCheck for scenario when some dependencies are missing an owner

* attempt 1 at refactoring TestCheck into a table

* chore: clean TestCheck

* chore: clean up comments for func check

* move files under scripts/modowners

* revert go.mod and go.sum
2023-05-30 18:18:05 +03:00
Dimitris Sotirakis
778f054419
CI: Don't run RGM pipeline on docs changes (#69243)
Don't run RGM pipeline on docs changes
2023-05-30 18:17:53 +03:00
Ricky Whitaker
68fe1e1cb0
fix verify_release_pipeline script execution (#69191)
* fix verify_release_pipeline script execution

* forgot to run make drone
2023-05-26 14:54:57 -05:00
Horst Gutmann
f22d1d14a0
CI: Pin the google/cloud-sdk image (#69037) 2023-05-25 10:17:24 +03:00
Dimitris Sotirakis
7e816d010c
G10: Replace beta with preview references (#68347)
* Update references

* Update grabpl to v3.0.38
2023-05-24 09:46:07 +02:00
Kevin Minehart
79f49c9649
CI: Add release verify pipeline (#68756) 2023-05-23 10:01:09 +02:00
Dimitris Sotirakis
623c014cda
CI: Run trigger-test-release only on PRs against main (#68794)
Run trigger-test-release only on PRs against main
2023-05-22 12:32:48 +02:00
Dimitris Sotirakis
04e2d9055d
Docker images: Don't fail if a PR comes from a fork (#68765)
* Update grabpl

* Allow publish images to fail for PRs
2023-05-22 11:37:13 +02:00
Dimitris Sotirakis
44b1dae16d
Chore: Update grabpl to v3.0.36 (#68693)
Update grabpl to v3.0.36
2023-05-18 13:09:40 +02:00
Kevin Minehart
a870b227db
Add dagger token to rgm builds (#68651) 2023-05-17 20:19:53 +03:00
Dimitris Sotirakis
26bacf6d4c
G10: Post docker pull commands for local testing (#67489)
* Add grabpl publish images

Update grabpl - add github pr token

* Replace github_pr_token with gh app

# Conflicts:
#	.drone.yml
#	scripts/drone/vault.star

# Conflicts:
#	.drone.yml

# Conflicts:
#	.drone.yml

* Lint starlark

Add forgotten secrets

Lint starlark

Change secrets

* Update grabpl to v3.0.35

* Lint starlark

* Remove unnecessary secrets
2023-05-17 17:57:37 +02:00
Dimitris Sotirakis
55622615de
CI: Add delivery bot secrets to publish images step (#68467)
Add delivery bot secrets
2023-05-15 16:33:31 +03:00
Horst Gutmann
35ccfa6131
CI: Update grabpl to 3.0.34 (#68456)
* CI: Port of init-enterprise fix from 9.4.10

* CI: Update grabpl to 3.0.34
2023-05-15 15:57:46 +03:00
Dimitris Sotirakis
b7b13067a5
CI: Add .drone.yml in pathschanged trigger for lint_backend pipeline (#68348)
Add .drone.yml in pathschanged for lint_backend
2023-05-12 11:18:59 +03:00
Horst Gutmann
acd02e8a48
CI: Move windows-tests into promotion pipeline (#68218) 2023-05-10 17:16:59 +03:00
Horst Gutmann
1e8cad625b
CI: Remove windows backend tests from release pipelines (#68166)
Remove windows backend tests from release pipelines

These are run in other places so there is no benefit to also include
them here.
2023-05-10 12:54:43 +03:00
Horst Gutmann
b2fc285a5d
CI: Add Windows backend tests in more places (#66438)
* CI: Add Windows backend tests in more places

* CI: Add promotion pipeline for publishing new windows-test-images

* CI: Ignore windows backend-test failures for now

* CI: Fix linting issue in ci_images.star file
2023-05-08 15:22:34 +02:00
owensmallwood
a4c7450c42
Grafana: Upgrades mysql images from 5.7 to 8 (#67604)
adds mysql integration build step for mysql 8
2023-05-04 11:42:48 -06:00
Sofia Papagiannaki
9812ad2cb2
Chore: Upgrade Go to 1.20.4 (#67748)
Upgrade Go to 1.20.4
2023-05-04 10:52:43 +03:00
Kevin Minehart
80543a0bfa
CI: set RGM deps on main merge not on tag (#67778)
set deps on main merge not on tag
2023-05-03 22:08:01 +03:00
Kevin Minehart
768efe9748
CI: Add rgm to drone (#66991)
* add drone stub that build grafana using 'grafana/build' (dagger)

---------

Co-authored-by: Ricky Whitaker <ricky.whitaker@grafana.com>
2023-05-03 13:56:02 -05:00
Ryan McKinley
ca1f79b9ba
Kindsys: Target k8s style resource definitions (#67008)
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-04-27 23:32:38 +03:00
Kristian Bremberg
35407142d0
Feature: Trusted Types support (#64975)
* Draft: Feature: Trusted Types support

* remove trusted-types package

* Create policy before jQuery and Angular is loaded and add feature flag

* Add trustedTypePolicies

* Sanitize scriptURL

* Add TT meta tag for test env

* Move trusted types into core

* Add DOMParser support for TrustedHTML

* Seperate RSS sanitization and add better TrustedHTML support

* Get test CSP header from config

* Remove dompurify dep from core

* Add documentation for trusted types

* Apply suggestions from code review

Co-authored-by: Kristian Bremberg <114284895+KristianGrafana@users.noreply.github.com>

* Add comment about Github discussion thread and things breaking

* Remove changes from News panel

* Remove TT feature toggle

* Expose TT and CSPReportOnly to frontend

* Log errors in console when CSP report only is enabled

* Log error for reporting and remove test mode

* Only insert CSP header in HTML for dev env

* Update docs

---------

Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2023-04-27 18:20:37 +02:00
Esteban Beltran
362936b002
Build: Force same version of @emotion/react via webpack config (#66822) 2023-04-24 17:13:52 +02:00
Jack Westbrook
5d4bf19efb
Fix: Canary NPM publishing (#66734)
fix(npm-publishing): strip protocol from registry so npm can auth correctly
2023-04-18 12:00:05 +02:00
Jack Westbrook
e97befa221
Fix: NPM canary releases (#66727)
* fix(packages): remove double trailing slash from npmrc credentials

* chore(packages): add new line to storybook config to trigger an npm canary release
2023-04-18 11:02:37 +02:00
Jack Westbrook
efa641040d
Build: Improve NPM publishing (#65171)
* chore(packages): remove redundant npm scripts for publishing packages

* feat(packages): rewrite npm publishing script to work for manual and ci publishes

* ci(drone): update release-canary-npm-packages step to use new script

* docs(packages): update manual release instructions

* wip(packages): attempt to validate packed npm package

* fix(packages): release-canary-npm-packages should provide canary dist-tag

* ci(packages): clean up npm package validation script

* chore(devenv): add verdaccio config to allow anon publishing for easier dev npm testing

* ci(packages): clean up publishing script

* ci(drone): during build-frontend-packages, pack and validate packed tarballs

* chore(codeowners): update for publish/validate npm packages scripts

* ci(packages): fix esm loop bug matching e2e package

* ci(npm-packages): fix failing regex

* style(lib.star): run make format-drone

* style(npm-packages): shellcheck fixes for validate-npm-packages script

* docs(packages): update readme instructions for publishing locally and manually

* refactor(npm-publish): use drone when to trigger canary releases

* chore(drone): remove redundant trigger_npm_publish var

* chore(npm-publish): remove redundant echo
2023-04-18 10:19:37 +02:00
Serge Zaitsev
391a192310
Chore: Try a different way to run integration tests (#66653)
* try a different way to run integration tests

* fix formatting

* clean test cache again

* use previous command

* playing around with random commands

* dont run tests in parallel yet

* use parallel option instead of gomaxprocs

* use same package set for redis/memcached; use p=1
2023-04-17 18:33:43 +02:00
Emil Tullstedt
202afb9041
Chore: Upgrade Go to 1.20.3 (#66264) 2023-04-14 10:01:14 +02:00
Dimitris Sotirakis
24d348f804
CI: Split /bin/build artifacts * subcommand (#66005)
* Split go files

* Modify publishartifacts.go

* Split main

* FIXME: Temp add GCSCopy to gcloud/storage

* Fix lint

* Exported flags

* Update starlark - make drone

* Further backend lint fixes

* Add fallback_test.go

* Fix go imports order

* make drone

* Remove GCSCopy from static assets

* Remove GCSCopy from storybook

* Fix lint

* Remove GCSCopy

* Remove success logline

* drone yaml cleanup

* Add artifacts-editions flag

* Fix starlark

* Add default sting slice in artifacts packages command
2023-04-12 11:47:40 +03:00
Sofia Papagiannaki
caac9838d8
Build: Fix Redis/Memcached integration tests (#64298)
* Build: Fix integration cache tests

* Allow REDIS_URL with scheme

* Reduce cache integration tests timeout to 5m

* Apply suggestion from code review

* Run redis/memcached integration tests in OSS pipelines

* Change redis image
2023-04-05 11:55:55 +03:00
Ricky Whitaker
c7d3c5a622
Rickywhitaker/verify repos update (#65739)
* initial commit of verify repo update

* consolidated duplicate verify-repos.sh commands into 1 with env vars

* fixing rpm versioned install
2023-04-04 11:17:12 -05:00
Dimitris Sotirakis
a18ea77aac
CI: Exclude cloud related tags from tag events (#65806)
* Exclude cloud related tags

* Fix starlark lint errors
2023-04-03 16:22:20 +03:00
Dimitris Sotirakis
821633c796
CI: Make init-enterprise depend on grabpl (#65797)
Make init-enterprise depend on grabpl

# Conflicts:
#	.drone.yml
2023-04-03 14:04:30 +03:00
Horst Gutmann
e9aef20eb4
CI: Move release integration pipeline to standalone promotion pipeline (#65787) 2023-04-03 12:43:37 +02:00
Dimitris Sotirakis
89d642e001
CI: Cleanup unnecessary grabpl dependencies (#65330)
* Remove unnecessary grabpl dependencies

* Revert test-frontend change
2023-03-27 12:55:45 +02:00
Dimitris Sotirakis
3b00d2c273
CI: Remove grabpl dependency from publish-packages steps (#65329)
Remove grabpl dependency from publish packages
2023-03-27 11:03:49 +03:00
Dimitris Sotirakis
d0be9610f0
CD: Remove fetch-images dependency from AWS marketplace automation (#65173)
* Remove fetch-images dependency

* Fix starlark link
2023-03-22 17:35:57 +02:00
Dimitris Sotirakis
4a80233bed
CI: Update grabpl to 3.0.30 (#65028)
Update grabpl
2023-03-20 11:46:17 +02:00
Horst Gutmann
4b241804b4
CI: Move some build settings (#64491)
* Move some build settings to Vault

* CI: Remove reference to DOWNSTREAM_REPO as it isn't used
2023-03-09 14:07:42 +01:00
Ashley Harrison
0c0d63b830
Build: enable caching in eslint plugin (#64325)
enable caching in eslint plugin
2023-03-07 14:53:50 +00:00
Emil Tullstedt
110b05a0c0
Chore: Upgrade Go to 1.20.1 and Alpine to 3.17 (#63639) 2023-02-27 14:50:32 +01:00
Emil Tullstedt
c72d18f5e6
Revert "Chore: Upgrade Go to 1.20.1 and Alpine to 3.17 (#63506)" (#63567)
This reverts commit 747ddf7b33.
2023-02-22 08:14:26 -05:00
Emil Tullstedt
747ddf7b33
Chore: Upgrade Go to 1.20.1 and Alpine to 3.17 (#63506) 2023-02-22 11:53:06 +01:00
Jack Baldry
e2af8aa53b
Create full directory path for testing docs (#62004)
* Create full directory path for testing docs

The previous command was useless as the old image already had the
/hugo/content/docs/grafana directory. The old image also had the
/hugo/content/docs/grafana/latest directory but the new image does
not.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Modify a documentation file to to trigger docs PR tests

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Sentence case description

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
2023-02-21 13:41:39 +00:00
Dimitris Sotirakis
24c60486f6
Chore: Bump alpine version to 3.17.1 (#63252)
Bump alpine version to 3.17.1
2023-02-10 14:54:35 +00:00
Horst Gutmann
470be140dc
CI: Do not clone repo in artifact-page step (#63077) 2023-02-08 11:57:33 +01:00
Horst Gutmann
2804acd264
CI: Running Redis integration tests without grabpl (#63028)
This restores some changes from
https://github.com/grafana/grafana/pull/61920 that were accidentally
deleted.
2023-02-08 10:02:03 +01:00
Dimitris Sotirakis
e5c48ac945
CI: Remove variants arg from package step (#62858)
* Remove variants arg from package step

# Conflicts:
#	.drone.yml

* Fix starlark lint

* Default to releaseModeConfig.Variants

* Check for empty variants arg
2023-02-06 17:15:42 +02:00
Andreas Christou
d7f7cd1e61
Schema: Initial Azure Monitor query schema (#62018)
* Initial schema

- Add types based off of current frontend

* Rename and field-level comments

* Update report and regenerate files

* Rename frontend Azure folder

- Doing this for consistency and to ensure code-generation works
- Update betterer results due to file renames

* Remove default and add back enum vals that I deleted

* Set workspace prop as optional

* Replace template variable types

* Connect frontend query types

- Keep properties optional for now to avoid major changes
- Rename AzureMetricResource
- Correctly use ResultFormat

* Add TSVeneer decorator

* Update schema

* Update type

* Update CODEOWNERS

* Fix gen-cue issue

* Fix backend test

* Fix e2e test

* Update code coverage

* Remove references to old Azure Monitor path

* Review

* Regen files
2023-02-03 16:06:54 +00:00
Horst Gutmann
312ea59e6d
CI: Allow other modules to register build sub-commands (#62741)
* Allow other modules to register build sub-commands

* CI: Fix retries on artifacts-page clone

* Fix linting errors

* Fix golint issues

* Update to grabpl 3.0.21
2023-02-02 11:35:43 +00:00
Kevin Minehart
ba6500576b
CI: include ver_mode arg in the integration_test_pipeline in main. (#62723)
include ver_mode arg in PRs
2023-02-01 15:27:57 -05:00
Kevin Minehart
3cbaa58b1b
CI: Replace enterprise check (#62359)
* Add steps in the pipeline for cloning enterprise when running PR tests.
* Removed enterprise-check from the github action workflows, and removed it from the codeowners file.
2023-02-01 16:55:49 +00:00
Dimitris Sotirakis
1a5b54cff3
CI: Replace grafana/grafana-oss with grafana-oss when publishing to dockerhub repo (#62651)
Replace grafana/grafana-oss with grafana-oss
2023-02-01 09:53:42 +00:00
Jack Baldry
fdb1a47ca2
Use requires_buildifier build tag to avoid needing buildifier locally (#62597)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-31 17:43:07 +00:00
Horst Gutmann
f23be415c5
CI: Add artifacts publish build command (#62445)
* CI: Add `artifacts publish` build command

* Lint release.star
2023-01-30 16:24:10 +00:00
Jack Baldry
8379a5338c
CI: Lint starlark files with buildifier (#59157)
* Add verify-starlark build action that returns an error for starlark files with lint

Relies on `buildifier` tool.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add verify_starlark_step to PR pipeline

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Manually fetch buildifier in curl_image until a new build_image is created

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Format with buildifier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove all unused variables retaining one unused function

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use snake_case for variable

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Replace deprecated dictionary concatenation with .update() method

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Start adding docstrings for all modules and functions

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Prefer os.WriteFile as ioutil.WriteFile has been deprecated since go 1.16

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Attempt to document the behavior of the init_enterprise_step

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document test_backend pipeline

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document enterprise_downstream_step

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document the pipeline utility function

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document publish_images_step

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document publish_images_steps

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document enterprise2_pipelines function

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add tags table for Starlark files.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document test_frontend

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document windows function

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add docstrings to verifystarlark functions

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Refactor error handling to be more clear and document complex behavior

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Split errors into execution errors and verification errors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document all other library functions

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add local variables to TAGS

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add blank line between all Args and Returns sections

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix new linting errors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Lint new Starlark files

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Correct buildifier binary mv

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document the need to set nofile ulimit to at least 2048

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Update build-container to include buildifier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Ensure buildifier binary is executable

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix valid content test

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Simply return execution error

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Only check files rather than fixing them

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use updated build-container with executable buildifier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Test that context cancellation stops execution

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Simplify error handling

Return execution errors that short circuit WalkDir rather than
separately tracking that error.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove fetching of buildifier binary now that it is in the build-container

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use build image in verify-starlark step

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use semver tag

The image is the same but uses a semver tag to make it clearer that
this is a forward upgrade from the old version.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use node 18 image with buildifier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-30 09:27:11 +00:00
Andre Pereira
afd39c18ba
Explore: Refactor trace view and move to core (#61938)
* Move TraceView to core grafana

* Remove unused code

* yarn install

* Remove jaeger-ui-components from CODEOWNERS and other tools

* Type fixes

* yarn install

* Remove mock that we no longer need

* Fix merge conflicts

* Re-add Apache license for trace view components

* Use an exclamation-circle instead of triangle to denote errors

* Remove eslint disables and update betterer results instead
2023-01-27 14:13:17 +00:00
Guilherme Caulada
9a25a03e49
Tests: Add boilerplate code to support e2e tests on enterprise (#61959)
* Add e2e boilerplate for enterprise tests

* Remove enterprise symlink file

* Add tsconfig to e2e extensions folder and gitignore

* Update run-suite to use extensions folder

* Remove unnecessary tsconfig file

* Update e2e enterprise paths on gitignore

* Copy symlinked e2e enterprise files on run-suite

* Add cleanup command to run-suite

* Improve cleanup and setup for enterprise e2e tests

* Update e2e path for enterprise tests on gitignore

* Support to run different e2e tests for each license
2023-01-26 18:04:13 -03:00
Ashley Harrison
a344c88a01
Chore: don't create the npm-artifacts dir since yarn packages:pack does this… (#62246)
* don't create the npm-artifacts dir since yarn packages:pack does this already

* fix an any to trigger a canary build
2023-01-26 16:41:08 +00:00
Jack Westbrook
5050822b9a
Fix: NPM Package publishing (#62243)
* move packed packages to npm-artifacts dir

* remove unnecessary any to trigger canary build

* update canary script to create dir only if it does not exist

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-26 16:18:05 +00:00
Jack Westbrook
8f06784449
Chore: Bump d3-color to 3.1.0 (#61609)
* chore(d3-color): resolve all copies to 3.1.0 to fix vulnerability

* chore(yarn): fix resolution version

* chore(jest): compile d3-color from esm to cjs

* chore(d3): bump d3 to latest, set jest config to transpile es modules

* chore: bump visx packages to resolve d3-color to latest

* chore(jest): add missing es modules to config

* chore(storybook): prevent storybook config failure due to nested esm imports

* chore(storybook): use a direct path to avoid es modules breaking config build

* build(sass): use esbuild to generate sass theme vars for esm deps

* chore: clean up swc dependencies

* revert: remove debug console.log breaking tests
2023-01-26 13:02:22 +01:00
Josh Hunt
43828e829b
Chore: Script to generate betterer issue summary (#61857)
* wip

* finish script

* limit by message

* fix filter message

* Add template

* improve template

* codeowners devdep
2023-01-26 10:48:33 +00:00
Ashley Harrison
64352e8d08
Chore: Move to node 18 again (#62079)
move to node 18 again
2023-01-26 10:19:39 +00:00
Horst Gutmann
739fcf1796
CI: Remove grabpl integration-tests (#61920)
These tests can also be run without it.
2023-01-23 16:00:31 +01:00
Jack Westbrook
3a7623753b
Build: Replace babel-loader with esbuild-loader (#57837)
* build(webpack): replace babel-loader with esbuild-loader

* build(webpack): add esbuild minifier to production builds

* Wip

* Removed ngInject and replaced with manual inject params

* chore: bump esbuild to 0.15.13

* Fixed angular issues

* build(frontend): update esbuild to 0.16.16

* chore(webpack): support browserslist for esbuild

* build(esbuild): unify versions of esbuild to 0.16.17 and esbuild-loader to 2.21.0

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-23 12:15:05 +01:00
Horst Gutmann
e32cd6d4ff
CI: Add artifacts npm commands from grabpl (#61908) 2023-01-23 11:32:51 +01:00
Julien Duchesne
efb98bcb99
Packaging: Use base64 key (#61802)
The tools in this repo need base64 but not in most other tools. I had to revert the change I made to the key
I created another key for base64 that we can use here
Follow-up to https://github.com/grafana/grafana/pull/61784
2023-01-19 15:03:19 -07:00
Julien Duchesne
be4c969337
Use new GPG key when publishing (#61784)
The old key is revoked: https://grafana.com/blog/2023/01/12/grafana-labs-update-regarding-circleci-security-updates/
But it's added as a manual Drone repo secret
This switches to the new gpg key that's also used to publish to apt.grafana.com
2023-01-19 15:30:05 +00:00
Josh Hunt
959c89793f
Chore: eslint rule for preventing e2e selectors in aria-label (#59731)
* Create eslint plugin/rule for catching e2e selectors in aria-label

* Add no-aria-label-e2e-selectors to betterer

* chore: skip levitate for the `grafana-eslint-rules` package

* Fix rule

* Add readme

* Add Apache 2 license

* Typecheck using @typescript-eslint/utils

* actually export the rule

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-01-18 15:02:35 +00:00
Emil Tullstedt
bf574e98c8
Chore: Upgrade Go to 1.19.4 (#60794) 2022-12-29 13:03:56 +01:00
Dimitris Sotirakis
658414a025
CI: Update grabpl to v3.0.20 (#60670)
Update grabpl to v3.0.20
2022-12-22 14:51:43 +01:00
Andreas Christou
0367036108
AzureMonitor: E2E update (#60624)
* Wait for locations call to complete

* Update drone to run cloud suite on tests update
2022-12-21 16:42:24 +00:00
Dimitris Sotirakis
158502572e
CI: Add aws-marketplace pipeline (#60484)
* Add aws marketplace automation

# Conflicts:
#	.drone.yml

* Fix secret paths

# Conflicts:
#	.drone.yml

* Add docker socket

# Conflicts:
#	.drone.yml

# Conflicts:
#	.drone.yml

* s/enterprise2/enterprise

* Add dependency on the enterprise docker publish

# Conflicts:
#	.drone.yml

* Replace testing args with prod args

# Conflicts:
#	.drone.yml

* Fix path

# Conflicts:
#	.drone.yml
2022-12-19 11:25:48 -05:00
Dimitris Sotirakis
a1c2093b53
CI: Remove enterprise2 bits from enterprise pipelines (#60459)
Remove enterprise2 bits from enterprise pipelines
2022-12-19 17:30:49 +02:00
Sofia Papagiannaki
efd827fd65
Chore: Trigger backend lint on bingo updates (#60380)
Chore: Trigger backend lind on bingo updates
2022-12-15 06:48:00 -05:00
Dimitris Sotirakis
e9cf8fa751
CI: Add automation for github assets publishing (#59491)
* Add github.star

# Conflicts:
#	.drone.star
#	.drone.yml

* Make step depend on fetch images

# Conflicts:
#	.drone.yml

* artifacts -> path

# Conflicts:
#	.drone.yml

* Add github token

# Conflicts:
#	.drone.yml

* Fix custom path

# Conflicts:
#	.drone.yml

* Add case where path is absent

# Conflicts:
#	.drone.yml

* Add GH_REGISTRY secret

# Conflicts:
#	.drone.yml
2022-12-12 09:51:27 -05:00
Dimitris Sotirakis
0801fce23c
CI: Move verify-storybook command from grabpl (#59928)
* Move verify-storybook from grabpl

* Remove zerolog
2022-12-07 09:56:15 +02:00
Dan Cech
440d8a3d88
Build: Drone starlark file cleanup (#59919)
* format drone starlark files with black

* clean up unused params

* more simplification

* more cleanup

* more cleanup
2022-12-07 09:13:57 +02:00
Dimitris Sotirakis
7deaeb0f9e
CI: Add identify-runner step for publish images (#59827)
Add missing identify-runner step
2022-12-05 09:49:33 -05:00
Esteban Beltran
0a9b238d39
Build: Adds a fallback script to fix package.json main and types fields before packaging (#59628) 2022-12-01 11:34:52 +01:00
Dimitris Sotirakis
2d7fcea8fa
CI: Remove npm steps from enterprise pipelines (#59108)
Remove npm steps from enterprise pipelines
2022-11-24 14:12:07 +02:00
Dimitris Sotirakis
44402ff726
CI: Split enterprise2 pipelines (#57997)
* Add publishimages_enterprise2.go file

* Add push.go

* Modify build files

* Modify starlark files

* Remove promotion pipeline

* Remove unused args

* Handle tag for custom events
2022-11-21 20:06:00 +02:00
Dimitris Sotirakis
01afe9fbd4
CI: Move upload-packages subcmd from grabpl (#58960)
* Move upload-packages subcmd from grabpl

# Conflicts:
#	.drone.yml

# Conflicts:
#	.drone.yml

* Fix lint - add ActivateServiceAccount

* Fix lint
2022-11-18 17:22:14 +02:00
Dimitris Sotirakis
0bf3c98eec
CI: Add environment variables for edition to all pipelines (#58964)
Add environment variables to pipelines
2022-11-18 16:15:04 +02:00
Dimitris Sotirakis
e37fc888c0
CI: Move upload-cdn subcommand from grabpl (#58957)
Move upload-cdn from grabpl
2022-11-18 08:37:18 -05:00
Dimitris Sotirakis
5ea077c440
CI: Replace TAG with DRONE_TAG in CI (#58894)
* Replace TAG with DRONE_TAG

* Fix variable call

* Replace remaining bits

* Bump grabpl version
2022-11-17 08:30:09 -05:00
Marcus Efraimsson
79f1a7a4fd
Database: Adds support for enable/disable SQLite Write-Ahead Logging (WAL) via configuration (#58268)
Adds support for enable/disable SQLite Write-Ahead Logging (WAL) via configuration.
Enables SQLite WAL for E2E tests.
2022-11-16 19:29:33 +01:00
Dimitris Sotirakis
5d73f7f8e8
CI: Cleanup e2e tests dependencies (#58829)
Cleanup end to end tests dependencies
2022-11-16 09:07:53 -05:00
Ashley Harrison
ff1afbb699
Revert "Chore: move to node 18 (#58570)" (#58754)
This reverts commit 0a9129cf90.
2022-11-15 13:47:14 +00:00
Dimitris Sotirakis
09c3ead945
CI: Make build and store storybook trigger in the release process (#58686)
Make storybook trigger conditional
2022-11-14 10:14:50 +00:00
Ashley Harrison
0a9129cf90
Chore: move to node 18 (#58570)
* bump node version to 18

* update folder to 18.x

* update README for m1 instructions

* update drone

* update unit test

* update README
2022-11-11 11:34:00 +00:00
Timur Olzhabayev
f451332e36
Chore: Switching to new output format for detect breaking changes action (#58516)
* Switching to new output format for detect breaking changes action

* linting: wrap $GITHUB_OUTPUT with double quotes

* linting: fix shellcheck issues in the right place 🤦‍♂️

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-11-10 06:02:04 -05:00
Andreas Christou
5cfd983cc2
AzureMonitor - E2E tests drone update (#57100)
* Update e2e command with video flag

* Add Cloud Plugins E2E tests to drone

* Update env variable names

* Add vault Azure secrets

* Update e2e steps

* Update secrets path

* Update image and rebuild drone file

* Readd drone changes

* Rebuild drone

* Remake drone

* Correct reference to secret

* Remake drone file

* Remove unneeded step

* Clear values in Arg query
2022-11-08 11:27:54 +01:00
Emil Tullstedt
428dd54094
Chore: Upgrade Go to 1.19.3 (#58052) 2022-11-04 14:50:43 +01:00
Dimitris Sotirakis
9c1c10ab9a
Remove base and arch args (#58209) 2022-11-04 13:21:18 +02:00
Todd Treece
e105b5a107
Chore: Add jsonnet library for devenv dashboards (#57928) 2022-11-03 11:04:39 -04:00
Dimitris Sotirakis
7a12132237
DEB/RPM Packages: Remove old package publishing steps (#58071)
* Remove old publish package steps

* Don't ignore publish packaging failures
2022-11-02 18:42:01 +00:00
Julien Duchesne
c46a4a0b26
Linux Packages: Handle publish to beta (#57528)
Uses the feature added here: https://github.com/grafana/deployment_tools/pull/46301
When a version is named "beta", it will be distributed in the beta distribution, rather than in stable

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-11-02 06:21:41 -04:00
Dimitris Sotirakis
f3b8cd1c98
CI: Remove *-test-backend-enterprise2 pipelines (#58028)
* Remove test-backend-enterprise2 pipelines

* Remove leftover
2022-11-02 04:13:12 -04:00
Dimitris Sotirakis
57ee0e4a4b
CI: Use full dockerhub repository name (#57979)
* Add full dockerhub repo name

* Update grabpl version
2022-11-01 15:33:16 +02:00
Dimitris Sotirakis
1eaf7cbfc0
Add GCP_KEY to publish-grafanacom step (#57910) 2022-11-01 09:41:15 +02:00
Timur Olzhabayev
66d2fe7d9d
Fixing upload failure (#57290) 2022-10-20 14:18:33 +02:00
Dimitris Sotirakis
f0b882ebad
Add token to init-enterprise (#57246) 2022-10-19 04:23:12 -04:00
Ashley Harrison
178b05160a
make betterer a required step on PRs again (#57099) 2022-10-18 12:22:13 +01:00
Julien Duchesne
44ad4ec9d4
Add RPM package publishing (#56797)
Just tested deb publishing, and confirmed it works. Noticed that RPM packages aren't published though
It's the exact same step, targetting the RPM files instead
Both steps will run in parallel

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-10-18 13:41:23 +03:00
Dimitris Sotirakis
7a71482371
Update grabpl to 3.0.14 (#57144) 2022-10-18 02:44:31 -04:00
Dimitris Sotirakis
27f072beb3
Don't trigger tag event when merging (#57063) 2022-10-17 12:27:10 +03:00
Dimitris Sotirakis
e25475b9c8
Make publish packages depend on compile-build-cmd and run from bin/build (#56713) 2022-10-17 10:58:36 +03:00
Dimitris Sotirakis
b9d449529a
Update grabpl to v3.0.12 (#56823) 2022-10-13 11:35:05 +03:00
Julien Duchesne
72b9555487
Publish Linux Packages: Fix bad secret name (#56708)
🤦

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-10-12 14:07:13 +03:00
Dimitris Sotirakis
62314bbf66
Remove grabpl dependency from yarn-install (#56692) 2022-10-11 18:58:03 +03:00
Dimitris Sotirakis
efc8f985cb
Remove build-frontend-packages step from docs pipelines (#56686) 2022-10-11 06:56:43 -04:00
Dimitris Sotirakis
66cb56de79
CI: Trigger tag on CI changes (#55388)
* Trigger tag on CI changes

* Use github token available for PRs

Remove remote addition

* Replace origin with full url

Remove fetch for origin

Fix fetch

Remove --quite

Add rebase

Stash changes from verify-gen-cue

Cleanup

* Add --quiet when fetching
2022-10-11 12:01:18 +03:00
Dimitris Sotirakis
668cb25b82
Fix release test pipelines dependencies (#56671) 2022-10-11 11:42:24 +03:00
Dimitris Sotirakis
811f6054c8
Add dependencies (#56666) 2022-10-11 10:05:13 +03:00
Dimitris Sotirakis
eb077db2b0
Add clone-enterprise and init-enterprise steps (#56662) 2022-10-10 22:46:12 +03:00
Dimitris Sotirakis
75c5845749
CI: Split release test pipelines (#56655)
* Split test release pipelines

* Add missing dependencies

* Add release branch case when naming pipeline
2022-10-10 11:46:56 -04:00
Serge Zaitsev
169610fd27
Chore: Reduce test timeouts to 5 minutes (#56599) 2022-10-10 09:26:47 +02:00
Emil Tullstedt
c2d3a31772
Chore: Upgrade Go to 1.19.2 (#56355) 2022-10-07 12:47:24 +02:00
Dimitris Sotirakis
ec7d9e196e
Change from grabpl to build for grafana-com (#56434) 2022-10-06 08:14:38 +01:00
Dimitris Sotirakis
636ae8d091
Update grabpl version to v3.0.11 (#56377) 2022-10-05 14:18:28 +03:00
Dimitris Sotirakis
5cdc932f8c
CI: Stop publishing OSS images for security mode (#56088)
* No-op: Refactor publish images pipeline struct

* Stop publishing images for OSS
2022-10-05 09:39:38 +03:00
George Rodrigues
8950d86141
fix: some typos (#56171) 2022-10-04 18:43:49 -05:00
Dimitris Sotirakis
8eea6f7f4f
Add edition as environment var (#56069) 2022-10-04 10:35:18 +03:00
Dimitris Sotirakis
cd360f2d2a
Add nightly cronjob (#55675) 2022-09-27 08:49:20 -05:00
Julien Duchesne
169df2fe90
Drone: publish-linux-packages should be privileged (#55816)
It's currently failing with a failure to mount s3fs
2022-09-27 15:44:39 +03:00
Kevin Minehart
2fadeeff4c
CI: move grabpl package command to pkg/build (#55651)
* add grabpl package

* update .drone.yml

* resolve lint errors
2022-09-23 11:49:07 -05:00
Jack Westbrook
ba10548547
CI: Update grabpl to 3.0.10 (#55678) 2022-09-23 15:15:04 +02:00
Dimitris Sotirakis
61c50ca1aa
Update grabpl version to v3.0.9 (#55621) 2022-09-23 09:19:55 +03:00
Dimitris Sotirakis
a9a86cbe54
Introduce lint-frontend pipeline (#55559) 2022-09-21 14:39:28 -05:00
Dimitris Sotirakis
c18432971b
CI: Introduce lint-backend pipeline (#55476)
* Introduce lint-backend pipeline

* Use go image and install make

* Don't run lint pipeline on .drone.yml changes
2022-09-21 07:05:19 -04:00
Julien Duchesne
a44c0040a9
Drone: Always have image_pull_secrets (#55530)
Having it doesn't prevent pulling any images, so it's easier if it's everywhere
2022-09-21 06:27:43 +00:00
Dimitris Sotirakis
2c872b0d94
Run enterprise downstream after OSS CI is done (#55366) 2022-09-19 17:17:36 +03:00
Dimitris Sotirakis
93e78e2146
CI: Move fetch-images sub-command from build-pipeline repo (#55298)
* Move fetch images from build-pipeline

* Modify drone

* Replace zerolog with builtin log

* Fix lint
2022-09-19 11:19:31 +03:00
Dimitris Sotirakis
4e73766067
CI: Move store-storybook to OSS (#55212)
* Move store-storybook to OSS

* grabpl -> build for store-storybook command

* Replace zerolog with builtin log

* Remove flags from store-storybook

* Fix lint
2022-09-15 11:06:43 +03:00
Dimitris Sotirakis
244ccead9d
Make lint-drone depend on compile-build-cmd (#55174) 2022-09-14 10:45:00 -04:00
Dimitris Sotirakis
5c40b053d0
Update grabpl (#55061) 2022-09-14 10:20:58 -04:00
Kevin Minehart
c69a37f8c2
CI: grabpl verify-drone -> ./bin/build verify-drone (#55171)
* move grabpl verify-drone
2022-09-14 09:07:09 -05:00
Dimitris Sotirakis
5a1ba20856
CI: Split oss and enterprise steps for release pipelines (#55157)
* s/include_enterprise2/include_enterprise

* Get rid of get_steps def - include steps in separate defs
2022-09-14 09:47:02 -04:00
Dimitris Sotirakis
8b38f9408d
Run codespell only on docs changes (#55064) 2022-09-14 16:32:08 +03:00
Dimitris Sotirakis
716bdde3f6
CI: Make shellcheck a standalone pipeline (#55082)
* Make shellcheck standalone pipeline

* Run shellcheck on every .sh change

* Change base image

* Trigger on script changes

* Run shellcheck on PRs only
2022-09-14 09:00:06 +03:00
Dimitris Sotirakis
9b42cf009a
CI: Update build-container image to v1.6.2 (#55083)
* Update build container to v1.6.2

* Update Dockerfile
2022-09-13 15:43:02 +03:00
Kevin Minehart
d3af3e0431
CI: Move grabpl publish-metrics (#55042)
* move grabpl publish-metrics

* grabpl -> ./bin/build

* fix lint error
2022-09-12 13:28:08 -05:00
Alexa V
18310785a1
Chore: Fix ShellCheck issue in the local a11y report (#55036) 2022-09-12 16:54:06 +02:00
Alexa V
493a2c8e15
A11y: Add Dashboard Settings to Pa11y CI and Refactor local a11y report (#54476) 2022-09-12 15:14:45 +02:00
Emil Tullstedt
b287047052
Chore: Upgrade Go to 1.19.1 (#54902)
* WIP

* Set public_suffix to a pre Ruby 2.6 version

* we don't need to install python

* Stretch->Buster

* Bump versions in lib.star

* Manually update linter

Sort of messy, but the .mod-file need to contain all dependencies that
use 1.16+ features, otherwise they're assumed to be compiled with
-lang=go1.16 and cannot access generics et al.

Bingo doesn't seem to understand that, but it's possible to manually
update things to get Bingo happy.

* undo reformatting

* Various lint improvements

* More from the linter

* goimports -w ./pkg/

* Disable gocritic

* Add/modify linter exceptions

* lint + flatten nested list

Go 1.19 doesn't support nested lists, and there wasn't an obvious workaround.
https://go.dev/doc/comment#lists
2022-09-12 12:03:49 +02:00
Dimitris Sotirakis
8c081d4523
Remove gen-version from windows pipelines (#54941) 2022-09-09 03:22:38 -04:00
Dimitris Sotirakis
e277ab0017
CI: Call for Grafana version on demand - remove need for version.json (#54638)
* Remove need for version.json

* Fix lint

* log.Info -> fmt.Print

* Add back tests

* Remove non-used file

* Fix lint

* Update grabpl version to v3.0.6
2022-09-09 02:35:10 -04:00
Shirley
bdd0af0645
Build: Refactor cron_job_pipeline to take the cron name as a parameter (#54899) 2022-09-08 13:36:36 +02:00
Joe Blubaugh
a101d127cb
CI: Update Drone MySQL version to 5.7.39 to match database policy. (#54612)
The supported database policy is listed at: https://grafana.com/docs/grafana/latest/setup-grafana/installation/#supported-databases
2022-09-08 15:03:02 +08:00
Dimitris Sotirakis
8e577ce9fa
CI: Trigger *-storybook steps on UI changes (#54833)
* No-op, small starlark refactoring

* Make build and store storybook steps execute on ui changes
2022-09-07 15:08:13 +03:00
Kevin Minehart
1169f14d47
CI: move grabpl build-frontend-packages from grabpl to grafana (#53072)
* move grabpl build-frontend-packages

* add frontend and lerna packages

* grabpl build-frontend-packages -> ./bin/build build-frontend-packages

* move getgrafanaversion

* add noinstalldeps flag

* fix compiler error

* fix lint error

* add missing flags
2022-09-06 20:09:08 +03:00
Kevin Minehart
a76ce1f567
CI: move grabpl e2e tests from grabpl to grafana (#53075)
* move grabpl e2e tests
2022-09-02 11:02:10 -04:00
Dimitris Sotirakis
4735de6aa4
Run gen-version in windows pipelines (#54624) 2022-09-02 06:27:20 -04:00
Timur Olzhabayev
b5b41988cf
Docs: Deprecating packages_api and removing it from our pipelines (#54473) 2022-09-01 18:15:44 +02:00
Dimitris Sotirakis
7e2238cf6f
CI: Generate Grafana version (and metadata) when the build binary is built (#54393)
* Add GenerateVersions as BeforeFunc

* Delete gen-version

* Fix lint

* Get build id from env var
2022-09-01 15:43:40 +03:00
Julien Duchesne
67f1778bf1
Add package publishing step (#53553)
Issue: https://github.com/grafana/deployment_tools/issues/36289
Based on the new image: https://github.com/grafana/deployment_tools/tree/master/docker/package-publish
This is a new step meant to replace the store-packages command. It will greatly improve publishing performace and it publishes to a common repository shared with all Grafana products

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-09-01 07:13:44 -04:00
Dimitris Sotirakis
87f2b13efa
CI: Update grabpl verison to v3.0.5 (#54269)
* Update grabpl

* Update to grabpl v3.0.5
2022-08-31 06:27:53 -04:00
Jack Westbrook
5ea01dc9b9
Build: Introduce webpack manifest plugin (#49798)
* build(webpack): introduce manifest plugin

* build(webpack): move manifest.json to root of project and git ignore
2022-08-30 05:18:55 -04:00
Dimitris Sotirakis
50d0581000
Trigger backend tests on devenv changes (#54137) 2022-08-24 14:54:11 +03:00
Esteban Beltran
6fe7a1f034
Icons: Move unicons icons to the repository and generate the iconsBundle.js with nodejs (#53766) 2022-08-23 15:47:14 +02:00
Dimitris Sotirakis
ceb32a7506
Add GCP_KEY secret to the artifacts-page pipeline (#54013) 2022-08-22 08:44:43 -05:00
sam boyer
c23a9d78ab
Actually enforce dashboard schema on devenv (#53797)
* Relocate dashboards test so it runs

* Cover newer schema versions in stripnulls

* Strip nulls and remove iteration fields

* Fix fiscalYearStartMonth bounds

* Fix up and format dashboard schema

* Update thema, tidy Go dependencies
2022-08-16 22:07:57 -04:00
sam boyer
4a5afe4fb6
openapi: Use indentations for human-readable JSON (#53707) 2022-08-15 15:39:18 -04:00
malcolmholmes
a19d82124b
Build: upgrade Alpine images (#53743) 2022-08-15 18:17:55 +02:00
malcolmholmes
0ac85c8169
Build: fix shellcheck (#53602) 2022-08-11 16:13:41 +01:00
Jack Westbrook
b1ce721cf1
Levitate: Update workflow to find type declaration via package.json (#53539)
* refactor(breaking-changes): make sure to pack and zip tarballed packages before artifact upload

* feat(check-breaking-changes): support extracting npm package tarballs before comparing packages

* chore(breaking-changes): fix typo preventing upload of pr_built_packages.zip
2022-08-11 15:17:51 +02:00
Dimitris Sotirakis
332bc3aa63
CI: Split store-packages step (#53516)
* Remove unused def

* Add grafanacom step
2022-08-11 05:31:35 -04:00
Dimitris Sotirakis
fa4abdcce1
Grafana Build: Sync Grafana versioning changes from build-pipeline (#53522)
* Sync version changes

(cherry picked from commit fb449ba0376cd7d86928e8b08ef77a851488604b)

Sync version refactoring changes

* Update grabpl
2022-08-11 11:44:59 +03:00
Kevin Minehart
d117689aea
CI: move grabpl build-frontend from grabpl to grafana (#53073)
* move grabpl build-frontend
2022-08-10 10:29:51 -04:00
Jo
062d255124
Handle ioutil deprecations (#53526)
* replace ioutil.ReadFile -> os.ReadFile

* replace ioutil.ReadAll -> io.ReadAll

* replace ioutil.TempFile -> os.CreateTemp

* replace ioutil.NopCloser -> io.NopCloser

* replace ioutil.WriteFile -> os.WriteFile

* replace ioutil.TempDir -> os.MkdirTemp

* replace ioutil.Discard -> io.Discard
2022-08-10 15:37:51 +02:00
Dimitris Sotirakis
e9fe9a25dc
Run docs pipeline on *.md changes only, in the packages dir (#53517) 2022-08-10 13:39:56 +03:00
Dimitris Sotirakis
d638cd4fd7
Trigger test release on pkg/cmd/** changes (#53448) 2022-08-09 08:21:09 -05:00
Kevin Minehart
59ce564d49
CI: move grabpl build-docker from grabpl to grafana (#53077)
* add grabpl build-docker
2022-08-09 09:43:28 +03:00
Dimitris Sotirakis
499cac44e3
Remove packages-bucket arg (#53421) 2022-08-08 13:05:26 -04:00
Dimitris Sotirakis
c472726083
Change base image for npm storage (#53419) 2022-08-08 12:43:44 -04:00
Dimitris Sotirakis
732c22ed02
CI: Update grabpl to v3.0.1 (#53369)
* Update grabpl to v3.0.0

* Update to v3.0.1
2022-08-08 12:08:55 -04:00
Kevin Minehart
d1d237f30a
CI: move grabpl shellcheck from grabpl to grafana (#53076)
* add grabpl shellcheck

* grabpl shellcheck -> ./bin/build shellcheck
2022-08-08 10:36:13 -05:00
lean.dev
e8e7b59bb0
Implementing OpenApi 3 specs (converted from Swagger 2) (#53243)
* Adding OpenApi target to makefile, to covert swagger spec into OpenAPI 3
* Adding endpoint to server swaggerui with new openapi3 specs
* Passing output file as parameter for OpenApi3 specs
* Implement workaround for missing host and prefix domain
2022-08-04 13:51:12 -03:00
Kevin Minehart
138f03aad1
CI: move grabpl build-plugins from grabpl to grafana (#53071)
* add grabpl command to build internal plugins

* grabpl build-plugins -> ./bin/build build-plugins
2022-08-04 11:39:36 -05:00
Esteban Beltran
112f69177b
Build: Replace the file-loader loader with asset module in webpack config (#53088) 2022-08-04 10:29:42 +02:00
Jack Westbrook
d87bf30e9e
Build: Introduce ESM and Treeshaking to NPM package builds (#51517)
* Revert "Chore: Bump terser to fix security vulnerability (#53052)"

This reverts commit 7ae74d2a18.

* feat: use tsc and rollup directly with esbuild and publishConfig, files props

* refactor(grafana-data): fix isolatedModules re-export type error

* refactor(grafana-data): import paths from src not package name

* refactor(rollup): fix dts output.file

* chore(grafana-schema): delete dashboard_experimental.gen.ts - cannot work with isolatedModules

* refactor(grafana-e2e-selectors): fix export types isolatedModules error

* refactor(grafana-runtime): fix isolatedModules re-export type error

* refactor(grafana-ui): fix isolatedModules re-export type error

* feat(grafana-ui): use named imports for treeshaking

* refactor(grafana-ui): use named imports for treeshaking

* feat: react and react-dom as peerDeps for packages

* feat(grafana-ui): emotion packages as peerDeps

* feat(grafana-e2e): use tsc, rollup, esbuild for bundling

* chore(packages): clean up redundant dependencies

* chore(toolkit): deprecate unused package:build task

* chore(schema): put back dashboard_experimental and exclude to prevent isolatedModules error

* docs(packages): update readme

* chore(storybook): disable isolatedModules for builds

* chore: relax peerDeps for emotion and react

* revert(grafana-ui): put @emotion dependencies back

* refactor: replace relative package imports with package name

* build(packages): set emitDeclaration false for typecheck scripts to work

* test(publicdashboarddatasource): move test next to implementation. try to appease the betterer gods

* chore(storybook): override ts-node config for storybook compilation

* refactor(grafana-data): use ternary so babel doesnt complain about expecting flow types

* chore(toolkit): prefer files and publishConfig package.json props over copying

* build(npm): remove --contents dist arg from publishing commands

* chore(packages): introduce sideEffects prop to package.json to hint package can be treeshaken

* chore(packages): remove redundant index.js files

* feat(packages): set publishConfig.access to public

* feat(packages): use yarn berry and npm for packaging and publishing

* refactor(packages): simplify rollup configs

* chore(schema): add comment explaining need to exclude dashboard_experimental

* revert(toolkit): put back clean to prevent cli failures

* ci(packages): run packages:pack before a canary publish

* chore(gitignore): add npm-artifacts directory to ignore list

* test(publicdashboarddatasource): fix module mocking

* chore(packages): delete package.tgz when running clean

* chore(grafana-data): move dependencies from devDeps to prevent build resolution errors
2022-08-03 15:47:09 +02:00
Dimitris Sotirakis
1d1fb07124
Make retrieve and release npm packages allowed to fail (#53191) 2022-08-03 08:24:32 -04:00
Dimitris Sotirakis
5d014f0c37
CI: Run main-docs pipeline only, when a docs PR is merged (#53026)
* Trigger docs pipeline on main, on docs only changes

* Export docs inclusion paths in variable
2022-08-03 08:08:43 -04:00
Julien Duchesne
157303d8ba
Drone: Add retries for pipelines (#53171)
* Drone: Add retries for pipelines
Self-explanatory, this should reduce flakiness for the clone step

* Oops remove extra file
2022-08-03 14:51:29 +03:00
Ezequiel Victorero
e0d71f02b1
Public Dashboards: add e2e tests for public dashboards (#52970) 2022-08-01 11:20:49 -03:00
Dimitris Sotirakis
cea4b3fb19
Make compile-build-cmd depend on init-enterprise (#53029) 2022-08-01 06:56:06 -04:00
Dimitris Sotirakis
1666871d48
Trigger pr-integration-tests pipeline only on backend changes (#53024) 2022-08-01 12:36:32 +03:00
Ashley Harrison
921d32d70b
Chore: use new pa11y-ci version (#52953)
* use new pa11y-ci version, update some thresholds and set standard to WCAG2AA

* remove unneeded comment

* PRs won't have unified alerting enabled...
2022-07-28 12:49:41 -04:00
Kevin Minehart
d567f199dd
CI: add the grabpl build-backend command into the repo (#52673)
* Move the grabpl build-backend command and clean it up a bit
2022-07-28 10:11:22 -04:00
Dimitris Sotirakis
f215a35caf
Docker: Install jq on build-container image (#52928)
* Install jq on build-container image

* Bump build-container version
2022-07-28 08:21:48 -05:00
Dimitris Sotirakis
12079a7285
Remove unused code (#52806) 2022-07-26 15:08:45 +01:00
Dimitris Sotirakis
f26c49ecc0
Remove build-storybook from release-branch mode for enterprise (#52654) 2022-07-22 08:29:29 -04:00
Dimitris Sotirakis
6e6863f10a
Remove condition - simplify code (#52637) 2022-07-22 12:23:08 +03:00
Dimitris Sotirakis
3b6cef9dfa
CI: Refactor/Reorder *.star files (#52384)
* Refactor test pipelines

* Move pr, main and release starlark files under scripts/drone/event

* Move cron.star to scripts/drone/events

* Further unused code removal

* Introducing build.star

* Extract verify_drone.star

* Extract windows.star

* Extract publish.star

* Remove unused code

* Fix formatting in main.star
2022-07-20 09:43:19 -04:00
Emil Tullstedt
78f26a079c
Chore: Upgrade to Go version 1.17.12 (#52523) 2022-07-20 14:27:44 +02:00
Dimitris Sotirakis
47678cd087
CI; Update Dockerfile for grafana/grafana-ci-deploy container (#52516)
* Use python 3.7 for gcloud

* Update comment for reference

* Update image version

* Update gcloud components
2022-07-20 06:34:09 -04:00
Dimitris Sotirakis
529289268b
Docker: Install git in grafana/grafana-ci-deploy image (#52466)
* Install git in grafana/grafana-ci-deploy image

* Bump grafana/grafana-ci-deploy version
2022-07-19 11:04:16 -04:00
Dimitris Sotirakis
e0d1af1867
Remove volumes from build-e2e pipeline on main (#52386) 2022-07-19 14:38:43 +03:00
Dimitris Sotirakis
2af5feb147
CI: Add pr-verify-drone pipeline (#51951)
* Introduce pr-verify-drone pipeline

* Remove `make drone` pre-commit hook

* Remove lint-drone from test-backend pipeline
2022-07-08 12:18:46 +03:00
Dimitris Sotirakis
beb60a5de2
Make store packages depend on gen-version (#51916) 2022-07-07 15:13:47 -04:00
Dimitris Sotirakis
5cbb7003c0
Add artifacts-page grabpl command (#51894) 2022-07-07 11:00:28 -04:00
Dimitris Sotirakis
6447e08809
Add gen-version step to release pipelines (#51913) 2022-07-07 10:32:18 -04:00
Dimitris Sotirakis
88943590b3
Add gen-version for main-publish pipeline (#51890) 2022-07-07 12:58:20 +01:00
Dimitris Sotirakis
f279699beb
CI: Abstract Grafana versioning (#50935)
* Remove flags and update grabpl

* Sign drone yaml
2022-07-07 13:41:27 +03:00
Ashley Harrison
f654152dc8
Chore: split betterer into it's own CI step and allow failures for now (#51543)
* split betterer into it's own CI step and allow failures for now

* Run make drone

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-06-29 15:04:52 +01:00
Simon Deziel
a46daf2300
Drop unused debian packages (#45173)
* apt-transport-https is no longer needed (apt has builtin HTTPS support)

apt-transport-https is a virtual package since Ubuntu Bionic as apt
natively supports HTTPS repos since then, see:
https://packages.ubuntu.com/bionic/apt-transport-https

Signed-off-by: Simon Deziel <simon@sdeziel.info>

* Stop pulling software-properties-common (unused)

software-properties-common was used for the add-apt-repository
command that is no longer used since commit 26cf3d9c66

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2022-06-29 09:41:08 -04:00
Ashley Harrison
688164bbd6
Chore: add a betterer test for undocumented stories (#51444)
* add a betterer test for undocumented stories

* update results

* Update .betterer.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* update results

* prettier

* slightly nicer regexp

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 12:25:31 +01:00
Ashley Harrison
0124dc8e6b
Chore: reintroduce type assertion test + change emitted metric names (#51375)
* reintroduce type assertion test + change emitted metric names

* rename test to better eslint to be more generic
2022-06-25 07:45:38 -04:00
Josh Hunt
78ee9ffa37
Chore: Remove CI stats that are also reported by betterer (#51318)
* Chore: Remove CI stats that are reported by betterer

* update betterer results
2022-06-23 14:20:45 +02:00
Ashley Harrison
ded3d53d89
Chore: Additional betterer tests for type assertions and explicit any (#45901)
* Add betterer tests to prevent adding more type assertions and explicit any's into the codebase

* update betterer results file

* better glob matching

* updated results

* update results again...

* use more up to date betterer packages

* they're devdeps...

* Commit latest betterer results

* latest .betterer.results

Co-authored-by: joshhunt <josh@trtr.co>
2022-06-23 11:36:20 +01:00
idafurjes
ef23a76310
Remove integration tags for enterprise (#50974)
* Remove integration tags for enterprise

* Adjust integration tests and backend tests for the current enterprise setup

* Remove entrerprise2 integration step and use go command for enterprise2 backend step

* CI: Tidy up `release-enterprise-*` pipeline dependencies (#51031)

* Tidy up enterprise deps

* Fixes according to reviewer's comments

Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
2022-06-22 15:22:42 +02:00
ying-jeanne
f81f33420e
Chore: Update build-container to version 1.5.7 (#51188) 2022-06-22 02:55:43 +02:00
Dimitris Sotirakis
f351b9a923
Remove enterprise2 condition - move tests to release pipelines (#51096) 2022-06-21 14:44:51 +02:00
ying-jeanne
62531715b3
Chore: remove bra and scripts/go from grafana (#51130) 2022-06-21 11:08:08 +02:00
ying-jeanne
4489f331b8
Chore: Use the bingo built golangci-lint (#51048)
* use the bingo built golangci-lint

* remove grapl usage

* add dependancy
2022-06-17 19:46:20 +02:00
idafurjes
335ce44890
Fix integration tests for mysql and postgres (#50867)
* Fix integration tests for mysql and postgres

* Package by package testing

* Adding make gen-go to the postgres and mysql integration step

* Rewrite command for backend integration tests

* Diffentiate command for OSS and enterprise
* Add wire-install as dependant for OSS integration tests
* set GRAFANA_TEST_DB variable in the go test command

* No verbose output

* Remove redundant env var

* Try fixing the tests

* Trying stg else

* Remove verbose

Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
2022-06-16 16:41:56 +02:00
Dimitris Sotirakis
8a6ed3d81b
Remove armv6 from build-backend variants (#50878) 2022-06-15 16:46:47 +03:00
Dimitris Sotirakis
7566f800e6
Include public/app/plugins/**/plugin.json in the BE test paths (#50756) 2022-06-14 12:22:52 +03:00
Agnès Toulet
3e5e86d926
Drone: remove flag from main downstream step (#50681) 2022-06-13 17:06:11 +02:00
Kat Yang
bd35e6917a
Chore: Exclude integration tests from running on test-backend step (#50359)
* Chore: Exclude integration tests from running on test-backend step

* Remove -v from go test command

* Add check to skip integration tests before each integration test

* Try to restart pipeline

* Retrying to make pipeline run
2022-06-10 11:46:21 -04:00
Josh Hunt
9d73264895
No longer generate theme json as it's not compatible with the right tooling (#50605) 2022-06-10 14:26:56 +01:00
Dimitris Sotirakis
5633648383
Rename release pipelines (#50585) 2022-06-10 12:28:50 +02:00
sam boyer
9fc889f5f6
ci: Depend on init-enterprise for gen-cue verify (#50191) 2022-06-09 09:48:27 +03:00
Dimitris Sotirakis
63ed5367c3
Remove test_steps (#50396) 2022-06-08 14:00:52 +03:00