Commit Graph

288 Commits

Author SHA1 Message Date
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
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
Dimitris Sotirakis
50d0581000
Trigger backend tests on devenv changes (#54137) 2022-08-24 14:54:11 +03:00
Dimitris Sotirakis
ceb32a7506
Add GCP_KEY secret to the artifacts-page pipeline (#54013) 2022-08-22 08:44:43 -05:00
malcolmholmes
a19d82124b
Build: upgrade Alpine images (#53743) 2022-08-15 18:17:55 +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
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
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
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
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
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
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
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
sam boyer
8876d56495
schema: Migrate from scuemata to thema (#49805)
* Remove crufty scuemata bits

Buhbye to: cue/ dir with old definitions, CI steps for checking unnecessary
things, and the original dashboard scuemata file.

* Remove grafana-cli cue subcommand

* Remove old testdata

* Don't swallow errors from codegen

* Small nits and tweaks to cuectx package

* WIP - refactor pluggen to use Thema

Also consolidate the embed.FS in the repo root.

* Finish halfway rename

* Convert all panel models.cue to thema

* Rewrite pluggen to use Thema

* Remove pkg/schema, and trim command

* Remove schemaloader service and usages

Will be replaced by coremodel-centric hydrate/dehydrate system Soon™.

* Remove schemaloader from wire

* Remove hangover field on histogram models.cue

* Fix lint errors, some vestiges of trim service

* Remove unused cuetsify cli command
2022-06-06 17:52:44 -07:00
Dimitris Sotirakis
7b750cc0f0
Update Golang - bump grabpl and build-container (#50253) 2022-06-06 15:38:39 +02:00
Kat Yang
c63ebc887b
Chore: Run integration tests without grabpl (#49448)
* Chore: Run integration tests without grabpl

* Add new step for integration tests in lib.star

* Remove old integration test step from lib.star

* Change drone signature

* Fix: Edit starlark integration step to not affect enterprise

* Remove all build tags & rename starlark integration test step

* Resync .drone.yml with .drone.star

* Fix lint errors

* Fix lint errors

* Fix lint errors

* Fix more lint errors

* Fix another lint error

* Rename integration test step

* Fix last lint error

* Recomment enterprise step

* Remove comment from Makefile

Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
2022-06-01 14:55:22 -04:00
Dimitris Sotirakis
b6a329c268
CI: Trigger pr-test-* pipelines on different cases (#48426)
* Trigger pr-test-backend pipeline on pkg/* changes

* Exclude paths for pr-test-frontend pipeline

* Add more paths

* Revert *.md - trigger on go.* changes

* Replace star with doublestar
2022-06-01 11:47:50 +03:00
sam boyer
be06d37a20
schema: Generate Go and Typescript from Thema coremodels (#49193)
* Add go code generator for coremodels

* Just generate the entire coremodel for now

Maybe we'll need more flexibility as more coremodels are added, but for
now this is fine.

* Add note on type comment about stability, grodkit

* Remove local replace directive for thema

* Generate typescript from coremodel

* Update pkg/coremodel/dashboard/addenda.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Update cuetsy to new release

* Update thema to latest

* Fix enum generation for FieldColorModeId

* Put main generated object at the end of the file

* Tweaks to generated Go output

* Retweak back to var

* Add generated coremodel test

* Remove local replace statement again

* Add Make target and call into cuetsy cmd from gen

* Rename and comment linsrc for readability

* Move key codegen bits into reusable package

* Move body of cuetsifier into codegen pkg

Also genericize the diffing output into reusable WriteDiffer.

* Refactor coremodel generator to use WriteDiffer

* Add gen-cue step to CI

* Whip all the codegen automation into shape

* Add simplistic coremodel canonicality controls

* Remove erroneously committed test

* Bump thema version

* Remove dead code

* Improve wording of non-canonicality comment

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-27 03:21:37 +02:00
Kevin Minehart
61101056b6
upgrade grabpl (#49534) 2022-05-24 13:18:05 -05:00
Agnès Toulet
4bd97c8673
Drone: Trigger Enterprise PR checks for OSS PRs (#47176)
* Drone: add enterprise-init-downstream step

* fixes

* Add OSS_PULL_REQUEST env variable for downstream builds

* sign Drone config

* Update .drone.yml

* use test grabpl

* test without init step

* fix downstream branch

* unknown branch test

* use drone-downstream test image

* revert latest changes

* update Drone and add GH workflow

* fix PR number

* Run Enterprise PR check only on PRs targeting main or release branch

* update repository dispatch action

* remove test data

* update grabpl version
2022-05-16 14:28:37 +02:00
Dimitris Sotirakis
20f62e1841
CI: Split main tests pipeline (#48628)
* Split tests pipeline

* Rename dependencies
2022-05-03 13:54:47 +02:00
Dimitris Sotirakis
b414ac5d8c
Remove references from pr and main starlark (#48544) 2022-04-29 16:15:40 +01:00
Dimitris Sotirakis
c3ba6f962b
CI: Run docs pipeline only upon changes to root markdown files (#48433)
* Run docs pipeline only upon changes to root markdown files

* Include latest/json
2022-04-28 17:41:46 +03:00
Dimitris Sotirakis
a7a5476ac2
CI: Split publish-packages pipeline (#48414)
* Split publish packages pipeline

* Small refactoring
2022-04-28 14:53:32 +03:00
Dimitris Sotirakis
67752ad88c
Reorder dependencies for npm release steps (#48403) 2022-04-28 12:15:28 +02:00
Dimitris Sotirakis
ff23f78b51
Split frontend and backend pipelines (#48362) 2022-04-28 12:04:03 +03:00
Dimitris Sotirakis
430b9ae5cb
CI: Rename main pipelines (#48245)
* Rename main pipelines

* Rename dependencies
2022-04-26 11:40:13 +01:00
Dimitris Sotirakis
412be1f1cf
Add yarn-install when publishing npm packages (#48061) 2022-04-21 16:31:39 +02:00
Emil Tullstedt
24038d9985
Chore: Update Go version (#47914)
* Remove makefile (it's not used anymore)

* Directly download and install nodejs package

The Packages file for deb.nodesource.com/node_16.x doesn't list older
versions, so only the most recent version of nodejs is available. We
don't want to require every update to the build container to have to
update nodejs if a never version is available, so I manually download
the deb and install it with dpkg.

* Update Go version

* Update lib.star

* Generate new .drone.yml
2022-04-20 09:14:12 +02:00
Dimitris Sotirakis
4510519941
Update grabpl (#47824) 2022-04-15 16:00:26 +02:00
Dimitris Sotirakis
508cc58a63
CI: Remove unused --github-token flag (#47773)
* Remove github token flag

* Minor cleanup

* Update grabpl
2022-04-15 10:42:58 +03:00
Dimitris Sotirakis
90892050d0
CI: Remove initialize step (#47622)
* Remove initialize step from pr.star

* Remove initialize step from main.star

* Remove initialize step from release.star

* Reorder dependencies

* Re-add identify runner step

* Add enterprise steps

* Remove is_downstream variable from starlark logic (#47715)

* Make init steps depend on init-enterprise for enterprise pipelines

* Exclude shellcheck from enterprise pipelines

* Add init steps to enterprise integration tests pipeline

* Add dependency for windows enterprise step

* Update grabpl version
2022-04-14 14:56:14 +03:00
Dimitris Sotirakis
1957863b67
Update grabpl (#47643) 2022-04-13 12:22:39 +03:00
Dimitris Sotirakis
3e030d137f
CI: Remove unused downstream build pipelines (#47646)
* Remove unused downstream build pipelines

* Prettify
2022-04-12 16:36:49 +02:00