Commit f7567f22 by Arve Knudsen Committed by GitHub

Drone: Execute artifact publishing for both editions in parallel during release (#29362)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent 563fe01f
......@@ -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,
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment