Build: Remove redundant build_npm_packages_step (#47384)

pull/47394/head
Jack Westbrook 3 years ago committed by GitHub
parent bd058f115b
commit a1ebcd520c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      .drone.yml
  2. 7
      scripts/build/build-npm-packages.sh
  3. 21
      scripts/drone/pipelines/release.star

@ -1611,16 +1611,10 @@ steps:
from_secret: prerelease_bucket from_secret: prerelease_bucket
image: grafana/grafana-ci-deploy:1.3.1 image: grafana/grafana-ci-deploy:1.3.1
name: store-storybook name: store-storybook
- commands:
- ./scripts/build/build-npm-packages.sh ${DRONE_TAG}
depends_on:
- store-storybook
image: grafana/build-container:1.5.3
name: build-npm-packages
- commands: - commands:
- ./bin/grabpl artifacts npm store --tag ${DRONE_TAG} - ./bin/grabpl artifacts npm store --tag ${DRONE_TAG}
depends_on: depends_on:
- build-npm-packages - build-frontend-packages
environment: environment:
GCP_KEY: GCP_KEY:
from_secret: gcp_key from_secret: gcp_key
@ -2186,6 +2180,17 @@ steps:
from_secret: prerelease_bucket from_secret: prerelease_bucket
image: grafana/grafana-ci-deploy:1.3.1 image: grafana/grafana-ci-deploy:1.3.1
name: upload-packages name: upload-packages
- commands:
- ./bin/grabpl artifacts npm store --tag ${DRONE_TAG}
depends_on:
- build-frontend-packages
environment:
GCP_KEY:
from_secret: gcp_key
PRERELEASE_BUCKET:
from_secret: prerelease_bucket
image: grafana/grafana-ci-deploy:1.3.1
name: store-npm-packages
- commands: - commands:
- ./bin/grabpl package --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} - ./bin/grabpl package --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN}
--sign ${DRONE_TAG} --sign ${DRONE_TAG}
@ -4443,6 +4448,6 @@ kind: secret
name: gcp_upload_artifacts_key name: gcp_upload_artifacts_key
--- ---
kind: signature kind: signature
hmac: 83c3edb3a353f2a1f41e4f32b7b24fed3906bb6dabbe9a933fee5829e4c33768 hmac: ec763e70ae08f79845dd4a59c56e6d08ef8e6b39a1f59663aabcc6d9fe758287
... ...

@ -1,7 +0,0 @@
#!/usr/bin/env bash
# lerna bootstrap might have created yarn.lock
git checkout .
echo 'Building packages'
yarn packages:build

@ -56,27 +56,12 @@ load(
) )
load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket') load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket')
def build_npm_packages_step(edition, ver_mode):
if edition == 'enterprise' or ver_mode != 'release':
return None
return {
'name': 'build-npm-packages',
'image': build_image,
'depends_on': [
# Has to run after store-storybook since this step cleans the files publish-storybook depends on
'store-storybook',
],
'commands': ['./scripts/build/build-npm-packages.sh ${DRONE_TAG}'],
}
def store_npm_packages_step(): def store_npm_packages_step():
return { return {
'name': 'store-npm-packages', 'name': 'store-npm-packages',
'image': publish_image, 'image': publish_image,
'depends_on': [ 'depends_on': [
'build-npm-packages', 'build-frontend-packages',
], ],
'environment': { 'environment': {
'GCP_KEY': from_secret('gcp_key'), 'GCP_KEY': from_secret('gcp_key'),
@ -231,12 +216,10 @@ def get_steps(edition, ver_mode):
publish_steps.append(upload_packages_step(edition=edition, ver_mode=ver_mode, trigger=trigger_oss)) publish_steps.append(upload_packages_step(edition=edition, ver_mode=ver_mode, trigger=trigger_oss))
if should_publish: if should_publish:
publish_step = store_storybook_step(edition=edition, ver_mode=ver_mode) publish_step = store_storybook_step(edition=edition, ver_mode=ver_mode)
build_npm_step = build_npm_packages_step(edition=edition, ver_mode=ver_mode)
store_npm_step = store_npm_packages_step() store_npm_step = store_npm_packages_step()
if publish_step: if publish_step:
publish_steps.append(publish_step) publish_steps.append(publish_step)
if build_npm_step and store_npm_step: if store_npm_step:
publish_steps.append(build_npm_step)
publish_steps.append(store_npm_step) publish_steps.append(store_npm_step)
windows_package_steps = get_windows_steps(edition=edition, ver_mode=ver_mode) windows_package_steps = get_windows_steps(edition=edition, ver_mode=ver_mode)

Loading…
Cancel
Save