Skip to content

Commit

Permalink
Revert "Remove timeout via tekton (#1629)" (#1630)
Browse files Browse the repository at this point in the history
This reverts commit b844357.
  • Loading branch information
rporres authored Jun 11, 2021
1 parent b844357 commit 41c296b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions reconcile/openshift_saas_deploy_trigger_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def _trigger_tekton(spec,
# TODO: Convert these into a dataclass.
saas_file_name = spec['saas_file_name']
env_name = spec['env_name']
timeout = spec['timeout']
pipelines_provider = spec['pipelines_provider']

tkn_namespace_info = pipelines_provider['namespace']
Expand All @@ -279,6 +280,7 @@ def _trigger_tekton(spec,
env_name,
tkn_cluster_console_url,
tkn_namespace_name,
timeout,
settings,
integration,
integration_version
Expand Down Expand Up @@ -312,6 +314,7 @@ def _construct_tekton_trigger_resource(saas_file_name,
env_name,
tkn_cluster_console_url,
tkn_namespace_name,
timeout,
settings,
integration,
integration_version):
Expand All @@ -323,6 +326,7 @@ def _construct_tekton_trigger_resource(saas_file_name,
tkn_cluster_console_url (string): Cluster console URL of the cluster
where the pipeline runs
tkn_namespace_name (string): namespace where the pipeline runs
timeout (int): Timeout in minutes before the PipelineRun fails
settings (dict): App-interface settings
integration (string): Name of calling integration
integration_version (string): Version of calling integration
Expand Down Expand Up @@ -367,6 +371,10 @@ def _construct_tekton_trigger_resource(saas_file_name,
]
}
}
if timeout:
# conforming to Go’s ParseDuration format
body['spec']['timeout'] = f"{timeout}m"

return OR(body, integration, integration_version,
error_details=name), long_name

Expand Down
1 change: 1 addition & 0 deletions reconcile/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,7 @@ def get_app_interface_sql_queries():
managedResourceTypes
takeover
compare
timeout
publishJobLogs
imagePatterns
use_channel_in_image_tag
Expand Down

0 comments on commit 41c296b

Please sign in to comment.