Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pre-postcd trigger with plugin #4176

Merged
merged 11 commits into from
Oct 31, 2023
4 changes: 4 additions & 0 deletions pkg/pipeline/WorkflowDagExecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,9 @@ func (impl *WorkflowDagExecutorImpl) buildWFRequest(runner *pipelineConfig.CdWor
return nil, err
}
ciProjectDetail.CommitTime = commitTime.Format(bean2.LayoutRFC3339)
} else if ciPipeline.PipelineType == bean3.CI_JOB {
// This has been done to resolve unmarshalling issue in ci-runner, in case of no commit time(eg- polling container images)
ciProjectDetail.CommitTime = time.Time{}.Format(bean2.LayoutRFC3339)
} else {
impl.logger.Debugw("devtronbug#1062", ciPipeline.Id, cdPipeline.Id)
return nil, fmt.Errorf("modifications not found for %d", ciPipeline.Id)
Expand Down Expand Up @@ -1218,6 +1221,7 @@ func (impl *WorkflowDagExecutorImpl) buildWFRequest(runner *pipelineConfig.CdWor
cdStageWorkflowRequest.SecretKey = ciPipeline.CiTemplate.DockerRegistry.AWSSecretAccessKey
cdStageWorkflowRequest.DockerRegistryType = string(ciPipeline.CiTemplate.DockerRegistry.RegistryType)
cdStageWorkflowRequest.DockerRegistryURL = ciPipeline.CiTemplate.DockerRegistry.RegistryURL
cdStageWorkflowRequest.CiPipelineType = ciPipeline.PipelineType
} else if cdPipeline.AppId > 0 {
ciTemplate, err := impl.CiTemplateRepository.FindByAppId(cdPipeline.AppId)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/pipeline/types/Workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ type WorkflowRequest struct {
WorkflowExecutor pipelineConfig.WorkflowExecutorType `json:"workflowExecutor"`
PrePostDeploySteps []*bean.StepObject `json:"prePostDeploySteps"`
CiArtifactLastFetch time.Time `json:"ciArtifactLastFetch"`
CiPipelineType string `json:"ciPipelineType"`
Type bean.WorkflowPipelineType
Pipeline *pipelineConfig.Pipeline
Env *repository.Environment
Expand Down
Loading