CI: Backport CI/Release related code to v9.3.x (#62752)
* Batch-move everything
* go mod tidy
* make drone
* Remove genversions
* Bump alpine image
* Revert back pkg/build/docker/build.go
* Make sure correct enterprise branch is checked out
* Add enterprise2 version
* Remove extensions
* Bump build container
* backport node 18 test fix
(cherry picked from commit 4ff03fdbfb)
* Update scripts/drone
* Add more commands
* Fix starlark link
* Copy .drone.star
* Add drone target branch for custom events
---------
This commit is contained in:
@@ -1,36 +1,40 @@
|
||||
"""
|
||||
This module contains steps and pipelines relating to GitHub.
|
||||
"""
|
||||
|
||||
load(
|
||||
'scripts/drone/steps/lib.star',
|
||||
'download_grabpl_step',
|
||||
'publish_images_step',
|
||||
'compile_build_cmd',
|
||||
'fetch_images_step',
|
||||
'publish_image',
|
||||
"scripts/drone/steps/lib.star",
|
||||
"compile_build_cmd",
|
||||
"fetch_images_step",
|
||||
"publish_image",
|
||||
)
|
||||
|
||||
load('scripts/drone/vault.star', 'from_secret')
|
||||
|
||||
load("scripts/drone/vault.star", "from_secret")
|
||||
load(
|
||||
'scripts/drone/utils/utils.star',
|
||||
'pipeline',
|
||||
"scripts/drone/utils/utils.star",
|
||||
"pipeline",
|
||||
)
|
||||
|
||||
def publish_github_step():
|
||||
return {
|
||||
'name': 'publish-github',
|
||||
'image': publish_image,
|
||||
'commands': ['./bin/build publish github --repo $${GH_REGISTRY} --create'],
|
||||
'depends_on': ['fetch-images-enterprise2'],
|
||||
'environment': {
|
||||
'GH_TOKEN': from_secret('github_token'),
|
||||
'GH_REGISTRY': from_secret('gh_registry'),
|
||||
"name": "publish-github",
|
||||
"image": publish_image,
|
||||
"commands": ["./bin/build publish github --repo $${GH_REGISTRY} --create"],
|
||||
"depends_on": ["fetch-images-enterprise2"],
|
||||
"environment": {
|
||||
"GH_TOKEN": from_secret("github_token"),
|
||||
"GH_REGISTRY": from_secret("gh_registry"),
|
||||
},
|
||||
}
|
||||
|
||||
def publish_github_pipeline(mode):
|
||||
trigger = {
|
||||
'event': ['promote'],
|
||||
'target': [mode],
|
||||
"event": ["promote"],
|
||||
"target": [mode],
|
||||
}
|
||||
return [pipeline(
|
||||
name='publish-github-{}'.format(mode), trigger=trigger, steps=[compile_build_cmd(), fetch_images_step('enterprise2'), publish_github_step()], edition="", environment = {'EDITION': 'enterprise2'}
|
||||
),]
|
||||
name = "publish-github-{}".format(mode),
|
||||
trigger = trigger,
|
||||
steps = [compile_build_cmd(), fetch_images_step("enterprise2"), publish_github_step()],
|
||||
edition = "",
|
||||
environment = {"EDITION": "enterprise2"},
|
||||
)]
|
||||
|
||||
Reference in New Issue
Block a user