|
|
|
@ -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, |
|
|
|
|
) |
|
|
|
|