Skip to content

Commit

Permalink
Move model.DeploymentSource to deployment.DeploymentSource
Browse files Browse the repository at this point in the history
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
  • Loading branch information
Warashi committed Oct 23, 2024
1 parent 2c02136 commit 8f73a7c
Show file tree
Hide file tree
Showing 10 changed files with 391 additions and 868 deletions.
4 changes: 2 additions & 2 deletions pkg/app/pipedv1/controller/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (p *planner) Run(ctx context.Context) error {
}()

// TODO: Prepare running deploy source and target deploy source.
var runningDS, targetDS *model.DeploymentSource
var runningDS, targetDS *deployment.DeploymentSource

Check warning on line 193 in pkg/app/pipedv1/controller/planner.go

View check run for this annotation

Codecov / codecov/patch

pkg/app/pipedv1/controller/planner.go#L193

Added line #L193 was not covered by tests

// repoCfg := config.PipedRepository{
// RepoID: p.deployment.GitPath.Repo.Id,
Expand Down Expand Up @@ -243,7 +243,7 @@ func (p *planner) Run(ctx context.Context) error {
// - CommitMatcher ensure pipeline/quick sync based on the commit message
// - Force quick sync if there is no previous deployment (aka. this is the first deploy)
// - Based on PlannerService.DetermineStrategy returned by plugins
func (p *planner) buildPlan(ctx context.Context, runningDS, targetDS *model.DeploymentSource) (*plannerOutput, error) {
func (p *planner) buildPlan(ctx context.Context, runningDS, targetDS *deployment.DeploymentSource) (*plannerOutput, error) {
out := &plannerOutput{}

input := &deployment.PlanPluginInput{
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/pipedv1/controller/planner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ func TestPlanner_BuildPlan(t *testing.T) {
planner.lastSuccessfulCommitHash = "123"
}

runningDS := &model.DeploymentSource{}
runningDS := &deployment.DeploymentSource{}

type genericConfig struct {
Kind config.Kind `json:"kind"`
Expand All @@ -931,7 +931,7 @@ func TestPlanner_BuildPlan(t *testing.T) {
})

require.NoError(t, err)
targetDS := &model.DeploymentSource{
targetDS := &deployment.DeploymentSource{
ApplicationConfig: jsonBytes,
}
out, err := planner.buildPlan(context.TODO(), runningDS, targetDS)
Expand Down
198 changes: 0 additions & 198 deletions pkg/model/deployment_source.pb.go

This file was deleted.

144 changes: 0 additions & 144 deletions pkg/model/deployment_source.pb.validate.go

This file was deleted.

Loading

0 comments on commit 8f73a7c

Please sign in to comment.