v1alpha1

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the ci v1alpha1 API group +kubebuilder:object:generate=true +groupName=ci.w6d.io

Index

Constants

View Source
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

View Source
const (
	ResourceGit   string = "source"
	ResourceImage string = "builddocker"
)

ResourceNames

View Source
const (
	// FileMode0755 int32 = 0755
	// FileMode0644 int32 = 0644
	FileMode0444 int32 = 0444
)

File mode

Variables

View Source
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
)
View Source
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

func (in *Commit) DeepCopy() *Commit

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Commit.

func (*Commit) DeepCopyInto

func (in *Commit) DeepCopyInto(out *Commit)

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

func (in *Docker) DeepCopy() *Docker

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Docker.

func (*Docker) DeepCopyInto

func (in *Docker) DeepCopyInto(out *Docker)

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

func (in *LimitCi) DeepCopy() *LimitCi

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitCi.

func (*LimitCi) DeepCopyInto

func (in *LimitCi) DeepCopyInto(out *LimitCi)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LimitCi) DeepCopyObject

func (in *LimitCi) DeepCopyObject() runtime.Object

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

func (in *NameValue) DeepCopy() *NameValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameValue.

func (*NameValue) DeepCopyInto

func (in *NameValue) DeepCopyInto(out *NameValue)

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

func (in *Play) DeepCopy() *Play

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Play.

func (*Play) DeepCopyInto

func (in *Play) DeepCopyInto(out *Play)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Play) DeepCopyObject

func (in *Play) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Play) Default

func (in *Play) Default()

func (*Play) SetupWebhookWithManager

func (in *Play) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Play) ValidateCreate

func (in *Play) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Play) ValidateDelete

func (in *Play) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Play) ValidateUpdate

func (in *Play) ValidateUpdate(old runtime.Object) error

ValidateUpdate 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

func (in *PlayList) DeepCopy() *PlayList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlayList.

func (*PlayList) DeepCopyInto

func (in *PlayList) DeepCopyInto(out *PlayList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PlayList) DeepCopyObject

func (in *PlayList) DeepCopyObject() runtime.Object

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

func (in *PlaySpec) DeepCopy() *PlaySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlaySpec.

func (*PlaySpec) DeepCopyInto

func (in *PlaySpec) DeepCopyInto(out *PlaySpec)

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

func (in *Scope) DeepCopy() *Scope

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scope.

func (*Scope) DeepCopyInto

func (in *Scope) DeepCopyInto(out *Scope)

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

func (in Script) DeepCopy() Script

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Script.

func (Script) DeepCopyInto

func (in Script) DeepCopyInto(out *Script)

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

func (in Service) DeepCopy() Service

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.

func (Service) DeepCopyInto

func (in Service) DeepCopyInto(out *Service)

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

func (in *Stack) DeepCopy() *Stack

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stack.

func (*Stack) DeepCopyInto

func (in *Stack) DeepCopyInto(out *Stack)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Stack) String

func (in Stack) String() string

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

func (in *Step) DeepCopy() *Step

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.

func (*Step) DeepCopyInto

func (in *Step) DeepCopyInto(out *Step)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Step) DeepCopyObject

func (in *Step) DeepCopyObject() runtime.Object

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

func (in *StepList) DeepCopy() *StepList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepList.

func (*StepList) DeepCopyInto

func (in *StepList) DeepCopyInto(out *StepList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StepList) DeepCopyObject

func (in *StepList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type StepSpec

type StepSpec struct {
	tkn.Step `json:",inline"`
}

StepSpec defines the desired state of Step

func (*StepSpec) DeepCopy

func (in *StepSpec) DeepCopy() *StepSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepSpec.

func (*StepSpec) DeepCopyInto

func (in *StepSpec) DeepCopyInto(out *StepSpec)

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

func (in Steps) DeepCopy() Steps

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Steps.

func (Steps) DeepCopyInto

func (in Steps) DeepCopyInto(out *Steps)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Steps) Len

func (in Steps) Len() int

Len method for Sort

func (Steps) Less

func (in Steps) Less(i, j int) bool

Less method for Sort

func (Steps) Swap

func (in Steps) Swap(i, j int)

Swap method for Sort

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

func (in *Task) DeepCopy() *Task

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.

func (*Task) DeepCopyInto

func (in *Task) DeepCopyInto(out *Task)

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"
)

func (TaskType) String

func (t TaskType) String() string

Jump to

Keyboard shortcuts

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