Commit 7d8cb686 by Arve Knudsen Committed by GitHub

Drone: Publish NPM packages after Storybook to avoid race condition (#29340)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent 22788d1d
...@@ -434,6 +434,7 @@ steps: ...@@ -434,6 +434,7 @@ steps:
from_secret: gcp_key from_secret: gcp_key
depends_on: depends_on:
- build-storybook - build-storybook
- end-to-end-tests
- name: build-frontend-docs - name: build-frontend-docs
image: grafana/build-container:1.2.29 image: grafana/build-container:1.2.29
...@@ -933,18 +934,6 @@ steps: ...@@ -933,18 +934,6 @@ steps:
- mysql-integration-tests - mysql-integration-tests
- postgres-integration-tests - postgres-integration-tests
- name: release-npm-packages
image: grafana/build-container:1.2.29
commands:
- ./node_modules/.bin/lerna bootstrap
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
- ./scripts/build/release-packages.sh ${DRONE_TAG}
environment:
NPM_TOKEN:
from_secret: npm_token
depends_on:
- end-to-end-tests
- name: publish-storybook - name: publish-storybook
image: grafana/grafana-ci-deploy:1.2.7 image: grafana/grafana-ci-deploy:1.2.7
commands: commands:
...@@ -957,6 +946,19 @@ steps: ...@@ -957,6 +946,19 @@ steps:
from_secret: gcp_key from_secret: gcp_key
depends_on: depends_on:
- build-storybook - build-storybook
- end-to-end-tests
- name: release-npm-packages
image: grafana/build-container:1.2.29
commands:
- ./node_modules/.bin/lerna bootstrap
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
- ./scripts/build/release-packages.sh ${DRONE_TAG}
environment:
NPM_TOKEN:
from_secret: npm_token
depends_on:
- publish-storybook
services: services:
- name: postgres - name: postgres
...@@ -1699,17 +1701,6 @@ steps: ...@@ -1699,17 +1701,6 @@ steps:
- mysql-integration-tests - mysql-integration-tests
- postgres-integration-tests - postgres-integration-tests
- name: release-npm-packages
image: grafana/build-container:1.2.29
commands:
- ./node_modules/.bin/lerna bootstrap
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
environment:
NPM_TOKEN:
from_secret: npm_token
depends_on:
- end-to-end-tests
- name: publish-storybook - name: publish-storybook
image: grafana/grafana-ci-deploy:1.2.7 image: grafana/grafana-ci-deploy:1.2.7
commands: commands:
...@@ -1719,6 +1710,18 @@ steps: ...@@ -1719,6 +1710,18 @@ steps:
from_secret: gcp_key from_secret: gcp_key
depends_on: depends_on:
- build-storybook - build-storybook
- end-to-end-tests
- name: release-npm-packages
image: grafana/build-container:1.2.29
commands:
- ./node_modules/.bin/lerna bootstrap
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
environment:
NPM_TOKEN:
from_secret: npm_token
depends_on:
- publish-storybook
services: services:
- name: postgres - name: postgres
......
...@@ -301,6 +301,7 @@ def publish_storybook_step(edition, ver_mode): ...@@ -301,6 +301,7 @@ def publish_storybook_step(edition, ver_mode):
'image': publish_image, 'image': publish_image,
'depends_on': [ 'depends_on': [
'build-storybook', 'build-storybook',
'end-to-end-tests',
], ],
'environment': { 'environment': {
'GCP_KEY': { 'GCP_KEY': {
......
...@@ -45,7 +45,8 @@ def release_npm_packages_step(edition, ver_mode): ...@@ -45,7 +45,8 @@ def release_npm_packages_step(edition, ver_mode):
'name': 'release-npm-packages', 'name': 'release-npm-packages',
'image': build_image, 'image': build_image,
'depends_on': [ 'depends_on': [
'end-to-end-tests', # Has to run after publish-storybook since this step cleans the files publish-storybook depends on
'publish-storybook',
], ],
'environment': { 'environment': {
'NPM_TOKEN': { 'NPM_TOKEN': {
...@@ -78,8 +79,8 @@ def get_steps(edition, ver_mode, publish): ...@@ -78,8 +79,8 @@ def get_steps(edition, ver_mode, publish):
if publish: if publish:
steps.extend([ steps.extend([
upload_packages_step(edition=edition, ver_mode=ver_mode), upload_packages_step(edition=edition, ver_mode=ver_mode),
release_npm_packages_step(edition=edition, ver_mode=ver_mode),
publish_storybook_step(edition=edition, ver_mode=ver_mode), publish_storybook_step(edition=edition, ver_mode=ver_mode),
release_npm_packages_step(edition=edition, ver_mode=ver_mode),
]) ])
windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode) windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode)
......
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