@@ -52,57 +52,7 @@ def bundle_task_ref(name) -> dict:
52
52
}
53
53
54
54
55
- def build_container (
56
- name_suffix : str = "" ,
57
- output_image : str = "$(params.output-image)" ,
58
- dockerfile : str = "$(params.dockerfile)" ,
59
- run_after : str = "prefetch-dependencies" ,
60
- build_arg : str = "$(params.build-args[*])" ) -> dict :
61
- """Returns a build-container step definition for the Konflux pipeline."""
62
- return {
63
- "name" : "build-container" + name_suffix ,
64
- "params" : [
65
- {"name" : "IMAGE" , "value" : output_image },
66
- {"name" : "DOCKERFILE" , "value" : dockerfile },
67
- {"name" : "CONTEXT" , "value" : "$(params.path-context)" },
68
- {"name" : "HERMETIC" , "value" : "$(params.hermetic)" },
69
- {"name" : "PREFETCH_INPUT" , "value" : "$(params.prefetch-input)" },
70
- {
71
- "name" : "IMAGE_EXPIRES_AFTER" ,
72
- "value" : "$(params.image-expires-after)" ,
73
- },
74
- {
75
- "name" : "COMMIT_SHA" ,
76
- "value" : "$(tasks.clone-repository.results.commit)" ,
77
- },
78
- {"name" : "BUILD_ARGS" , "value" : [build_arg ]},
79
- {
80
- "name" : "BUILD_ARGS_FILE" ,
81
- "value" : ["$(params.build-args-file)" ],
82
- },
83
- {
84
- "name" : "SOURCE_ARTIFACT" ,
85
- "value" : "$(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)" ,
86
- },
87
- {
88
- "name" : "CACHI2_ARTIFACT" ,
89
- "value" : "$(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)" ,
90
- },
91
- ],
92
- "runAfter" : [run_after ],
93
- "taskRef" : bundle_task_ref ("buildah-remote-oci-ta" ),
94
- "when" : [
95
- {
96
- "input" : "$(tasks.init.results.build)" ,
97
- "operator" : "in" ,
98
- "values" : ["true" ],
99
- }
100
- ],
101
- }
102
-
103
-
104
- def component_build_pipeline (component_name , dockerfile_path ,
105
- build_container_tasks : list [dict ], is_pr : bool = True ) -> dict :
55
+ def component_build_pipeline (component_name , dockerfile_path , is_pr : bool = True ) -> dict :
106
56
"""Returns a component build pipeline definition.
107
57
108
58
This is general enough to create PR pipeline as well as push pipeline.
@@ -799,16 +749,14 @@ def main():
799
749
print ("# yamllint disable-file" , file = yaml_file )
800
750
print ("# This file is autogenerated by ci/cached-builds/konflux_generate_component_build_pipelines.py" ,
801
751
file = yaml_file )
802
- print (yaml .dump (component_build_pipeline (component_name = task_name , dockerfile_path = dockerfile ,
803
- build_container_tasks = [build_container ()], is_pr = False )),
752
+ print (yaml .dump (component_build_pipeline (component_name = task_name , dockerfile_path = dockerfile , is_pr = False )),
804
753
end = "" ,
805
754
file = yaml_file )
806
755
with open (ROOT_DIR / ".tekton" / (task_name + "-pull-request.yaml" ), "w" ) as yaml_file :
807
756
print ("# yamllint disable-file" , file = yaml_file )
808
757
print ("# This file is autogenerated by ci/cached-builds/konflux_generate_component_build_pipelines.py" ,
809
758
file = yaml_file )
810
- print (yaml .dump (component_build_pipeline (component_name = task_name , dockerfile_path = dockerfile ,
811
- build_container_tasks = [build_container ()], is_pr = True )),
759
+ print (yaml .dump (component_build_pipeline (component_name = task_name , dockerfile_path = dockerfile , is_pr = True )),
812
760
end = "" ,
813
761
file = yaml_file )
814
762
0 commit comments