[v8.3.x] CI: Sync CI changes (#46085)
* CI: Introduce `build-frontend-packages` step (#45824) * Split frontend build * Fix command name * Update grabpl (cherry picked from commit2f6c827f5d) * CI: Add docs pipeline for `main` pipelines (#45740) * Add docs pipeline for main * Extract trigger docs * Change trigger for main (cherry picked from commitea3e41ea62) * CI: Add more checks to standalone docs pipeline (#46449) * Add build frontend package step * Reorder dependencies * Add codespell and prettier checks (cherry picked from commit82b436afee) * Update golang (#46458) (cherry picked from commita29159f362)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket')
|
||||
|
||||
grabpl_version = 'v2.9.4'
|
||||
build_image = 'grafana/build-container:1.4.9'
|
||||
grabpl_version = 'v2.9.7'
|
||||
build_image = 'grafana/build-container:1.5.3'
|
||||
publish_image = 'grafana/grafana-ci-deploy:1.3.1'
|
||||
deploy_docker_image = 'us.gcr.io/kubernetes-dev/drone/plugins/deploy-image'
|
||||
alpine_image = 'alpine:3.15'
|
||||
@@ -240,6 +240,7 @@ def build_storybook_step(edition, ver_mode):
|
||||
'depends_on': [
|
||||
# Best to ensure that this step doesn't mess with what's getting built and packaged
|
||||
'build-frontend',
|
||||
'build-frontend-packages',
|
||||
],
|
||||
'environment': {
|
||||
'NODE_OPTIONS': '--max_old_space_size=4096',
|
||||
@@ -381,13 +382,43 @@ def build_frontend_step(edition, ver_mode, is_downstream=False):
|
||||
'commands': cmds,
|
||||
}
|
||||
|
||||
def build_frontend_package_step(edition, ver_mode, is_downstream=False):
|
||||
if not is_downstream:
|
||||
build_no = '${DRONE_BUILD_NUMBER}'
|
||||
else:
|
||||
build_no = '$${SOURCE_BUILD_NUMBER}'
|
||||
|
||||
# TODO: Use percentage for num jobs
|
||||
if ver_mode == 'release':
|
||||
cmds = [
|
||||
'./bin/grabpl build-frontend-packages --jobs 8 --github-token $${GITHUB_TOKEN} ' + \
|
||||
'--edition {} --no-pull-enterprise ${{DRONE_TAG}}'.format(edition),
|
||||
]
|
||||
else:
|
||||
cmds = [
|
||||
'./bin/grabpl build-frontend-packages --jobs 8 --edition {} '.format(edition) + \
|
||||
'--build-id {} --no-pull-enterprise'.format(build_no),
|
||||
]
|
||||
|
||||
return {
|
||||
'name': 'build-frontend-packages',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'initialize',
|
||||
],
|
||||
'environment': {
|
||||
'NODE_OPTIONS': '--max_old_space_size=8192',
|
||||
},
|
||||
'commands': cmds,
|
||||
}
|
||||
|
||||
|
||||
def build_frontend_docs_step(edition):
|
||||
return {
|
||||
'name': 'build-frontend-docs',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'build-frontend'
|
||||
'build-frontend-packages'
|
||||
],
|
||||
'commands': [
|
||||
'./scripts/ci-reference-docs-lint.sh ci',
|
||||
@@ -563,6 +594,7 @@ def package_step(edition, ver_mode, include_enterprise2=False, variants=None, is
|
||||
'build-plugins',
|
||||
'build-backend',
|
||||
'build-frontend',
|
||||
'build-frontend-packages',
|
||||
]
|
||||
if include_enterprise2:
|
||||
sfx = '-enterprise2'
|
||||
@@ -638,6 +670,7 @@ def grafana_server_step(edition, port=3001):
|
||||
'build-plugins',
|
||||
'build-backend',
|
||||
'build-frontend',
|
||||
'build-frontend-packages',
|
||||
],
|
||||
'environment': environment,
|
||||
'commands': [
|
||||
|
||||
Reference in New Issue
Block a user