Return 'trigger_uri' on assembly create and show
On assembly create, solum will generate a trigger_uri which needs to be returned to the user. The user will then add this uri to his/her git repo as a webhook. When a git push is done on this repo, a POST request will be sent to the trigger_uri which will then start the build and deploy workflow. Change-Id: I4add3d10634f7ab4d41af948bde0bc2747d00dde
This commit is contained in:
@@ -113,7 +113,8 @@ class AssemblyCommands(cli_utils.CommandsBase):
|
||||
args = self.parser.parse_args()
|
||||
assembly = self.client.assemblies.create(name=args.assembly,
|
||||
plan_uri=args.plan_uri)
|
||||
fields = ['uuid', 'name', 'description', 'status', 'application_uri']
|
||||
fields = ['uuid', 'name', 'description', 'status', 'application_uri',
|
||||
'trigger_uri']
|
||||
data = dict([(f, getattr(assembly, f, ''))
|
||||
for f in fields])
|
||||
cliutils.print_dict(data, wrap=72)
|
||||
@@ -137,7 +138,8 @@ class AssemblyCommands(cli_utils.CommandsBase):
|
||||
help="Assembly uuid")
|
||||
args = self.parser.parse_args()
|
||||
response = self.client.assemblies.get(assembly_id=args.assembly_uuid)
|
||||
fields = ['uuid', 'name', 'description', 'status', 'application_uri']
|
||||
fields = ['uuid', 'name', 'description', 'status', 'application_uri',
|
||||
'trigger_uri']
|
||||
data = dict([(f, getattr(response, f, ''))
|
||||
for f in fields])
|
||||
cliutils.print_dict(data, wrap=72)
|
||||
|
||||
Reference in New Issue
Block a user