Skip to content

Commit

Permalink
Merge pull request #14 from zhouqr2000/master
Browse files Browse the repository at this point in the history
Allow to override a higher version in next level when promote a release or assignment
  • Loading branch information
jdewinne authored Apr 17, 2018
2 parents 67e9079 + e017323 commit 27eaab7
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

## v3.5.6

* fix: allow to override a higher version when promote an assignment or release. This fix is compatible with older ISPW/CES release. The flag is ignored if not supported for older system. To use this new feature, you should have CES 18.3.1 or above and ISPW 17.02 with PTF IWF163A applied.

Binary file modified images/Promote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/main/resources/ispw/AssignmentClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@ def generate_tasks_in_assignment(self, srid, assignment_id, level, runtime_confi
return response.json()


def promote_assignment(self, srid, assignment_id, level, change_type, execution_status, runtime_configuration, auto_deploy,
def promote_assignment(self, srid, assignment_id, level, change_type, execution_status, runtime_configuration, override, auto_deploy,
callback_task_id,
callback_url, callback_username, callback_password):
context_root = "/ispw/%s/assignments/%s/tasks/promote?level=%s" % (srid, assignment_id, level)
body = {'changeType': change_type, 'executionStatus': execution_status,
'runtimeConfiguration': runtime_configuration,
'override': override,
'autoDeploy': auto_deploy,
'httpHeaders': [{'name': 'Content-type', 'value': 'application/json'}],
'credentials': {'username': callback_username, 'password': callback_password}, 'events': [
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/ispw/ISPWClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def ispwservices_promoteassignment(self, variables):
change_type=variables['changeType'],
execution_status=variables['executionStatus'],
runtime_configuration=variables['runtimeConfiguration'],
override=variables['override'],
auto_deploy=variables['autoDeploy'],
callback_task_id=variables['callbackTaskId'],
callback_url=variables['callbackUrl'],
Expand Down Expand Up @@ -194,6 +195,7 @@ def ispwservices_promote(self, variables):
change_type=variables['changeType'],
execution_status=variables['executionStatus'],
runtime_configuration=variables['runtimeConfiguration'],
override=variables['override'],
auto_deploy=variables['autoDeploy'],
callback_task_id=variables['callbackTaskId'],
callback_url=variables['callbackUrl'],
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/ispw/ReleaseClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ def get_release_task_generate_listing(self, srid, release_id, task_id):
task_id, response.status_code, response.json())
return response.json()

def promote(self, srid, release_id, level, change_type, execution_status, runtime_configuration, auto_deploy,
def promote(self, srid, release_id, level, change_type, execution_status, runtime_configuration, override, auto_deploy,
callback_task_id,
callback_url, callback_username, callback_password):
context_root = "/ispw/%s/releases/%s/tasks/promote?level=%s" % (srid, release_id, level)
body = {'changeType': change_type, 'executionStatus': execution_status,
'runtimeConfiguration': runtime_configuration,
'override': override,
'autoDeploy': auto_deploy,
'httpHeaders': [{'name': 'Content-type', 'value': 'application/json'}],
'credentials': {'username': callback_username, 'password': callback_password}, 'events': [
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/synthetic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@
<property name="executionStatus" category="input" label="Execution Status" kind="string" default="I"
description="Optional, I for immediate execution or at start date/time, H to create request in hold. Default is I"
required="false"/>
<property name="override" category="input" label="Override" kind="boolean" required="false" default="true"
description="Allow to override a higher version in next level when promote"/>
<property name="autoDeploy" category="input" label="Auto Deploy" kind="boolean" required="false"
description="Promotes can be set up to automatically Deploy as well by an option set up by the ISPW Administrator"/>

Expand Down Expand Up @@ -335,6 +337,8 @@
<property name="executionStatus" category="input" label="Execution Status" kind="string" default="I"
description="Optional, I for immediate execution or at start date/time, H to create request in hold. Default is I"
required="false"/>
<property name="override" category="input" label="Override" kind="boolean" required="false" default="true"
description="Allow to override a higher version in next level when promote"/>
<property name="autoDeploy" category="input" label="Auto Deploy" kind="boolean" required="false"
description="Promotes can be set up to automatically Deploy as well by an option set up by the ISPW Administrator"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class PromoteAssignment(unittest.TestCase):
def test_promote_assignment(self):
client = ISPWClientUtil.create_ispw_client(ISPWServerCi(), None)
variables = {"srid": "ispw", "assignmentId": "1234", "level": "test", "changeType":"S", "executionStatus": "I","runtimeConfiguration": "", "autoDeploy": False,
variables = {"srid": "ispw", "assignmentId": "1234", "level": "test", "changeType":"S", "executionStatus": "I","runtimeConfiguration": "", "override":False, "autoDeploy": False,
"callbackTaskId": "taskid", "callbackUrl": "http://localhost:1234", "callbackUsername": "testuser",
"callbackPassword": "testpassword"}
client.ispwservices_promoteassignment(variables)
Expand Down
2 changes: 1 addition & 1 deletion src/test/jython/itests/Releases_PromoteRelease_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class PromoteRelease(unittest.TestCase):
def test_promote_release(self):
client = ISPWClientUtil.create_ispw_client(ISPWServerCi(), None)
variables = {"srid": "ispw", "relId": "1234", "level": "test", "changeType":"S", "executionStatus": "I","runtimeConfiguration": "", "autoDeploy": False,
variables = {"srid": "ispw", "relId": "1234", "level": "test", "changeType":"S", "executionStatus": "I","runtimeConfiguration": "", "override":False, "autoDeploy": False,
"callbackTaskId": "taskid", "callbackUrl": "http://localhost:1234", "callbackUsername": "testuser",
"callbackPassword": "testpassword"}
client.ispwservices_promote(variables)
Expand Down

0 comments on commit 27eaab7

Please sign in to comment.