mirror of https://github.com/grafana/grafana
CI: Add `aws-marketplace` pipeline (#60484)
* Add aws marketplace automation # Conflicts: # .drone.yml * Fix secret paths # Conflicts: # .drone.yml * Add docker socket # Conflicts: # .drone.yml # Conflicts: # .drone.yml * s/enterprise2/enterprise * Add dependency on the enterprise docker publish # Conflicts: # .drone.yml * Replace testing args with prod args # Conflicts: # .drone.yml * Fix path # Conflicts: # .drone.ymlpull/60539/head
parent
c25fe34ac0
commit
158502572e
@ -0,0 +1,38 @@ |
||||
load( |
||||
'scripts/drone/steps/lib.star', |
||||
'download_grabpl_step', |
||||
'publish_images_step', |
||||
'compile_build_cmd', |
||||
'fetch_images_step', |
||||
'publish_image', |
||||
) |
||||
|
||||
load('scripts/drone/vault.star', 'from_secret') |
||||
|
||||
load( |
||||
'scripts/drone/utils/utils.star', |
||||
'pipeline', |
||||
) |
||||
|
||||
def publish_aws_marketplace_step(): |
||||
return { |
||||
'name': 'publish-aws-marketplace', |
||||
'image': publish_image, |
||||
'commands': ['./bin/build publish aws --image grafana/grafana-enterprise --repo grafana-labs/grafanaenterprise --product 422b46fb-bea6-4f27-8bcc-832117bd627e'], |
||||
'depends_on': ['fetch-images-enterprise'], |
||||
'environment': { |
||||
'AWS_REGION': from_secret('aws_region'), |
||||
'AWS_ACCESS_KEY_ID': from_secret('aws_access_key_id'), |
||||
'AWS_SECRET_ACCESS_KEY': from_secret('aws_secret_access_key'), |
||||
}, |
||||
'volumes': [{'name': 'docker', 'path': '/var/run/docker.sock'}], |
||||
} |
||||
|
||||
def publish_aws_marketplace_pipeline(mode): |
||||
trigger = { |
||||
'event': ['promote'], |
||||
'target': [mode], |
||||
} |
||||
return [pipeline( |
||||
name='publish-aws-marketplace-{}'.format(mode), trigger=trigger, steps=[compile_build_cmd(), fetch_images_step('enterprise'), publish_aws_marketplace_step()], edition="", depends_on = ['publish-docker-enterprise-public'], environment = {'EDITION': 'enterprise2'} |
||||
),] |
Loading…
Reference in new issue