Skip to content

Commit

Permalink
feat(tekton): add next build number support
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Gleeson <brian.gleeson@ie.ibm.com>
  • Loading branch information
briangleeson committed Apr 27, 2023
1 parent 78b8cdc commit 282171e
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 79 deletions.
64 changes: 32 additions & 32 deletions examples/test_cd_tekton_pipeline_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_create_tekton_pipeline_example(self):

response = cd_tekton_pipeline_service.create_tekton_pipeline(
id='94619026-912b-4d92-8f51-6c74f0692d90',
worker=worker_identity_model
worker=worker_identity_model,
)
tekton_pipeline = response.get_result()

Expand All @@ -111,7 +111,7 @@ def test_get_tekton_pipeline_example(self):
# begin-get_tekton_pipeline

response = cd_tekton_pipeline_service.get_tekton_pipeline(
id='94619026-912b-4d92-8f51-6c74f0692d90'
id='94619026-912b-4d92-8f51-6c74f0692d90',
)
tekton_pipeline = response.get_result()

Expand Down Expand Up @@ -141,7 +141,7 @@ def test_update_tekton_pipeline_example(self):

response = cd_tekton_pipeline_service.update_tekton_pipeline(
id='94619026-912b-4d92-8f51-6c74f0692d90',
tekton_pipeline_patch=tekton_pipeline_patch_model
tekton_pipeline_patch=tekton_pipeline_patch_model,
)
tekton_pipeline = response.get_result()

Expand Down Expand Up @@ -204,7 +204,7 @@ def test_create_tekton_pipeline_run_example(self):

response = cd_tekton_pipeline_service.create_tekton_pipeline_run(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
trigger=pipeline_run_trigger_model
trigger=pipeline_run_trigger_model,
)
pipeline_run = response.get_result()

Expand All @@ -227,7 +227,7 @@ def test_get_tekton_pipeline_run_example(self):
response = cd_tekton_pipeline_service.get_tekton_pipeline_run(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
id='94619026-912b-4d92-8f51-6c74f0692d90',
includes='definitions'
includes='definitions',
)
pipeline_run = response.get_result()

Expand All @@ -250,7 +250,7 @@ def test_cancel_tekton_pipeline_run_example(self):
response = cd_tekton_pipeline_service.cancel_tekton_pipeline_run(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
id='94619026-912b-4d92-8f51-6c74f0692d90',
force=True
force=True,
)
pipeline_run = response.get_result()

Expand All @@ -272,7 +272,7 @@ def test_rerun_tekton_pipeline_run_example(self):

response = cd_tekton_pipeline_service.rerun_tekton_pipeline_run(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
id='94619026-912b-4d92-8f51-6c74f0692d90'
id='94619026-912b-4d92-8f51-6c74f0692d90',
)
pipeline_run = response.get_result()

Expand All @@ -294,7 +294,7 @@ def test_get_tekton_pipeline_run_logs_example(self):

response = cd_tekton_pipeline_service.get_tekton_pipeline_run_logs(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
id='94619026-912b-4d92-8f51-6c74f0692d90'
id='94619026-912b-4d92-8f51-6c74f0692d90',
)
logs_collection = response.get_result()

Expand All @@ -317,7 +317,7 @@ def test_get_tekton_pipeline_run_log_content_example(self):
response = cd_tekton_pipeline_service.get_tekton_pipeline_run_log_content(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
pipeline_run_id='bf4b3abd-0c93-416b-911e-9cf42f1a1085',
id='94619026-912b-4d92-8f51-6c74f0692d90'
id='94619026-912b-4d92-8f51-6c74f0692d90',
)
step_log = response.get_result()

Expand All @@ -338,7 +338,7 @@ def test_list_tekton_pipeline_definitions_example(self):
# begin-list_tekton_pipeline_definitions

response = cd_tekton_pipeline_service.list_tekton_pipeline_definitions(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90'
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
)
definitions_collection = response.get_result()

Expand Down Expand Up @@ -371,7 +371,7 @@ def test_create_tekton_pipeline_definition_example(self):

response = cd_tekton_pipeline_service.create_tekton_pipeline_definition(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
source=definition_source_model
source=definition_source_model,
)
definition = response.get_result()

Expand All @@ -393,7 +393,7 @@ def test_get_tekton_pipeline_definition_example(self):

response = cd_tekton_pipeline_service.get_tekton_pipeline_definition(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
definition_id='94299034-d45f-4e9a-8ed5-6bd5c7bb7ada'
definition_id='94299034-d45f-4e9a-8ed5-6bd5c7bb7ada',
)
definition = response.get_result()

Expand Down Expand Up @@ -426,7 +426,7 @@ def test_replace_tekton_pipeline_definition_example(self):
response = cd_tekton_pipeline_service.replace_tekton_pipeline_definition(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
definition_id='94299034-d45f-4e9a-8ed5-6bd5c7bb7ada',
source=definition_source_model
source=definition_source_model,
)
definition = response.get_result()

Expand All @@ -450,7 +450,7 @@ def test_list_tekton_pipeline_properties_example(self):
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
name='prod',
type=['secure', 'text'],
sort='name'
sort='name',
)
properties_collection = response.get_result()

Expand All @@ -474,7 +474,7 @@ def test_create_tekton_pipeline_properties_example(self):
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
name='prop1',
type='text',
value='https://github.com/open-toolchain/hello-tekton.git'
value='https://github.com/open-toolchain/hello-tekton.git',
)
property = response.get_result()

Expand All @@ -496,7 +496,7 @@ def test_get_tekton_pipeline_property_example(self):

response = cd_tekton_pipeline_service.get_tekton_pipeline_property(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
property_name='debug-pipeline'
property_name='debug-pipeline',
)
property = response.get_result()

Expand All @@ -521,7 +521,7 @@ def test_replace_tekton_pipeline_property_example(self):
property_name='debug-pipeline',
name='prop1',
type='text',
value='https://github.com/open-toolchain/hello-tekton.git'
value='https://github.com/open-toolchain/hello-tekton.git',
)
property = response.get_result()

Expand All @@ -545,7 +545,7 @@ def test_list_tekton_pipeline_triggers_example(self):
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
type='manual,scm',
disabled='true',
tags='tag1,tag2'
tags='tag1,tag2',
)
triggers_collection = response.get_result()

Expand Down Expand Up @@ -576,7 +576,7 @@ def test_create_tekton_pipeline_trigger_example(self):
event_listener='pr-listener',
worker=worker_identity_model,
max_concurrent_runs=3,
enabled=True
enabled=True,
)
trigger = response.get_result()

Expand All @@ -598,7 +598,7 @@ def test_get_tekton_pipeline_trigger_example(self):

response = cd_tekton_pipeline_service.get_tekton_pipeline_trigger(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147'
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147',
)
trigger = response.get_result()

Expand All @@ -625,7 +625,7 @@ def test_update_tekton_pipeline_trigger_example(self):
response = cd_tekton_pipeline_service.update_tekton_pipeline_trigger(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147',
trigger_patch=trigger_patch_model
trigger_patch=trigger_patch_model,
)
trigger = response.get_result()

Expand All @@ -648,7 +648,7 @@ def test_duplicate_tekton_pipeline_trigger_example(self):
response = cd_tekton_pipeline_service.duplicate_tekton_pipeline_trigger(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
source_trigger_id='1bb892a1-2e04-4768-a369-b1159eace147',
name='triggerName'
name='triggerName',
)
trigger = response.get_result()

Expand All @@ -673,7 +673,7 @@ def test_list_tekton_pipeline_trigger_properties_example(self):
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147',
name='prod',
type='secure,text',
sort='name'
sort='name',
)
trigger_properties_collection = response.get_result()

Expand All @@ -698,7 +698,7 @@ def test_create_tekton_pipeline_trigger_properties_example(self):
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147',
name='prop1',
type='text',
value='https://github.com/open-toolchain/hello-tekton.git'
value='https://github.com/open-toolchain/hello-tekton.git',
)
trigger_property = response.get_result()

Expand All @@ -721,7 +721,7 @@ def test_get_tekton_pipeline_trigger_property_example(self):
response = cd_tekton_pipeline_service.get_tekton_pipeline_trigger_property(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147',
property_name='debug-pipeline'
property_name='debug-pipeline',
)
trigger_property = response.get_result()

Expand All @@ -747,7 +747,7 @@ def test_replace_tekton_pipeline_trigger_property_example(self):
property_name='debug-pipeline',
name='prop1',
type='text',
value='https://github.com/open-toolchain/hello-tekton.git'
value='https://github.com/open-toolchain/hello-tekton.git',
)
trigger_property = response.get_result()

Expand All @@ -767,7 +767,7 @@ def test_delete_tekton_pipeline_example(self):
# begin-delete_tekton_pipeline

response = cd_tekton_pipeline_service.delete_tekton_pipeline(
id='94619026-912b-4d92-8f51-6c74f0692d90'
id='94619026-912b-4d92-8f51-6c74f0692d90',
)

# end-delete_tekton_pipeline
Expand All @@ -786,7 +786,7 @@ def test_delete_tekton_pipeline_run_example(self):

response = cd_tekton_pipeline_service.delete_tekton_pipeline_run(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
id='94619026-912b-4d92-8f51-6c74f0692d90'
id='94619026-912b-4d92-8f51-6c74f0692d90',
)

# end-delete_tekton_pipeline_run
Expand All @@ -805,7 +805,7 @@ def test_delete_tekton_pipeline_definition_example(self):

response = cd_tekton_pipeline_service.delete_tekton_pipeline_definition(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
definition_id='94299034-d45f-4e9a-8ed5-6bd5c7bb7ada'
definition_id='94299034-d45f-4e9a-8ed5-6bd5c7bb7ada',
)

# end-delete_tekton_pipeline_definition
Expand All @@ -824,7 +824,7 @@ def test_delete_tekton_pipeline_property_example(self):

response = cd_tekton_pipeline_service.delete_tekton_pipeline_property(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
property_name='debug-pipeline'
property_name='debug-pipeline',
)

# end-delete_tekton_pipeline_property
Expand All @@ -843,7 +843,7 @@ def test_delete_tekton_pipeline_trigger_example(self):

response = cd_tekton_pipeline_service.delete_tekton_pipeline_trigger(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147'
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147',
)

# end-delete_tekton_pipeline_trigger
Expand All @@ -863,7 +863,7 @@ def test_delete_tekton_pipeline_trigger_property_example(self):
response = cd_tekton_pipeline_service.delete_tekton_pipeline_trigger_property(
pipeline_id='94619026-912b-4d92-8f51-6c74f0692d90',
trigger_id='1bb892a1-2e04-4768-a369-b1159eace147',
property_name='debug-pipeline'
property_name='debug-pipeline',
)

# end-delete_tekton_pipeline_trigger_property
Expand Down
Loading

0 comments on commit 282171e

Please sign in to comment.