Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the ci v1alpha1 API group +kubebuilder:object:generate=true +groupName=ci.w6d.io
Index ¶
- Constants
- Variables
- type Commit
- type Dependency
- type DependencyType
- type Docker
- type LimitCi
- type LimitCiList
- type LimitCiSpec
- type LimitCiStatus
- type NameValue
- type Play
- func (in *Play) DeepCopy() *Play
- func (in *Play) DeepCopyInto(out *Play)
- func (in *Play) DeepCopyObject() runtime.Object
- func (in *Play) Default()
- func (in *Play) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (in *Play) ValidateCreate() error
- func (in *Play) ValidateDelete() error
- func (in *Play) ValidateUpdate(old runtime.Object) error
- type PlayList
- type PlaySpec
- type PlayStatus
- type Scope
- type Script
- type Service
- type ServiceElement
- type Stack
- type State
- type Step
- type StepList
- type StepSpec
- type StepStatus
- type Steps
- type Task
- type TaskType
Constants ¶
const ( AnnotationOrder string = "ci.w6d.io/order" AnnotationTask string = "ci.w6d.io/task" AnnotationKind string = "ci.w6d.io/kind" AnnotationLanguage string = "ci.w6d.io/language" AnnotationPackage string = "ci.w6d.io/package" )
Annotations keys
const ( ResourceGit string = "source" ResourceImage string = "builddocker" )
ResourceNames
const ( // FileMode0755 int32 = 0755 // FileMode0644 int32 = 0644 FileMode0444 int32 = 0444 )
File mode
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "ci.w6d.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var (
PlayGroupKind = schema.GroupKind{Group: "ci.w6d.io", Kind: "Play"}
)
PlayGroupKind is group kind used in validator
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct { // SHA contains git commit SHA SHA string `json:"sha,omitempty"` // Ref contains git commit reference Ref string `json:"ref,omitempty"` // Message contains commit message // +optional Message string `json:"message,omitempty"` }
Commit contains all git information
func (*Commit) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Commit.
func (*Commit) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Dependency ¶
type Dependency struct { // Env is environmental variable for this dependency Variables fields.Set `json:"variables,omitempty,omitempty"` // Services contain a list of host and port to expose // +optional Services []Service `json:"services,omitempty"` }
Dependency struct contains env and service for the dependencies
func (*Dependency) DeepCopy ¶
func (in *Dependency) DeepCopy() *Dependency
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependency.
func (*Dependency) DeepCopyInto ¶
func (in *Dependency) DeepCopyInto(out *Dependency)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DependencyType ¶
type DependencyType string
DependencyType contain list of dependencies managed +kubebuilder::validation:Enum=mongodb;postgresql
const ( // MongoDB ... MongoDB DependencyType = "mongodb" // Postgresql ... Postgresql DependencyType = "postgresql" // MariaDB MariaDB DependencyType = "mariadb" )
func (DependencyType) String ¶
func (d DependencyType) String() string
type Docker ¶
type Docker struct { // Filepath contains the dockerfile full path // +optional Filepath string `json:"filepath,omitempty"` // Context contains the docker build context // +optional Context string `json:"context,omitempty"` }
Docker structure contains information for docker build
func (*Docker) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Docker.
func (*Docker) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LimitCi ¶
type LimitCi struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LimitCiSpec `json:"spec"` Status LimitCiStatus `json:"status,omitempty"` }
LimitCi is the Schema for the limitcis API
func (*LimitCi) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitCi.
func (*LimitCi) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LimitCi) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LimitCiList ¶
type LimitCiList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LimitCi `json:"items"` }
LimitCiList contains a list of LimitCi
func (*LimitCiList) DeepCopy ¶
func (in *LimitCiList) DeepCopy() *LimitCiList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitCiList.
func (*LimitCiList) DeepCopyInto ¶
func (in *LimitCiList) DeepCopyInto(out *LimitCiList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LimitCiList) DeepCopyObject ¶
func (in *LimitCiList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LimitCiSpec ¶
type LimitCiSpec struct { // Concurrent contains the number of pipeline running in concurrency Concurrent int64 `json:"concurrent,omitempty"` }
LimitCiSpec defines the desired state of LimitCi
func (*LimitCiSpec) DeepCopy ¶
func (in *LimitCiSpec) DeepCopy() *LimitCiSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitCiSpec.
func (*LimitCiSpec) DeepCopyInto ¶
func (in *LimitCiSpec) DeepCopyInto(out *LimitCiSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LimitCiStatus ¶
type LimitCiStatus struct { }
LimitCiStatus defines the observed state of LimitCi
func (*LimitCiStatus) DeepCopy ¶
func (in *LimitCiStatus) DeepCopy() *LimitCiStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitCiStatus.
func (*LimitCiStatus) DeepCopyInto ¶
func (in *LimitCiStatus) DeepCopyInto(out *LimitCiStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NameValue ¶
type NameValue struct { Name string `json:"name,omitempty"` Values string `json:"values,omitempty"` }
NameValue struct for env type format kubernetes format
func (*NameValue) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameValue.
func (*NameValue) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Play ¶
type Play struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PlaySpec `json:"spec"` Status PlayStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state" +kubebuilder:printcolumn:name="PipelineRun",type="string",priority=1,JSONPath=".status.pipeline_run_name" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC." +kubebuilder:subresource:status Play is the Schema for the plays API
func (*Play) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Play.
func (*Play) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Play) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Play) SetupWebhookWithManager ¶
func (*Play) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Play) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type PlayList ¶
type PlayList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Play `json:"items"` }
PlayList contains a list of Play
func (*PlayList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlayList.
func (*PlayList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PlayList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PlaySpec ¶
type PlaySpec struct { // Name of project Name string `json:"name,omitempty"` // Stack of the project Stack Stack `json:"stack,omitempty"` // Scope contains the name of scope and list of projects id Scope Scope `json:"scope,omitempty"` // Environment contains application environment Environment string `json:"environment,omitempty"` // ProjectID contains the project ID ProjectID int64 `json:"project_id,omitempty"` // PipelineID contains the ID of pipeline for the project PipelineID int64 `json:"pipeline_id,omitempty"` // RepoURL contains the git repository url RepoURL string `json:"repo_url,omitempty"` // Commit contains all git information Commit Commit `json:"commit,omitempty"` // Domain contains the url for exposition // +kubebuilder:validation:Pattern=^([A-Za-z0–9\-\.]+)+([A-Za-z0-9\.]+)*\.[A-Za-z][A-Za-z]+$ // +optional Domain string `json:"domain,omitempty"` // Tasks contains the list of task to be created by Play Tasks []map[TaskType]Task `json:"tasks,omitempty"` // Dependencies contains a list of Dependency ie: MongoDb or PostgreSQL // +optional Dependencies map[DependencyType]Dependency `json:"dependencies,omitempty"` // DockerURL contains the registry name and tag where to push docker image // +optional DockerURL string `json:"docker_url,omitempty"` // Secret contains the secret data. Each key must be either // - git_token // - .dockerconfigjson // - sonar_token // +optional Secret map[string]string `json:"secret,omitempty"` }
PlaySpec defines the desired state of Play
func (*PlaySpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlaySpec.
func (*PlaySpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlayStatus ¶
type PlayStatus struct { // PipelineRunName contains the pipeline run name created by play // +optional PipelineRunName string `json:"pipeline_run_name,omitempty"` // State contains the current state of this Play resource. // States Running, Failed, Succeeded, Errored // +optional State State `json:"state,omitempty"` }
PlayStatus defines the observed state of Play
func (*PlayStatus) DeepCopy ¶
func (in *PlayStatus) DeepCopy() *PlayStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlayStatus.
func (*PlayStatus) DeepCopyInto ¶
func (in *PlayStatus) DeepCopyInto(out *PlayStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Scope ¶
type Scope struct { // Name of the scope Name string `json:"name,omitempty"` // Projects is the list of project id in this scope // +optional Projects int64 `json:"projects,omitempty"` }
Scope is use for gathering project
func (*Scope) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scope.
func (*Scope) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Script ¶
type Script []string
Script type
func (Script) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Script.
func (Script) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Service ¶
type Service map[ServiceElement]string
Service struct for dependencies
func (Service) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (Service) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceElement ¶
type ServiceElement string
ServiceElem is the contain of service +kubebuilder:validation:Enum=Host;Port
type Stack ¶
type Stack struct { // Language contains the repository language Language string `json:"language,omitempty"` // Package contains the package use in application // +optional Package string `json:"package,omitempty"` }
Stack contains the language and package of the source
func (*Stack) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stack.
func (*Stack) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type State ¶
type State string
State type
const ( // Creating means that tekton resource creation is in progress Creating State = "Creating" // Queued means that the PipelineRun not applied yet due to limitation Queued State = "Queued" // Running means at least on Step of the Task is running Running State = "Running" // Failed means at least on Step of the Task is failed Failed State = "Failed" // Succeeded means that all Task is success Succeeded State = "Succeeded" // Cancelled means that a TaskRun or PipelineRun has been cancelled Cancelled State = "Cancelled" // Errored means that at least one tekton resource couldn't be created Errored State = "Errored" // Unknown means that the controller just begun to run Unknown State = "Unknown" )
type Step ¶
type Step struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Step StepSpec `json:"step"` Status StepStatus `json:"status,omitempty"` }
Step is the Schema for the steps API
func (*Step) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.
func (*Step) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Step) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StepList ¶
type StepList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items Steps `json:"items"` }
StepList contains a list of Step
func (*StepList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepList.
func (*StepList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StepList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StepSpec ¶
StepSpec defines the desired state of Step
func (*StepSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepSpec.
func (*StepSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StepStatus ¶
type StepStatus struct { }
StepStatus defines the observed state of Step
func (*StepStatus) DeepCopy ¶
func (in *StepStatus) DeepCopy() *StepStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepStatus.
func (*StepStatus) DeepCopyInto ¶
func (in *StepStatus) DeepCopyInto(out *StepStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Steps ¶
type Steps []Step
func (Steps) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Steps.
func (Steps) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Task ¶
type Task struct { // Image to use for this task // +optional Image string `json:"image,omitempty"` // Script is a list of command to execute in the task // +optional Script Script `json:"script,omitempty"` // Env is the map of environment variable for the task // +optional Variables fields.Set `json:"variables,omitempty"` // Docker contains information for docker build // +optional Docker Docker `json:"docker,omitempty"` }
Task is what actions and/or configuration the task can be contains
func (*Task) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.
func (*Task) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaskType ¶
type TaskType string
TaskType is the list of task granted +kubebuilder:validation:Enum=tests-unit;build;tests-integration;deploy;clean;sonar
const ( // UnitTests is the task type for unit tests" UnitTests TaskType = "unit-tests" // Sonar is the task type for Sonar scan" Sonar TaskType = "sonar" // Build is the task type for build" Build TaskType = "build" // IntegrationTests is the task type for integration tests" IntegrationTests TaskType = "integration-tests" // Deploy is the task type for deploy" Deploy TaskType = "deploy" // Clean is the task type for clean" Clean TaskType = "clean" )