step

package
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//	Oauth prefix
	OauthTokenPrefix = "oauth2"

	FileName = "reaper.tar.gz"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DistributeTaskTarget

type DistributeTaskTarget struct {
	SourceImage   string `bson:"source_image"       yaml:"source_image"     json:"source_image"`
	TargetImage   string `bson:"target_image"       yaml:"target_image"     json:"target_image"`
	TargetTag     string `bson:"target_tag"         yaml:"target_tag"       json:"target_tag"`
	ServiceName   string `bson:"service_name"       yaml:"service_name"     json:"service_name"`
	ServiceModule string `bson:"service_module"     yaml:"service_module"   json:"service_module"`
	UpdateTag     bool   `bson:"update_tag"         yaml:"update_tag"       json:"update_tag"`
}

type DockerRegistry

type DockerRegistry struct {
	DockerRegistryID string `bson:"docker_registry_id"                json:"docker_registry_id"                   yaml:"docker_registry_id"`
	Host             string `bson:"host"                              json:"host"                                 yaml:"host"`
	Namespace        string `bson:"namespace"                         json:"namespace"                            yaml:"namespace"`
	UserName         string `bson:"username"                          json:"username"                             yaml:"username"`
	Password         string `bson:"password"                          json:"password"                             yaml:"password"`
}

type Proxy

type Proxy struct {
	Type                   string `bson:"type"                              json:"type"                                 yaml:"type"`
	Address                string `bson:"address"                           json:"address"                              yaml:"address"`
	Port                   int    `bson:"port"                              json:"port"                                 yaml:"port"`
	NeedPassword           bool   `bson:"need_password"                     json:"need_password"                        yaml:"need_password"`
	Username               string `bson:"username"                          json:"username"                             yaml:"username"`
	Password               string `bson:"password"                          json:"password"                             yaml:"password"`
	EnableRepoProxy        bool   `bson:"enable_repo_proxy"                 json:"enable_repo_proxy"                    yaml:"enable_repo_proxy"`
	EnableApplicationProxy bool   `bson:"enable_application_proxy"          json:"enable_application_proxy"             yaml:"enable_application_proxy"`
}

func (*Proxy) GetProxyURL

func (p *Proxy) GetProxyURL() string

type RegistryNamespace

type RegistryNamespace struct {
	RegAddr string `bson:"reg_addr"            json:"reg_addr"             yaml:"reg_addr"`
	// Namespace is NOT a required field, this could be empty when the registry is AWS ECR or so.
	// use with CAUTION !!!!
	TLSEnabled bool   `bson:"tls_enabled"              json:"tls_enabled"             yaml:"tls_enabled"`
	TLSCert    string `bson:"tls_cert"                 json:"tls_cert"                yaml:"tls_cert"`
	Namespace  string `bson:"namespace,omitempty"      json:"namespace,omitempty"     yaml:"namespace,omitempty"`
	AccessKey  string `bson:"access_key"               json:"access_key"              yaml:"access_key"`
	SecretKey  string `bson:"secret_key"               json:"secret_key"              yaml:"secret_key"`
}

type S3

type S3 struct {
	Ak        string `bson:"ak"                              json:"ak"                                 yaml:"ak"`
	Sk        string `bson:"sk"                              json:"sk"                                 yaml:"sk"`
	Endpoint  string `bson:"endpoint"                        json:"endpoint"                           yaml:"endpoint"`
	Bucket    string `bson:"bucket"                          json:"bucket"                             yaml:"bucket"`
	Subfolder string `bson:"subfolder"                       json:"subfolder"                          yaml:"subfolder"`
	Insecure  bool   `bson:"insecure"                        json:"insecure"                           yaml:"insecure"`
	Provider  int8   `bson:"provider"                        json:"provider"                           yaml:"provider"`
	Protocol  string `bson:"protocol"                        json:"protocol"                           yaml:"protocol"`
	Region    string `bson:"region"                          json:"region"                             yaml:"region"`
}

type StepArchiveSpec

type StepArchiveSpec struct {
	UploadDetail    []*Upload           `bson:"upload_detail"                      json:"upload_detail"                             yaml:"upload_detail"`
	ObjectStorageID string              `bson:"object_storage_id"                  json:"object_storage_id"                         yaml:"object_storage_id"`
	S3              *S3                 `bson:"s3_storage"                         json:"s3_storage"                                yaml:"s3_storage"`
	Repos           []*types.Repository `bson:"repos"                                 json:"repos"`
}

type StepBatchFileSpec

type StepBatchFileSpec struct {
	Scripts     []string `bson:"scripts"                              json:"scripts"                                 yaml:"scripts,omitempty"`
	Script      string   `bson:"script"                               json:"script"                                  yaml:"script"`
	SkipPrepare bool     `bson:"skip_prepare"                         json:"skip_prepare"                            yaml:"skip_prepare"`
}

type StepDockerBuildSpec

type StepDockerBuildSpec struct {
	Source                string              `bson:"source"                              json:"source"                                 yaml:"source"`
	WorkDir               string              `bson:"work_dir"                            json:"work_dir"                               yaml:"work_dir"`
	RegistryHost          string              `bson:"registry_host"                       json:"registry_host"                          yaml:"registry_host"`
	DockerFile            string              `bson:"docker_file"                         json:"docker_file"                            yaml:"docker_file"`
	ImageName             string              `bson:"image_name"                          json:"image_name"                             yaml:"image_name"`
	BuildArgs             string              `bson:"build_args"                          json:"build_args"                             yaml:"build_args"`
	ImageReleaseTag       string              `bson:"image_release_tag"                   json:"image_release_tag"                      yaml:"image_release_tag"`
	DockerTemplateContent string              `bson:"docker_template_content"             json:"docker_template_content"                yaml:"docker_template_content"`
	Proxy                 *Proxy              `bson:"proxy"                               json:"proxy"                                  yaml:"proxy"`
	IgnoreCache           bool                `bson:"ignore_cache"                        json:"ignore_cache"                           yaml:"ignore_cache"`
	DockerRegistry        *DockerRegistry     `bson:"docker_registry"                     json:"docker_registry"                        yaml:"docker_registry"`
	Repos                 []*types.Repository `bson:"repos"                               json:"repos"`
}

func (*StepDockerBuildSpec) GetDockerFile

func (s *StepDockerBuildSpec) GetDockerFile() string

type StepDownloadArchiveSpec added in v2.3.0

type StepDownloadArchiveSpec struct {
	FileName   string `bson:"file_name"                          json:"file_name"                                 yaml:"file_name"`
	ObjectPath string `bson:"object_path"                        json:"object_path"                               yaml:"object_path"`
	DestDir    string `bson:"dest_dir"                           json:"dest_dir"                                  yaml:"dest_dir"`
	UnTar      bool   `bson:"untar"                              json:"untar"                                     yaml:"untar"`
	IgnoreErr  bool   `bson:"ignore_err"                         json:"ignore_err"                                yaml:"ignore_err"`
	S3         *S3    `bson:"s3_storage"                         json:"s3_storage"                                yaml:"s3_storage"`
}

type StepGitSpec

type StepGitSpec struct {
	Repos []*types.Repository `bson:"repos"          json:"repos"    yaml:"repos"`
	Proxy *Proxy              `bson:"proxy"          json:"proxy"    yaml:"proxy"`
}

type StepImageDistributeSpec

type StepImageDistributeSpec struct {
	SourceRegistry   *RegistryNamespace      `bson:"source_registry"                json:"source_registry"               yaml:"source_registry"`
	TargetRegistry   *RegistryNamespace      `bson:"target_registry"                json:"target_registry"               yaml:"target_registry"`
	DistributeTarget []*DistributeTaskTarget `bson:"distribute_target"              json:"distribute_target"             yaml:"distribute_target"`
}

type StepJunitReportSpec

type StepJunitReportSpec struct {
	SourceWorkflow string `bson:"source_workflow"           json:"source_workflow"                   yaml:"source_workflow"`
	// no stage name is recorded since the job name is unique, for now (version 2.1.0)
	SourceJobKey  string `bson:"source_job_key"             json:"source_job_key"                    yaml:"source_job_key"`
	TaskID        int64  `bson:"task_id"                    json:"task_id"                           yaml:"task_id"`
	ServiceName   string `bson:"service_name"               json:"service_name"                      yaml:"service_name"`
	ServiceModule string `bson:"service_module"             json:"service_module"                    yaml:"service_module"`
	ReportDir     string `bson:"report_dir"                 json:"report_dir"                        yaml:"report_dir"`
	DestDir       string `bson:"dest_dir"                   json:"dest_dir"                          yaml:"dest_dir"`
	S3DestDir     string `bson:"s3_dest_dir"                json:"s3_dest_dir"                       yaml:"s3_dest_dir"`
	FileName      string `bson:"file_name"                  json:"file_name"                         yaml:"file_name"`
	TestName      string `bson:"test_name"                  json:"test_name"                         yaml:"test_name"`
	TestProject   string `bson:"test_project"               json:"test_project"                      yaml:"test_project"`
	S3Storage     *S3    `bson:"s3_storage"                 json:"s3_storage"                        yaml:"s3_storage"`
}

type StepPowerShellSpec

type StepPowerShellSpec struct {
	Scripts     []string `bson:"scripts"                              json:"scripts"                                 yaml:"scripts,omitempty"`
	Script      string   `bson:"script"                               json:"script"                                  yaml:"script"`
	SkipPrepare bool     `bson:"skip_prepare"                         json:"skip_prepare"                            yaml:"skip_prepare"`
}

type StepShellSpec

type StepShellSpec struct {
	Scripts     []string `bson:"scripts"                              json:"scripts"                                 yaml:"scripts,omitempty"`
	Script      string   `bson:"script"                               json:"script"                                  yaml:"script"`
	SkipPrepare bool     `bson:"skip_prepare"                         json:"skip_prepare"                            yaml:"skip_prepare"`
}

type StepSonarCheckSpec

type StepSonarCheckSpec struct {
	Parameter   string `bson:"parameter"       json:"parameter"         yaml:"parameter"`
	SonarToken  string `bson:"sonar_token"     json:"sonar_token"       yaml:"sonar_token"`
	SonarServer string `bson:"sonar_server"    json:"sonar_server"      yaml:"sonar_server"`
	CheckDir    string `bson:"check_dir"       json:"check_dir"         yaml:"check_dir"`
}

type StepTarArchiveSpec

type StepTarArchiveSpec struct {
	ResultDirs   []string `bson:"result_dirs"                json:"result_dirs"                       yaml:"result_dirs"`
	AbsResultDir bool     `bson:"abs_result_dir"             json:"abs_result_dir"                    yaml:"abs_result_dir"`
	DestDir      string   `bson:"dest_dir"                   json:"dest_dir"                          yaml:"dest_dir"`
	S3DestDir    string   `bson:"s3_dest_dir"                json:"s3_dest_dir"                       yaml:"s3_dest_dir"`
	TarDir       string   `bson:"tar_dir"                    json:"tar_dir"                           yaml:"tar_dir"`
	ChangeTarDir bool     `bson:"change_tar_dir"             json:"change_tar_dir"                    yaml:"change_tar_dir"`
	FileName     string   `bson:"file_name"                  json:"file_name"                         yaml:"file_name"`
	IgnoreErr    bool     `bson:"ignore_err"                 json:"ignore_err"                        yaml:"ignore_err"`
	S3Storage    *S3      `bson:"s3_storage"                 json:"s3_storage"                        yaml:"s3_storage"`
}

type StepToolInstallSpec

type StepToolInstallSpec struct {
	Installs  []*Tool `bson:"installs"                     json:"installs"                        yaml:"installs"`
	S3Storage *S3     `bson:"s3_storage"                   json:"s3_storage"                      yaml:"s3_storage"`
}

type Tool

type Tool struct {
	Name     string   `bson:"name"                              json:"name"                                 yaml:"name"`
	Version  string   `bson:"version"                           json:"version"                              yaml:"version"`
	Scripts  []string `bson:"scripts"                           json:"scripts"                              yaml:"scripts"`
	BinPath  string   `bson:"bin_path"                          json:"bin_path"                             yaml:"bin_path"`
	Envs     []string `bson:"envs"                              json:"envs"                                 yaml:"envs"`
	Download string   `bson:"download"                          json:"download"                             yaml:"download"`
}

type Upload

type Upload struct {
	Name                string `bson:"name"                                  json:"name"                                         yaml:"name"`
	IsFileArchive       bool   `bson:"is_file_archive"                       json:"is_file_archive"                            yaml:"is_file_archive"`
	ServiceName         string `bson:"service_name"                          json:"service_name"                                yaml:"service_name"`
	ServiceModule       string `bson:"service_module"                        json:"service_module"                                yaml:"service_module"`
	JobTaskName         string `bson:"job_task_name"                         json:"job_task_name"                               yaml:"job_task_name"`
	PackageFileLocation string `bson:"package_file_location"                 json:"package_file_location"                       yaml:"package_file_location"`
	FilePath            string `bson:"file_path"                             json:"file_path"                                 yaml:"file_path"`
	AbsFilePath         string `bson:"abs_file_path"                         json:"aabs_file_pathk"                           yaml:"abs_file_path"`
	DestinationPath     string `bson:"dest_path"                             json:"dest_path"                                 yaml:"dest_path"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL