diff --git a/examples/test_cd_tekton_pipeline_v2_examples.py b/examples/test_cd_tekton_pipeline_v2_examples.py
index 088b29f..709d7b0 100644
--- a/examples/test_cd_tekton_pipeline_v2_examples.py
+++ b/examples/test_cd_tekton_pipeline_v2_examples.py
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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()
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
diff --git a/ibm_continuous_delivery/cd_tekton_pipeline_v2.py b/ibm_continuous_delivery/cd_tekton_pipeline_v2.py
index 42f3e1a..5812650 100644
--- a/ibm_continuous_delivery/cd_tekton_pipeline_v2.py
+++ b/ibm_continuous_delivery/cd_tekton_pipeline_v2.py
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# IBM OpenAPI SDK Code Generator Version: 3.62.0-a2a22f95-20221115-162524
+# IBM OpenAPI SDK Code Generator Version: 3.68.2-ac7def68-20230310-195410
"""
Continuous Delivery Tekton pipeline API definition
Maximum request payload size
@@ -112,6 +112,7 @@ def __init__(self,
def create_tekton_pipeline(self,
id: str,
*,
+ next_build_number: int = None,
enable_notifications: bool = None,
enable_partial_cloning: bool = None,
worker: 'WorkerIdentity' = None,
@@ -129,6 +130,9 @@ def create_tekton_pipeline(self,
created in the target toolchain. To get the pipeline ID call the toolchain
API https://cloud.ibm.com/apidocs/toolchain#list-tools and find the
pipeline tool.
+ :param int next_build_number: (optional) Specify the build number that will
+ be used for the next pipeline run. Build numbers can be any positive whole
+ number between 0 and 100000000000000.
:param bool enable_notifications: (optional) Flag whether to enable
notifications for this pipeline. When enabled, pipeline run events are
published on all slack integration specified channels in the parent
@@ -156,9 +160,10 @@ def create_tekton_pipeline(self,
data = {
'id': id,
+ 'next_build_number': next_build_number,
'enable_notifications': enable_notifications,
'enable_partial_cloning': enable_partial_cloning,
- 'worker': worker
+ 'worker': worker,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -357,7 +362,7 @@ def list_tekton_pipeline_runs(self,
'start': start,
'limit': limit,
'status': status,
- 'trigger.name': trigger_name
+ 'trigger.name': trigger_name,
}
if 'headers' in kwargs:
@@ -392,8 +397,8 @@ def create_tekton_pipeline_run(self,
"""
Trigger a pipeline run.
- Trigger a new pipeline run using the named manual trigger, using the provided
- additional or override properties.
+ Trigger a new pipeline run with the named manual or timer trigger, using the
+ provided additional or override properties.
:param str pipeline_id: The Tekton pipeline ID.
:param str trigger_name: (optional) Trigger name.
@@ -440,7 +445,7 @@ def create_tekton_pipeline_run(self,
'secure_trigger_properties': secure_trigger_properties,
'trigger_headers': trigger_headers,
'trigger_body': trigger_body,
- 'trigger': trigger
+ 'trigger': trigger,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -496,7 +501,7 @@ def get_tekton_pipeline_run(self,
headers.update(sdk_headers)
params = {
- 'includes': includes
+ 'includes': includes,
}
if 'headers' in kwargs:
@@ -592,7 +597,7 @@ def cancel_tekton_pipeline_run(self,
headers.update(sdk_headers)
data = {
- 'force': force
+ 'force': force,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -842,7 +847,7 @@ def create_tekton_pipeline_definition(self,
headers.update(sdk_headers)
data = {
- 'source': source
+ 'source': source,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -945,7 +950,7 @@ def replace_tekton_pipeline_definition(self,
headers.update(sdk_headers)
data = {
- 'source': source
+ 'source': source,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -1053,7 +1058,7 @@ def list_tekton_pipeline_properties(self,
params = {
'name': name,
'type': convert_list(type),
- 'sort': sort
+ 'sort': sort,
}
if 'headers' in kwargs:
@@ -1120,7 +1125,7 @@ def create_tekton_pipeline_properties(self,
'type': type,
'value': value,
'enum': enum,
- 'path': path
+ 'path': path,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -1240,7 +1245,7 @@ def replace_tekton_pipeline_property(self,
'type': type,
'value': value,
'enum': enum,
- 'path': path
+ 'path': path,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -1366,7 +1371,7 @@ def list_tekton_pipeline_triggers(self,
'worker.id': worker_id,
'worker.name': worker_name,
'disabled': disabled,
- 'tags': tags
+ 'tags': tags,
}
if 'headers' in kwargs:
@@ -1481,7 +1486,7 @@ def create_tekton_pipeline_trigger(self,
'cron': cron,
'timezone': timezone,
'source': source,
- 'events': events
+ 'events': events,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -1680,7 +1685,7 @@ def duplicate_tekton_pipeline_trigger(self,
headers.update(sdk_headers)
data = {
- 'name': name
+ 'name': name,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -1748,7 +1753,7 @@ def list_tekton_pipeline_trigger_properties(self,
params = {
'name': name,
'type': type,
- 'sort': sort
+ 'sort': sort,
}
if 'headers' in kwargs:
@@ -1819,7 +1824,7 @@ def create_tekton_pipeline_trigger_properties(self,
'type': type,
'value': value,
'enum': enum,
- 'path': path
+ 'path': path,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -1945,7 +1950,7 @@ def replace_tekton_pipeline_trigger_property(self,
'type': type,
'value': value,
'enum': enum,
- 'path': path
+ 'path': path,
}
data = {k: v for (k, v) in data.items() if v is not None}
data = json.dumps(data)
@@ -3849,6 +3854,8 @@ class TektonPipeline():
:attr str href: (optional) API URL for interacting with the pipeline.
:attr int build_number: The latest pipeline run build number. If this property
is absent, the pipeline hasn't had any pipeline runs.
+ :attr int next_build_number: The build number that will be used for the next
+ pipeline run.
:attr bool enable_notifications: Flag whether to enable notifications for this
pipeline. When enabled, pipeline run events will be published on all slack
integration specified channels in the parent toolchain. If omitted, this feature
@@ -3875,6 +3882,7 @@ def __init__(self,
worker: 'Worker',
runs_url: str,
build_number: int,
+ next_build_number: int,
enable_notifications: bool,
enable_partial_cloning: bool,
enabled: bool,
@@ -3900,6 +3908,8 @@ def __init__(self,
runs.
:param int build_number: The latest pipeline run build number. If this
property is absent, the pipeline hasn't had any pipeline runs.
+ :param int next_build_number: The build number that will be used for the
+ next pipeline run.
:param bool enable_notifications: Flag whether to enable notifications for
this pipeline. When enabled, pipeline run events will be published on all
slack integration specified channels in the parent toolchain. If omitted,
@@ -3926,6 +3936,7 @@ def __init__(self,
self.runs_url = runs_url
self.href = href
self.build_number = build_number
+ self.next_build_number = next_build_number
self.enable_notifications = enable_notifications
self.enable_partial_cloning = enable_partial_cloning
self.enabled = enabled
@@ -3988,6 +3999,10 @@ def from_dict(cls, _dict: Dict) -> 'TektonPipeline':
args['build_number'] = _dict.get('build_number')
else:
raise ValueError('Required property \'build_number\' not present in TektonPipeline JSON')
+ if 'next_build_number' in _dict:
+ args['next_build_number'] = _dict.get('next_build_number')
+ else:
+ raise ValueError('Required property \'next_build_number\' not present in TektonPipeline JSON')
if 'enable_notifications' in _dict:
args['enable_notifications'] = _dict.get('enable_notifications')
else:
@@ -4065,6 +4080,8 @@ def to_dict(self) -> Dict:
_dict['href'] = self.href
if hasattr(self, 'build_number') and self.build_number is not None:
_dict['build_number'] = self.build_number
+ if hasattr(self, 'next_build_number') and self.next_build_number is not None:
+ _dict['next_build_number'] = self.next_build_number
if hasattr(self, 'enable_notifications') and self.enable_notifications is not None:
_dict['enable_notifications'] = self.enable_notifications
if hasattr(self, 'enable_partial_cloning') and self.enable_partial_cloning is not None:
@@ -4103,6 +4120,9 @@ class TektonPipelinePatch():
"""
Request body used to update this pipeline.
+ :attr int next_build_number: (optional) Specify the build number that will be
+ used for the next pipeline run. Build numbers can be any positive whole number
+ between 0 and 100000000000000.
:attr bool enable_notifications: (optional) Flag whether to enable notifications
for this pipeline. When enabled, pipeline run events are published on all slack
integration specified channels in the parent toolchain.
@@ -4116,12 +4136,16 @@ class TektonPipelinePatch():
def __init__(self,
*,
+ next_build_number: int = None,
enable_notifications: bool = None,
enable_partial_cloning: bool = None,
worker: 'WorkerIdentity' = None) -> None:
"""
Initialize a TektonPipelinePatch object.
+ :param int next_build_number: (optional) Specify the build number that will
+ be used for the next pipeline run. Build numbers can be any positive whole
+ number between 0 and 100000000000000.
:param bool enable_notifications: (optional) Flag whether to enable
notifications for this pipeline. When enabled, pipeline run events are
published on all slack integration specified channels in the parent
@@ -4133,6 +4157,7 @@ def __init__(self,
:param WorkerIdentity worker: (optional) Worker object containing worker ID
only. If omitted the IBM Managed shared workers are used by default.
"""
+ self.next_build_number = next_build_number
self.enable_notifications = enable_notifications
self.enable_partial_cloning = enable_partial_cloning
self.worker = worker
@@ -4141,6 +4166,8 @@ def __init__(self,
def from_dict(cls, _dict: Dict) -> 'TektonPipelinePatch':
"""Initialize a TektonPipelinePatch object from a json dictionary."""
args = {}
+ if 'next_build_number' in _dict:
+ args['next_build_number'] = _dict.get('next_build_number')
if 'enable_notifications' in _dict:
args['enable_notifications'] = _dict.get('enable_notifications')
if 'enable_partial_cloning' in _dict:
@@ -4157,6 +4184,8 @@ def _from_dict(cls, _dict):
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""
_dict = {}
+ if hasattr(self, 'next_build_number') and self.next_build_number is not None:
+ _dict['next_build_number'] = self.next_build_number
if hasattr(self, 'enable_notifications') and self.enable_notifications is not None:
_dict['enable_notifications'] = self.enable_notifications
if hasattr(self, 'enable_partial_cloning') and self.enable_partial_cloning is not None:
@@ -4803,10 +4832,12 @@ class TriggerSourceProperties():
:attr str url: URL of the repository to which the trigger is listening.
:attr str branch: (optional) Name of a branch from the repo. One of branch or
pattern must be specified, but only one or the other.
- :attr str pattern: (optional) Git branch or tag pattern to listen to, specify
- one of branch or pattern only. When specifying a tag to listen to, you can also
- specify a simple glob pattern such as '!test' or '*master' to match against
- multiple tags/branches in the repository.
+ :attr str pattern: (optional) The pattern of Git branch or tag to which to
+ listen. You can specify a glob pattern such as '!test' or '*master' to match
+ against multiple tags/branches in the repository. The glob pattern used must
+ conform to Bash 4.3 specifications, see bash documentation for more info:
+ https://www.gnu.org/software/bash/manual/bash.html#Pattern-Matching. One of
+ branch or pattern must be specified, but only one or the other.
:attr bool blind_connection: True if the repository server is not addressable on
the public internet. IBM Cloud will not be able to validate the connection
details you provide.
@@ -4833,10 +4864,13 @@ def __init__(self,
:param Tool tool: Reference to the repository tool in the parent toolchain.
:param str branch: (optional) Name of a branch from the repo. One of branch
or pattern must be specified, but only one or the other.
- :param str pattern: (optional) Git branch or tag pattern to listen to,
- specify one of branch or pattern only. When specifying a tag to listen to,
- you can also specify a simple glob pattern such as '!test' or '*master' to
- match against multiple tags/branches in the repository.
+ :param str pattern: (optional) The pattern of Git branch or tag to which to
+ listen. You can specify a glob pattern such as '!test' or '*master' to
+ match against multiple tags/branches in the repository. The glob pattern
+ used must conform to Bash 4.3 specifications, see bash documentation for
+ more info:
+ https://www.gnu.org/software/bash/manual/bash.html#Pattern-Matching. One of
+ branch or pattern must be specified, but only one or the other.
:param str hook_id: (optional) ID of the webhook from the repo. Computed
upon creation of the trigger.
"""
@@ -4922,10 +4956,12 @@ class TriggerSourcePropertiesPrototype():
:attr str url: URL of the repository to which the trigger is listening.
:attr str branch: (optional) Name of a branch from the repo. One of branch or
pattern must be specified, but only one or the other.
- :attr str pattern: (optional) Git branch or tag pattern to listen to, specify
- one of branch or pattern only. When specifying a tag to listen to, you can also
- specify a simple glob pattern such as '!test' or '*master' to match against
- multiple tags/branches in the repository.
+ :attr str pattern: (optional) The pattern of Git branch or tag to which to
+ listen. You can specify a glob pattern such as '!test' or '*master' to match
+ against multiple tags/branches in the repository. The glob pattern used must
+ conform to Bash 4.3 specifications, see bash documentation for more info:
+ https://www.gnu.org/software/bash/manual/bash.html#Pattern-Matching. One of
+ branch or pattern must be specified, but only one or the other.
"""
def __init__(self,
@@ -4939,10 +4975,13 @@ def __init__(self,
:param str url: URL of the repository to which the trigger is listening.
:param str branch: (optional) Name of a branch from the repo. One of branch
or pattern must be specified, but only one or the other.
- :param str pattern: (optional) Git branch or tag pattern to listen to,
- specify one of branch or pattern only. When specifying a tag to listen to,
- you can also specify a simple glob pattern such as '!test' or '*master' to
- match against multiple tags/branches in the repository.
+ :param str pattern: (optional) The pattern of Git branch or tag to which to
+ listen. You can specify a glob pattern such as '!test' or '*master' to
+ match against multiple tags/branches in the repository. The glob pattern
+ used must conform to Bash 4.3 specifications, see bash documentation for
+ more info:
+ https://www.gnu.org/software/bash/manual/bash.html#Pattern-Matching. One of
+ branch or pattern must be specified, but only one or the other.
"""
self.url = url
self.branch = branch
diff --git a/test/integration/test_cd_tekton_pipeline_v2.py b/test/integration/test_cd_tekton_pipeline_v2.py
index c0b08da..ba25955 100644
--- a/test/integration/test_cd_tekton_pipeline_v2.py
+++ b/test/integration/test_cd_tekton_pipeline_v2.py
@@ -57,11 +57,7 @@ def setup_class(cls):
assert cls.config is not None
# Create pipeline service
- apikey = env("CD_TEKTON_PIPELINE_APIKEY")
- assert apikey is not None
- authenticator = IAMAuthenticator(apikey)
- assert authenticator is not None
- cls.cd_pipeline_service = CdTektonPipelineV2(authenticator=authenticator)
+ cls.cd_pipeline_service = CdTektonPipelineV2.new_instance()
assert cls.cd_pipeline_service is not None
cls.config = read_external_sources(CdTektonPipelineV2.DEFAULT_SERVICE_NAME)
print('\n Setup complete.', flush=True)
diff --git a/test/unit/test_cd_tekton_pipeline_v2.py b/test/unit/test_cd_tekton_pipeline_v2.py
index 7192ea7..6115a3a 100644
--- a/test/unit/test_cd_tekton_pipeline_v2.py
+++ b/test/unit/test_cd_tekton_pipeline_v2.py
@@ -125,7 +125,7 @@ def test_create_tekton_pipeline_all_params(self):
"""
# Set up mock
url = preprocess_url('/tekton_pipelines')
- mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
+ mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "next_build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
responses.add(responses.POST,
url,
body=mock_response,
@@ -138,6 +138,7 @@ def test_create_tekton_pipeline_all_params(self):
# Set up parameter values
id = '94619026-912b-4d92-8f51-6c74f0692d90'
+ next_build_number = 1
enable_notifications = False
enable_partial_cloning = False
worker = worker_identity_model
@@ -145,6 +146,7 @@ def test_create_tekton_pipeline_all_params(self):
# Invoke method
response = _service.create_tekton_pipeline(
id,
+ next_build_number=next_build_number,
enable_notifications=enable_notifications,
enable_partial_cloning=enable_partial_cloning,
worker=worker,
@@ -157,6 +159,7 @@ def test_create_tekton_pipeline_all_params(self):
# Validate body params
req_body = json.loads(str(responses.calls[0].request.body, 'utf-8'))
assert req_body['id'] == '94619026-912b-4d92-8f51-6c74f0692d90'
+ assert req_body['next_build_number'] == 1
assert req_body['enable_notifications'] == False
assert req_body['enable_partial_cloning'] == False
assert req_body['worker'] == worker_identity_model
@@ -177,7 +180,7 @@ def test_create_tekton_pipeline_value_error(self):
"""
# Set up mock
url = preprocess_url('/tekton_pipelines')
- mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
+ mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "next_build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
responses.add(responses.POST,
url,
body=mock_response,
@@ -190,6 +193,7 @@ def test_create_tekton_pipeline_value_error(self):
# Set up parameter values
id = '94619026-912b-4d92-8f51-6c74f0692d90'
+ next_build_number = 1
enable_notifications = False
enable_partial_cloning = False
worker = worker_identity_model
@@ -224,7 +228,7 @@ def test_get_tekton_pipeline_all_params(self):
"""
# Set up mock
url = preprocess_url('/tekton_pipelines/94619026-912b-4d92-8f51-6c74f0692d90')
- mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
+ mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "next_build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
responses.add(responses.GET,
url,
body=mock_response,
@@ -260,7 +264,7 @@ def test_get_tekton_pipeline_value_error(self):
"""
# Set up mock
url = preprocess_url('/tekton_pipelines/94619026-912b-4d92-8f51-6c74f0692d90')
- mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
+ mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "next_build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
responses.add(responses.GET,
url,
body=mock_response,
@@ -300,7 +304,7 @@ def test_update_tekton_pipeline_all_params(self):
"""
# Set up mock
url = preprocess_url('/tekton_pipelines/94619026-912b-4d92-8f51-6c74f0692d90')
- mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
+ mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "next_build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
responses.add(responses.PATCH,
url,
body=mock_response,
@@ -313,6 +317,7 @@ def test_update_tekton_pipeline_all_params(self):
# Construct a dict representation of a TektonPipelinePatch model
tekton_pipeline_patch_model = {}
+ tekton_pipeline_patch_model['next_build_number'] = 1
tekton_pipeline_patch_model['enable_notifications'] = True
tekton_pipeline_patch_model['enable_partial_cloning'] = True
tekton_pipeline_patch_model['worker'] = worker_identity_model
@@ -351,7 +356,7 @@ def test_update_tekton_pipeline_required_params(self):
"""
# Set up mock
url = preprocess_url('/tekton_pipelines/94619026-912b-4d92-8f51-6c74f0692d90')
- mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
+ mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "next_build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
responses.add(responses.PATCH,
url,
body=mock_response,
@@ -387,7 +392,7 @@ def test_update_tekton_pipeline_value_error(self):
"""
# Set up mock
url = preprocess_url('/tekton_pipelines/94619026-912b-4d92-8f51-6c74f0692d90')
- mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
+ mock_response = '{"name": "name", "status": "configured", "resource_group": {"id": "id"}, "toolchain": {"id": "id", "crn": "crn:v1:staging:public:toolchain:us-south:a/0ba224679d6c697f9baee5e14ade83ac:bf5fa00f-ddef-4298-b87b-aa8b6da0e1a6::"}, "id": "id", "definitions": [{"source": {"type": "type", "properties": {"url": "url", "branch": "branch", "tag": "tag", "path": "path", "tool": {"id": "id"}}}, "href": "href", "id": "id"}], "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "updated_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "triggers": [{"type": "type", "name": "start-deploy", "href": "href", "event_listener": "event_listener", "id": "id", "properties": [{"name": "name", "value": "value", "href": "href", "enum": ["enum"], "type": "secure", "path": "path"}], "tags": ["tags"], "worker": {"name": "name", "type": "type", "id": "id"}, "max_concurrent_runs": 4, "enabled": true}], "worker": {"name": "name", "type": "type", "id": "id"}, "runs_url": "runs_url", "href": "href", "build_number": 1, "next_build_number": 1, "enable_notifications": true, "enable_partial_cloning": true, "enabled": true}'
responses.add(responses.PATCH,
url,
body=mock_response,
@@ -4666,6 +4671,7 @@ def test_tekton_pipeline_serialization(self):
tekton_pipeline_model_json['runs_url'] = 'testString'
tekton_pipeline_model_json['href'] = 'testString'
tekton_pipeline_model_json['build_number'] = 1
+ tekton_pipeline_model_json['next_build_number'] = 1
tekton_pipeline_model_json['enable_notifications'] = True
tekton_pipeline_model_json['enable_partial_cloning'] = True
tekton_pipeline_model_json['enabled'] = True
@@ -4702,6 +4708,7 @@ def test_tekton_pipeline_patch_serialization(self):
# Construct a json representation of a TektonPipelinePatch model
tekton_pipeline_patch_model_json = {}
+ tekton_pipeline_patch_model_json['next_build_number'] = 1
tekton_pipeline_patch_model_json['enable_notifications'] = True
tekton_pipeline_patch_model_json['enable_partial_cloning'] = True
tekton_pipeline_patch_model_json['worker'] = worker_identity_model