You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: multiple images handling for single workflow for ECR Plugin Poll Images (#4027)
* container registry handling for ci_job ci pipeline
* Handling multiple images from Ci Complete event
* parent ci workflow id
* getting workflows without parent_ci_workflow_id
* Setting pod status as successful
* getting all workflows
* adding new api for getting all artifacts
* parent ci workflow fetching null
* remving parent_ci_workflow_id from workflow_response
* Excluding parent workflow ci artifact
* query change
* query
* self review
* self review
* self review comments
* review comments
* IT case for fetching ci artifact for ci job type
* handling nil pointer for docker registry id
* reverting pipeline builder for now
* reverting pipeline builder for now
* pushing changes for docker config update
* checking len before querying
* review comments
* script number change
* review comments logging errors
---------
Co-authored-by: ayushmaheshwari <[email protected]>
// GetArtifactsByParentCiWorkflowId will get all artifacts of child workflow sorted by descending order to fetch latest at top, child workflow required for handling container image polling plugin as there can be multiple images from a single parent workflow, which are accommodated in child workflows
query:="SELECT cia.image FROM ci_artifact cia where cia.ci_workflow_id in (SELECT wf.id from ci_workflow wf where wf.parent_ci_workflow_id = ? ) ORDER BY cia.created_on DESC ;"
// FindByPipelineId gets only those workflowWithArtifact whose parent_ci_workflow_id is null, this is done to accommodate multiple ci_artifacts through a single workflow(parent), making child workflows for other ci_artifacts (this has been done due to design understanding and db constraint) single workflow single ci-artifact
queryTemp:="select cia.id as ci_artifact_id, env.environment_name, cia.image, cia.is_artifact_uploaded, wf.*, u.email_id from ci_workflow wf left join users u on u.id = wf.triggered_by left join ci_artifact cia on wf.id = cia.ci_workflow_id left join environment env on env.id = wf.environment_id where wf.ci_pipeline_id = ? order by wf.started_on desc offset ? limit ?;"
176
+
queryTemp:="select cia.id as ci_artifact_id, env.environment_name, cia.image, cia.is_artifact_uploaded, wf.*, u.email_id from ci_workflow wf left join users u on u.id = wf.triggered_by left join ci_artifact cia on wf.id = cia.ci_workflow_id left join environment env on env.id = wf.environment_id where wf.ci_pipeline_id = ? and parent_ci_workflow_id is null order by wf.started_on desc offset ? limit ?;"
0 commit comments