mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Storybook: Deploy on PR, master and release (#22827)
* Update CircleCI deployment * Add GCP auth * Change master to latest dir
This commit is contained in:
parent
dc76cc1a26
commit
7f76e8b684
@ -411,6 +411,40 @@ jobs:
|
||||
command: ./scripts/ci-job-succeeded.sh
|
||||
when: on_success
|
||||
|
||||
publish-storybook:
|
||||
description: "Publish Storybook"
|
||||
executor: grafana-publish
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: CI job started
|
||||
command: ./scripts/ci-job-started.sh
|
||||
- run:
|
||||
name: Publish Storybook
|
||||
command: |
|
||||
echo $GCP_GRAFANA_UPLOAD_KEY > /tmp/gcpkey.json
|
||||
gcloud auth activate-service-account --key-file=/tmp/gcpkey.json
|
||||
yarn install --frozen-lockfile --no-progress
|
||||
yarn storybook:build
|
||||
if [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
echo Testing release
|
||||
elif [[ $CIRCLE_BRANCH == "master" ]]; then
|
||||
gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/latest
|
||||
elif [[ -n $CIRCLE_TAG ]]; then
|
||||
gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/$CIRCLE_TAG
|
||||
else
|
||||
gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/${CIRCLE_SHA1:0:7}
|
||||
fi
|
||||
- run:
|
||||
name: CI job failed
|
||||
command: ./scripts/ci-job-failed.sh
|
||||
when: on_fail
|
||||
- run:
|
||||
name: CI job succeeded
|
||||
command: ./scripts/ci-job-succeeded.sh
|
||||
when: on_success
|
||||
|
||||
build-docker-images:
|
||||
description: "Build Docker images"
|
||||
parameters:
|
||||
@ -1019,6 +1053,7 @@ workflows:
|
||||
- build-enterprise-windows-installer
|
||||
- end-to-end-tests
|
||||
- build-release-publisher
|
||||
- publish-storybook
|
||||
- build-docker-images:
|
||||
# No filters, meaning this job runs for all branches
|
||||
name: build-oss-docker-images
|
||||
|
Loading…
Reference in New Issue
Block a user