Skip to content

Commit

Permalink
task user
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmonteiro committed Jun 18, 2024
1 parent 4c0cef0 commit bd075c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def run_with_params(params, mode="cli"):
# Create temp project on which to run tests
# if mode == "cli":
project = Project()
project.name = 'template_test_' + ''.join(random.choices(string.ascii_uppercase + string.digits, k=12))
project.name = 'WorkflowRunner_' + ''.join(random.choices(string.ascii_uppercase + string.digits, k=4))
project.acl.owner = params['user']
project = client.projectService.create(project)
params["projectId"] = project.id
Expand Down Expand Up @@ -283,7 +283,7 @@ def run_with_params(params, mode="cli"):
raise e

finally:
if project != None and client != None and mode == "cli":
if project != None and client != None:
client.workflowService.delete(project.id, project.rev)

if mode == "operator":
Expand All @@ -300,6 +300,8 @@ def run(argv):
# stepId="1ba15e7c-6c3e-4521-81f2-d19fa58a57b9")
tercenCtx = ctx.TercenContext()
params["client"] = tercenCtx.context.client
task = tercenCtx.client.taskService.get(params["taskId"])
params["user"] = task.owner
# wkf = tercenCtx.client.workflowService.get(tercenCtx.get_workflow_id())
# params["projectId"] = wkf.projectId

Expand Down

0 comments on commit bd075c0

Please sign in to comment.