Skip to content

Commit

Permalink
[konflux] setup art-db custom task
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwindasr committed Oct 23, 2024
1 parent df5f27f commit 71576c2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions doozer/doozerlib/backend/konflux_image_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,29 @@ def _new_pipelinerun(generate_name: str, application_name: str, component_name:
elif task["name"] == "apply-tags":
task["params"].append({"name": "ADDITIONAL_TAGS", "value": list(additional_tags)})

# Add a new custom task to store status of build after it is completed on Konflux
updated_tasks = []
for task in obj["spec"]["pipelineSpec"]["tasks"]:
if task["name"] == "build-images":
updated_tasks.append({
"name": "art-db",
"taskRef": {
"resolver": "git",
"params": [
{"name": "org", "value": "openshift-priv"},
{"name": "repo", "value": "art-konflux-template"},
{"name": "revision", "value": "main"},
{"name": "pathInRepo", "value": "custom-tasks/art-store-to-db.yaml"},
{"name": "token", "value": "openshift-art-build-bot-read-only"},
{"name": "tokenKey", "value": "token"},
]
},
"runAfter": ["build-images-index"],
})

updated_tasks.append(task)
obj["spec"]["pipelineSpec"]["tasks"] = updated_tasks

obj["spec"]["params"].append({"name": "build-platforms", "value": list(build_platforms)})
return obj

Expand Down

0 comments on commit 71576c2

Please sign in to comment.