[v8.4.x] CI: Sync CI changes (#46083)

* CI: Introduce `build-frontend-packages` step (#45824)

* Split frontend build

* Fix command name

* Update grabpl

(cherry picked from commit 2f6c827f5d)

* CI: Add more checks to standalone docs pipeline (#46449)

* Add build frontend package step

* Reorder dependencies

* Add codespell and prettier checks

(cherry picked from commit 82b436afee)

* Update golang (#46458)

(cherry picked from commit a29159f362)

* Fix architectures
This commit is contained in:
Dimitris Sotirakis
2022-03-11 19:14:16 +02:00
committed by GitHub
parent 3158f15ce5
commit af255219a4
10 changed files with 402 additions and 218 deletions
+36 -6
View File
@@ -1,7 +1,7 @@
load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket')
grabpl_version = 'v2.9.5'
build_image = 'grafana/build-container:1.5.1'
grabpl_version = 'v2.9.25'
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'
@@ -241,6 +241,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',
@@ -421,18 +422,45 @@ 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': [
'initialize'
'build-frontend-packages'
],
'commands': [
'yarn packages:build',
'yarn packages:docsExtract',
'yarn packages:docsToMarkdown',
'./scripts/ci-reference-docs-lint.sh ci',
]
}
@@ -607,6 +635,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'
@@ -682,6 +711,7 @@ def grafana_server_step(edition, port=3001):
'build-plugins',
'build-backend',
'build-frontend',
'build-frontend-packages',
],
'environment': environment,
'commands': [