@@ -17,10 +17,14 @@ description: Upload new plugin artifact to GCS & publish to plugin catalog
1717on :
1818 workflow_dispatch :
1919 inputs :
20- skip-grafana-dev-image :
21- required : false
22- type : boolean
23- default : false
20+ environment :
21+ description : Environment to publish to
22+ required : true
23+ type : choice
24+ options :
25+ - ' dev'
26+ - ' ops'
27+ - ' prod'
2428 push :
2529 branches :
2630 - main
@@ -34,21 +38,25 @@ jobs:
3438 CD :
3539 name : Deploy plugin
3640 # Don't run on forks, ensure tag is on main branch, and restrict workflow_dispatch to main/tag branches
37- if : |
38- github.repository == 'grafana/traces-drilldown' &&
39- (
40- (github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'npm version')) ||
41- (github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')))
42- )
41+ if : github.repository == 'grafana/traces-drilldown'
4342 uses : grafana/plugin-ci-workflows/.github/workflows/cd.yml@main
4443 with :
45- environment : ' dev ' # publishing to 'prod' will also deploy to 'ops' and 'dev'
44+ environment : ${{ inputs.environment || 'ops' }} # publishing to 'prod' will also deploy to 'ops' and 'dev'
4645 attestation : true # this guarantees that the plugin was built from the source code provided in the release
46+
47+ # Don't upload to catalog unless we're doing a release
48+ gcs-only :
49+ ${{ !((github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'npm version')) || (github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')))) }}
50+
51+ # Deploy provisioned plugin to Grafana Cloud
52+ grafana-cloud-deployment-type : provisioned
53+ argo-workflow-slack-channel : ' #proj-tracesdrilldown-cd'
54+
55+ # Playwright
4756 run-playwright : false
4857 run-playwright-docker : false
4958 upload-playwright-artifacts : true # IMPORTANT: we must ensure there are no unmasked secrets in the E2E tests
50- run-playwright-with-skip-grafana-dev-image : ${{ inputs.skip-grafana-dev-image || false }}
59+ run-playwright-with-skip-grafana-dev-image : true
5160 playwright-report-path : e2e/test-reports/
5261 playwright-docker-compose-file : docker-compose.yaml
5362 playwright-grafana-url : http://localhost:3001
54- argo-workflow-slack-channel : ' #proj-tracesdrilldown-cd'
0 commit comments