Commit 7f76e8b6 by Tobias Skarhed Committed by GitHub

Storybook: Deploy on PR, master and release (#22827)

* Update CircleCI deployment

* Add GCP auth

* Change master to latest dir
parent dc76cc1a
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment