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

Delete platform-specific specs from configv1 #5300

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions pkg/configv1/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ package config
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"

"github.com/pipe-cd/pipecd/pkg/model"
Expand Down Expand Up @@ -303,23 +301,6 @@ func (a *AnalysisStageOptions) Validate() error {
return nil
}

// ScriptRunStageOptions contains all configurable values for a SCRIPT_RUN stage.
type ScriptRunStageOptions struct {
Env map[string]string `json:"env"`
Run string `json:"run"`
Timeout Duration `json:"timeout" default:"6h"`
OnRollback string `json:"onRollback"`
SkipOn SkipOptions `json:"skipOn,omitempty"`
}

// Validate checks the required fields of ScriptRunStageOptions.
func (s *ScriptRunStageOptions) Validate() error {
if s.Run == "" {
return fmt.Errorf("SCRIPT_RUN stage requires run field")
}
return nil
}

type AnalysisTemplateRef struct {
Name string `json:"name"`
AppArgs map[string]string `json:"appArgs"`
Expand Down Expand Up @@ -571,25 +552,3 @@ func (dd *DriftDetection) Validate() error {
}
return nil
}

func LoadApplication(repoPath, configRelPath string, appKind model.ApplicationKind) (*GenericApplicationSpec, error) {
absPath := filepath.Join(repoPath, configRelPath)

cfg, err := LoadFromYAML(absPath)
if err != nil {
if os.IsNotExist(err) {
return nil, fmt.Errorf("application config file %s was not found in Git", configRelPath)
}
return nil, err
}
if kind, ok := cfg.Kind.ToApplicationKind(); !ok || kind != appKind {
return nil, fmt.Errorf("invalid application kind in the application config file, got: %s, expected: %s", kind, appKind)
}

spec, ok := cfg.GetGenericApplication()
if !ok {
return nil, fmt.Errorf("unsupported application kind: %s", appKind)
}

return &spec, nil
}
53 changes: 0 additions & 53 deletions pkg/configv1/application_cloudrun.go

This file was deleted.

77 changes: 0 additions & 77 deletions pkg/configv1/application_cloudrun_test.go

This file was deleted.

162 changes: 0 additions & 162 deletions pkg/configv1/application_ecs.go

This file was deleted.

Loading
Loading