mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Drone: Execute artifact publishing for both editions in parallel during release (#29362)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
20
.drone.yml
20
.drone.yml
@@ -1401,11 +1401,29 @@ steps:
|
||||
environment:
|
||||
DOCKERIZE_VERSION: 0.6.1
|
||||
|
||||
- name: publish-packages
|
||||
- name: publish-packages-oss
|
||||
image: grafana/grafana-ci-deploy:1.2.7
|
||||
commands:
|
||||
- printenv GCP_KEY | base64 -d > /tmp/gcpkey.json
|
||||
- ./bin/grabpl publish-packages --edition oss --gcp-key /tmp/gcpkey.json ${DRONE_TAG}
|
||||
environment:
|
||||
GCP_KEY:
|
||||
from_secret: gcp_key
|
||||
GPG_KEY_PASSWORD:
|
||||
from_secret: gpg_key_password
|
||||
GPG_PRIV_KEY:
|
||||
from_secret: gpg_priv_key
|
||||
GPG_PUB_KEY:
|
||||
from_secret: gpg_pub_key
|
||||
GRAFANA_COM_API_KEY:
|
||||
from_secret: grafana_api_key
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: publish-packages-enterprise
|
||||
image: grafana/grafana-ci-deploy:1.2.7
|
||||
commands:
|
||||
- printenv GCP_KEY | base64 -d > /tmp/gcpkey.json
|
||||
- ./bin/grabpl publish-packages --edition enterprise --gcp-key /tmp/gcpkey.json ${DRONE_TAG}
|
||||
environment:
|
||||
GCP_KEY:
|
||||
|
||||
@@ -116,6 +116,38 @@ def get_enterprise_pipelines(trigger, ver_mode, publish):
|
||||
),
|
||||
]
|
||||
|
||||
def publish_packages_step(edition):
|
||||
return {
|
||||
'name': 'publish-packages-{}'.format(edition),
|
||||
'image': publish_image,
|
||||
'depends_on': [
|
||||
'initialize',
|
||||
],
|
||||
'environment': {
|
||||
'GRAFANA_COM_API_KEY': {
|
||||
'from_secret': 'grafana_api_key',
|
||||
},
|
||||
'GCP_KEY': {
|
||||
'from_secret': 'gcp_key',
|
||||
},
|
||||
'GPG_PRIV_KEY': {
|
||||
'from_secret': 'gpg_priv_key',
|
||||
},
|
||||
'GPG_PUB_KEY': {
|
||||
'from_secret': 'gpg_pub_key',
|
||||
},
|
||||
'GPG_KEY_PASSWORD': {
|
||||
'from_secret': 'gpg_key_password',
|
||||
},
|
||||
},
|
||||
'commands': [
|
||||
'printenv GCP_KEY | base64 -d > /tmp/gcpkey.json',
|
||||
'./bin/grabpl publish-packages --edition {} --gcp-key /tmp/gcpkey.json ${{DRONE_TAG}}'.format(
|
||||
edition,
|
||||
),
|
||||
],
|
||||
}
|
||||
|
||||
def release_pipelines(ver_mode='release', trigger=None):
|
||||
services = integration_test_services()
|
||||
if not trigger:
|
||||
@@ -135,35 +167,8 @@ def release_pipelines(ver_mode='release', trigger=None):
|
||||
if publish:
|
||||
publish_pipeline = pipeline(
|
||||
name='publish-{}'.format(ver_mode), trigger=trigger, edition='oss', steps=[
|
||||
{
|
||||
'name': 'publish-packages',
|
||||
'image': publish_image,
|
||||
'depends_on': [
|
||||
'initialize',
|
||||
],
|
||||
'environment': {
|
||||
'GRAFANA_COM_API_KEY': {
|
||||
'from_secret': 'grafana_api_key',
|
||||
},
|
||||
'GCP_KEY': {
|
||||
'from_secret': 'gcp_key',
|
||||
},
|
||||
'GPG_PRIV_KEY': {
|
||||
'from_secret': 'gpg_priv_key',
|
||||
},
|
||||
'GPG_PUB_KEY': {
|
||||
'from_secret': 'gpg_pub_key',
|
||||
},
|
||||
'GPG_KEY_PASSWORD': {
|
||||
'from_secret': 'gpg_key_password',
|
||||
},
|
||||
},
|
||||
'commands': [
|
||||
'printenv GCP_KEY | base64 -d > /tmp/gcpkey.json',
|
||||
'./bin/grabpl publish-packages --edition oss --gcp-key /tmp/gcpkey.json ${DRONE_TAG}',
|
||||
'./bin/grabpl publish-packages --edition enterprise --gcp-key /tmp/gcpkey.json ${DRONE_TAG}',
|
||||
],
|
||||
},
|
||||
publish_packages_step(edition='oss'),
|
||||
publish_packages_step(edition='enterprise'),
|
||||
], depends_on=[p['name'] for p in oss_pipelines + enterprise_pipelines], install_deps=False,
|
||||
ver_mode=ver_mode,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user