grafana/scripts/drone/pipelines/aws_marketplace.star
Dimitris Sotirakis 158502572e
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.yml
2022-12-19 11:25:48 -05:00

39 lines
1.3 KiB
Plaintext

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'}
),]