Skip to content

Commit 8e7a80b

Browse files
committed
make image_state as ImageStateWhileDeployment data type
1 parent bd1a417 commit 8e7a80b

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

internal/sql/repository/pipelineConfig/CdWorfkflowRepository.go

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig/bean/workflow"
2626
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig/bean/workflow/cdWorkflow"
2727
"github.com/devtron-labs/devtron/internal/util"
28+
"github.com/devtron-labs/devtron/pkg/deployment/trigger/devtronApps/constants"
2829
"github.com/devtron-labs/devtron/pkg/sql"
2930
"github.com/go-pg/pg"
3031
"go.opentelemetry.io/otel"
@@ -105,28 +106,28 @@ type CdWorkflowRunnerWithExtraFields struct {
105106
}
106107

107108
type CdWorkflowRunner struct {
108-
tableName struct{} `sql:"cd_workflow_runner" pg:",discard_unknown_columns"`
109-
Id int `sql:"id,pk"`
110-
Name string `sql:"name"`
111-
WorkflowType apiBean.WorkflowType `sql:"workflow_type"` // pre,post,deploy
112-
ExecutorType cdWorkflow.WorkflowExecutorType `sql:"executor_type"` // awf, system
113-
Status string `sql:"status"`
114-
PodStatus string `sql:"pod_status"`
115-
Message string `sql:"message"`
116-
StartedOn time.Time `sql:"started_on"`
117-
FinishedOn time.Time `sql:"finished_on"`
118-
Namespace string `sql:"namespace"`
119-
LogLocation string `sql:"log_file_path"`
120-
CdArtifactLocation string `sql:"cd_artifact_location"`
121-
IsArtifactUploaded workflow.ArtifactUploadedType `sql:"is_artifact_uploaded"`
122-
TriggeredBy int32 `sql:"triggered_by"`
123-
CdWorkflowId int `sql:"cd_workflow_id"`
124-
PodName string `sql:"pod_name"`
125-
BlobStorageEnabled bool `sql:"blob_storage_enabled,notnull"`
126-
RefCdWorkflowRunnerId int `sql:"ref_cd_workflow_runner_id,notnull"`
127-
ImagePathReservationIds []int `sql:"image_path_reservation_ids" pg:",array,notnull"`
128-
ReferenceId *string `sql:"reference_id"`
129-
ImageState string `sql:"image_state"` // image_state currently not utilized in oss
109+
tableName struct{} `sql:"cd_workflow_runner" pg:",discard_unknown_columns"`
110+
Id int `sql:"id,pk"`
111+
Name string `sql:"name"`
112+
WorkflowType apiBean.WorkflowType `sql:"workflow_type"` // pre,post,deploy
113+
ExecutorType cdWorkflow.WorkflowExecutorType `sql:"executor_type"` // awf, system
114+
Status string `sql:"status"`
115+
PodStatus string `sql:"pod_status"`
116+
Message string `sql:"message"`
117+
StartedOn time.Time `sql:"started_on"`
118+
FinishedOn time.Time `sql:"finished_on"`
119+
Namespace string `sql:"namespace"`
120+
LogLocation string `sql:"log_file_path"`
121+
CdArtifactLocation string `sql:"cd_artifact_location"`
122+
IsArtifactUploaded workflow.ArtifactUploadedType `sql:"is_artifact_uploaded"`
123+
TriggeredBy int32 `sql:"triggered_by"`
124+
CdWorkflowId int `sql:"cd_workflow_id"`
125+
PodName string `sql:"pod_name"`
126+
BlobStorageEnabled bool `sql:"blob_storage_enabled,notnull"`
127+
RefCdWorkflowRunnerId int `sql:"ref_cd_workflow_runner_id,notnull"`
128+
ImagePathReservationIds []int `sql:"image_path_reservation_ids" pg:",array,notnull"`
129+
ReferenceId *string `sql:"reference_id"`
130+
ImageState constants.ImageStateWhileDeployment `sql:"image_state"` // image_state currently not utilized in oss
130131
CdWorkflow *CdWorkflow
131132
sql.AuditLog
132133
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package constants
2+
3+
type ImageStateWhileDeployment string

0 commit comments

Comments
 (0)