-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Releasing pipeline #35
Conversation
I enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all makes sense to me. i like the reorganization of the tests and this is much cleaner, testing multiple Grafana versions. AMAZING WORK!!!!! 🚀🚀🚀🚀🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Added a few comments around the e2e setup.
FYI: In case you experience issues connecting to the Grafana instance in your e2e tests, it may be due to an issue in the Docker dev env. See this thread for more info.
|
||
- name: Stop grafana docker | ||
run: docker-compose down |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason not to use the example workflow for backend plugins from the this? If not, I suggest replacing the content of this file entirely with the yarn based example.
Grafana has a GCS bucket for e2e artifacts. If you want to, you can publish the Playwright report as part of CI. Then a link to the report for every e2e session will be added in the github workflow summary (see the bottom of the page for this pr for example).
- name: Publish report to GCS
if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }}
uses: grafana/plugin-actions/publish-report@main
with:
grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }}
Just bear in mind that the published report will be public on the Internet, so don't do this in case you use secrets in your e2e tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That wasn't working for me so I had to remove it. It was asking for some kind of env variable which I do not have and don't know how to have it. I'd keep the current version for now 'cause it's working. Maybe later I'll replace it. I'll create an issue for this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I am using the suggested one with one addition. docker-compose down
E2E testing CI workflow: https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/ci?current-package-manager=yarn
Backend Testing CI workflow: https://github.com/grafana/clickhouse-datasource/blob/main/.github/workflows/run-backend-tests.yml
Access Policy: https://grafana.com/orgs/grafana/access-policies
prometheus-amazon-datasource-plugin
How to release a datasource https://docs.google.com/document/d/1jKH397IEjQsUojaBnA_whSkhiAviVGJ6eIVrpomoPLM/edit (this explains with drone.yml but we don't use it.)
Apparently we also need a drone pipeline too: https://github.com/grafana/enterprise-datasources/wiki/New-plugin-publish-process#setup-drone-pipeline
I'll provide that one in a separate PR
What has been done?
npx @grafana/create-plugin@latest update
See https://www.npmjs.com/package/@grafana/create-plugin.config
folder.nvmrc
tov20.9.0
likegrafana/grafana
cypress
mock testmatchers
undersrc
playwright-report/index.html
from git cache3000
docker-compose-debug.yml
docker-compose.yml
version in src/plugin.json
tests-examples
sign
command since the plugin is still private https://grafana.com/developers/plugin-tools/publish-a-plugin/sign-a-plugin#sign-a-private-plugin