Skip to content

Commit

Permalink
Fix rest api path and increase task schedule interval
Browse files Browse the repository at this point in the history
  • Loading branch information
droberts2013 committed Nov 1, 2022
1 parent 13ec575 commit 44d9311
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/bamboo/TriggerDeployment.py
Expand Up @@ -93,4 +93,4 @@ def triggerDeployment(environmentId, versionId):
environmentId = getEnvironmentId(projectId, environmentName)
versionId = getVersionId(projectId, versionName)
(deploymentResultId, href) = triggerDeployment(environmentId, versionId)
task.schedule("bamboo/TriggerDeployment.wait-for-deployment.py")
task.schedule("bamboo/TriggerDeployment.wait-for-deployment.py", 30)
Expand Up @@ -26,7 +26,7 @@

def getDeploymentStatus():
print "Executing getDeploymentStatus()\n"
response = request.get('rest/api/latest/deployment/result/%s' % str(deploymentResultId), contentType=contentType, headers=headers)
response = request.get('rest/api/latest/deploy/result/%s' % str(deploymentResultId), contentType=contentType, headers=headers)
if response.isSuccessful():
result = json.loads(response.response)
return (result['lifeCycleState'], result['deploymentState'])
Expand Down Expand Up @@ -55,7 +55,7 @@ def getDeploymentStatus():
print "Error: lifeCycleState is %s and deploymentState is %s" % (lifeCycleState, deploymentState)
sys.exit(1)
elif lifeCycleState == "IN_PROGRESS":
task.schedule("bamboo/TriggerDeployment.wait-for-deployment.py")
task.schedule("bamboo/TriggerDeployment.wait-for-deployment.py", 30)
else:
print "Error: Invalid lifeCycleState %s with deploymentState %s" % (lifeCycleState, deploymentState)
sys.exit(1)

0 comments on commit 44d9311

Please sign in to comment.