Make sure you have the following dependencies installed first:
-
Install dependencies
yarn install --pure-lockfile
-
Build plugin in development mode or run in watch mode
yarn dev
or
yarn watch
-
Build plugin in production mode
yarn build
-
Build the backend binaries
build:backend
Golden files check that data frames are being generated correctly based on the Timestream API response. They have two parts, the json files represent the raw API response and the golden files represent the expected data frame. Both are generated in executor_test.go.
Note: Only members of the Grafana team can re-generate these files. If you need help with this, ping the @grafana/aws-plugins team on GitHub and they will help out.
- Make sure to comment out the t.Skip("Integration Test") line in the executor_test.go file.
- Run the
TestGenerateTestData
. This should regenerate the json files. - Uncomment the
t.Skip("Integration Test")
again.
- Change the last argument in the CheckGoldenDataResponse call to true. This will re-generate the golden files.
- Run the test, and then undo the change from step 1.
- Re-run the test and they should now pass.
Before doing a release, make sure that the GitHub repository is configured with a GRAFANA_API_KEY
to be able to sign the plugin and that the Golang and Node versions in the release.yaml workflow are correct.
Also, make sure that the path to the plugin validator in the release.yaml is correct (this fixes the error pushd: ./plugin-validator/cmd/plugincheck: No such file or directory
):
pushd ./plugin-validator/pkg/cmd/plugincheck`
You need to have commit rights to the GitHub repository to publish a release.
- Update the version number in the
package.json
file. - Update the
CHANGELOG.md
with the changes contained in the release. - Commit the changes to master and push to GitHub.
- Follow the Drone release process that you can find here