plugin-tools
plugin-tools copied to clipboard
Create Plugin: Allow users to adopt CI/CD during update
What this PR does / why we need it:
Currently the GitHub workflow files are only generated during the generate command. Running update doesn't do anything with workflows and for good reason since users who run update probably have CI/CD configured already. However, I ran into a situation recently where a datasource would have benefited from being able to "adopt" the workflow files.
#541 and #543 will potentially make this less destructive and we could explore just printing the necessary yml config to stdout at that point since the line count of the config will be much smaller.
With this change users can now run npx @grafana/create-plugin@latest cicd to explicitly adopt the Github Actions workflows.
Hello! 👋 This repository uses Auto for releasing packages using PR labels.
✨ This PR can be merged but will not trigger a new release. To trigger a new release add the release label before merging.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.
As discussed in slack - request is to change this to be a separate command which can be run similar to how we handle provisioning https://github.com/grafana/plugin-tools/pull/529
@academo @sympatheticmoose is correct, we settled on something like: npx @grafana/create-plugin@latest cicd. I can update this PR today hopefully with this change.
I do think we could be more aggressive in the update command because of git like you said, but also because if someone is running update there's a built-in assumption (to me) that things will change :man_shrugging:
@asimpson do you still plan to update this PR or should we close it?
@sunker so sorry for the delay in getting back to this. I added docs and refactored things.
The new question since I created the original draft of this PR is should we be doing it this way given the new action? Will #742 impact how this works?
@asimpson thanks again for this - theres some upcoming changes with generation which will cause issues with this - leave with us for now, but please reach out if this is blocking you
This pull request has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!
This pull request has been automatically closed because it has not had activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!