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
- func CheckDockerTag(tag string) bool
- func ParseHostURL(host string) (*url.URL, error)
- type Commit
- type Docker
- type LimitCi
- type LimitCiList
- type LimitCiSpec
- type LimitCiStatus
- type ParamSpec
- 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) Get(key string) string
- func (in *Play) GetDockerImageTagRaw() (address string, uri string, tag string, err error)
- func (in *Play) IsDoDeploy() bool
- 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 SecretKind
- type Stack
- type State
- type Step
- type StepList
- type StepSpec
- type StepStatus
- type Steps
- type Task
- type TaskType
- type Vault
- type VaultSecret
Constants ¶
const ( // DockerConfig is the key in map for the docker config.json DockerConfig SecretKind = ".dockerconfigjson" // KubeConfig is the key in map for the kubeconfig KubeConfig SecretKind = "kubeconfig" // GitToken is the key in map for the git token GitToken SecretKind = "git_token" // E2ETests is the task type for unit tests" E2ETests TaskType = "e2e-tests" // UnitTests is the task type for unit tests" UnitTests TaskType = "unit-tests" // 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" // 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" 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" ResourceGit string = "source" ResourceImage string = "builddocker" )
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 ( SecretKinds = []SecretKind{ DockerConfig, KubeConfig, GitToken, } )
Functions ¶
func CheckDockerTag ¶ added in v0.9.3
CheckDockerTag is for checking the tag of the docker image
Types ¶
type Commit ¶
type Commit struct { // SHA contains git commit SHA SHA string `json:"sha,omitempty"` // BeforeSHA contains the commit before sha // +optional BeforeSHA string `json:"before_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 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,omitempty"` 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 ParamSpec ¶ added in v0.10.0
ParamSpec defines arbitrary parameters needed beyond typed inputs (such as resources). Parameter values are provided by users as inputs on a TaskRun or PipelineRun. It contains also the values template of the params
func (*ParamSpec) DeepCopy ¶ added in v0.10.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamSpec.
func (*ParamSpec) DeepCopyInto ¶ added in v0.10.0
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,omitempty"` Status PlayStatus `json:"status,omitempty"` }
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) Default ¶
func (in *Play) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Play) GetDockerImageTagRaw ¶ added in v0.9.3
GetDockerImageTagRaw return the Docker repository
func (*Play) IsDoDeploy ¶ added in v0.11.3
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 // +optional Stack Stack `json:"stack,omitempty"` // Scope contains the name of scope and list of projects id // +optional 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 // +optional Domain string `json:"domain,omitempty"` // Expose toggles the creation of the ingress in case of deployment // +optional Expose bool `json:"expose,omitempty"` // External toggles is for using in values templating // +optional External bool `json:"external,omitempty"` // Tasks contains the list of task to be created by Play Tasks []map[TaskType]Task `json:"tasks,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 // - kubeconfig // +optional Secret map[SecretKind]string `json:"secret,omitempty"` // Vault contain a vault information to get secret from // +optional Vault *Vault `json:"vault,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"` // Message contains the pipeline message // +optional Message string `json:"message,omitempty"` // Conditions represents the latest available observations of play // +optional Conditions []metav1.Condition `json:"conditions,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 SecretKind ¶ added in v0.8.0
type SecretKind string
SecretKind is kinds handle by the secret feature
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 Step ¶
type Step struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Params declares parameters passed to this task. // +optional Params []ParamSpec `json:"params,omitempty"` // Sidecar container Sidecar []tkn.Sidecar `json:"sidecar,omitempty"` Step StepSpec `json:"step,omitempty"` 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"` // Arguments is used for flags in task // +optional Arguments []string `json:"arguments,omitempty"` // Variables is the map of environment variable for the task // +optional Variables fields.Set `json:"variables,omitempty"` // Namespace where to deploy application. used only in deploy task // +optional Namespace string `json:"namespace,omitempty"` // Annotations is use for ingress annotations // +optional Annotations map[string]string `json:"annotations,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
type Vault ¶ added in v0.8.0
type Vault struct { // Token vault // +optional Token string `json:"token,omitempty"` // Secrets is a map of the secret // +optional Secrets map[SecretKind]VaultSecret `json:"secrets,omitempty"` }
func (*Vault) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault.
func (*Vault) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VaultSecret ¶ added in v0.8.0
type VaultSecret struct { // VolumePath is the folder where the secret will be put VolumePath string `json:"volumePath,omitempty"` // Path is where the secret is in vault Path string `json:"path,omitempty"` }
VaultSecret contains information for get and put vault secret
func (*VaultSecret) DeepCopy ¶ added in v0.8.0
func (in *VaultSecret) DeepCopy() *VaultSecret
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultSecret.
func (*VaultSecret) DeepCopyInto ¶ added in v0.8.0
func (in *VaultSecret) DeepCopyInto(out *VaultSecret)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.