Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
水淹萌龙
kubesphere
提交
2fce04ef
K
kubesphere
项目概览
水淹萌龙
/
kubesphere
与 Fork 源项目一致
Fork自
KubeSphere / kubesphere
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kubesphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
2fce04ef
编写于
3月 27, 2020
作者:
R
runzexia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ut test
Signed-off-by:
N
runzexia
<
runzexia@yunify.com
>
上级
f411bec1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
268 addition
and
7 deletion
+268
-7
config/crds/devops.kubesphere.io_devopsprojects.yaml
config/crds/devops.kubesphere.io_devopsprojects.yaml
+6
-0
config/crds/devops.kubesphere.io_pipelines.yaml
config/crds/devops.kubesphere.io_pipelines.yaml
+260
-0
pkg/simple/client/devops/credential.go
pkg/simple/client/devops/credential.go
+0
-7
pkg/simple/client/devops/fake/fakedevops.go
pkg/simple/client/devops/fake/fakedevops.go
+2
-0
未找到文件。
config/crds/devops.kubesphere.io_devopsprojects.yaml
浏览文件 @
2fce04ef
...
...
@@ -38,6 +38,12 @@ spec:
type
:
object
status
:
description
:
DevOpsProjectStatus defines the observed state of DevOpsProject
properties
:
adminNamespace
:
description
:
'
INSERT
ADDITIONAL
STATUS
FIELD
-
define
observed
state
of
cluster
Important:
Run
"make"
to
regenerate
code
after
modifying
this
file'
type
:
string
type
:
object
type
:
object
version
:
v1alpha3
...
...
config/crds/devops.kubesphere.io_pipelines.yaml
0 → 100644
浏览文件 @
2fce04ef
---
apiVersion
:
apiextensions.k8s.io/v1beta1
kind
:
CustomResourceDefinition
metadata
:
annotations
:
controller-gen.kubebuilder.io/version
:
(unknown)
creationTimestamp
:
null
name
:
pipelines.devops.kubesphere.io
spec
:
group
:
devops.kubesphere.io
names
:
kind
:
Pipeline
listKind
:
PipelineList
plural
:
pipelines
singular
:
pipeline
scope
:
Namespaced
validation
:
openAPIV3Schema
:
description
:
Pipeline is the Schema for the pipelines API
properties
:
apiVersion
:
description
:
'
APIVersion
defines
the
versioned
schema
of
this
representation
of
an
object.
Servers
should
convert
recognized
schemas
to
the
latest
internal
value,
and
may
reject
unrecognized
values.
More
info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type
:
string
kind
:
description
:
'
Kind
is
a
string
value
representing
the
REST
resource
this
object
represents.
Servers
may
infer
this
from
the
endpoint
the
client
submits
requests
to.
Cannot
be
updated.
In
CamelCase.
More
info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type
:
string
metadata
:
type
:
object
spec
:
description
:
PipelineSpec defines the desired state of Pipeline
properties
:
multi_branch_pipeline
:
properties
:
bitbucket_server_source
:
properties
:
api_uri
:
type
:
string
credential_id
:
type
:
string
discover_branches
:
type
:
integer
discover_pr_from_forks
:
properties
:
strategy
:
type
:
integer
trust
:
type
:
integer
type
:
object
discover_pr_from_origin
:
type
:
integer
git_clone_option
:
properties
:
depth
:
type
:
integer
shallow
:
type
:
boolean
timeout
:
type
:
integer
type
:
object
owner
:
type
:
string
regex_filter
:
type
:
string
repo
:
type
:
string
scm_id
:
type
:
string
type
:
object
descriptio
:
type
:
string
discarder
:
properties
:
days_to_keep
:
type
:
string
num_to_keep
:
type
:
string
type
:
object
git_source
:
properties
:
credential_id
:
type
:
string
discover_branches
:
type
:
boolean
git_clone_option
:
properties
:
depth
:
type
:
integer
shallow
:
type
:
boolean
timeout
:
type
:
integer
type
:
object
regex_filter
:
type
:
string
scm_id
:
type
:
string
url
:
type
:
string
type
:
object
github_source
:
properties
:
api_uri
:
type
:
string
credential_id
:
type
:
string
discover_branches
:
type
:
integer
discover_pr_from_forks
:
properties
:
strategy
:
type
:
integer
trust
:
type
:
integer
type
:
object
discover_pr_from_origin
:
type
:
integer
git_clone_option
:
properties
:
depth
:
type
:
integer
shallow
:
type
:
boolean
timeout
:
type
:
integer
type
:
object
owner
:
type
:
string
regex_filter
:
type
:
string
repo
:
type
:
string
scm_id
:
type
:
string
type
:
object
multibranch_job_trigger
:
properties
:
create_action_job_to_trigger
:
type
:
string
delete_action_job_to_trigger
:
type
:
string
type
:
object
name
:
type
:
string
script_path
:
type
:
string
single_svn_source
:
properties
:
credential_id
:
type
:
string
remote
:
type
:
string
scm_id
:
type
:
string
type
:
object
source_type
:
type
:
string
svn_source
:
properties
:
credential_id
:
type
:
string
excludes
:
type
:
string
includes
:
type
:
string
remote
:
type
:
string
scm_id
:
type
:
string
type
:
object
timer_trigger
:
properties
:
cron
:
description
:
user in no scm job
type
:
string
interval
:
description
:
use in multi-branch job
type
:
string
type
:
object
required
:
-
name
-
script_path
-
source_type
type
:
object
pipeline
:
properties
:
descriptio
:
type
:
string
disable_concurrent
:
type
:
boolean
discarder
:
properties
:
days_to_keep
:
type
:
string
num_to_keep
:
type
:
string
type
:
object
jenkinsfile
:
type
:
string
name
:
type
:
string
parameters
:
items
:
properties
:
default_value
:
type
:
string
description
:
type
:
string
name
:
type
:
string
type
:
type
:
string
required
:
-
name
-
type
type
:
object
type
:
array
remote_trigger
:
properties
:
token
:
type
:
string
type
:
object
timer_trigger
:
properties
:
cron
:
description
:
user in no scm job
type
:
string
interval
:
description
:
use in multi-branch job
type
:
string
type
:
object
required
:
-
name
type
:
object
type
:
description
:
'
INSERT
ADDITIONAL
SPEC
FIELDS
-
desired
state
of
cluster
Important:
Run
"make"
to
regenerate
code
after
modifying
this
file'
type
:
string
required
:
-
type
type
:
object
status
:
description
:
PipelineStatus defines the observed state of Pipeline
type
:
object
type
:
object
version
:
v1alpha3
versions
:
-
name
:
v1alpha3
served
:
true
storage
:
true
status
:
acceptedNames
:
kind
:
"
"
plural
:
"
"
conditions
:
[]
storedVersions
:
[]
pkg/simple/client/devops/credential.go
浏览文件 @
2fce04ef
...
...
@@ -2,7 +2,6 @@ package devops
import
(
v1
"k8s.io/api/core/v1"
"time"
)
type
Credential
struct
{
...
...
@@ -24,12 +23,6 @@ type Credential struct {
}
`json:"fingerprint,omitempty" description:"usage of the Credential"`
Description
string
`json:"description,omitempty" description:"Credential's description'"`
Domain
string
`json:"domain,omitempty" description:"Credential's domain,In ks we only use the default domain, default '_''"`
CreateTime
*
time
.
Time
`json:"create_time,omitempty" description:"Credential's create_time'"`
Creator
string
`json:"creator,omitempty" description:"Creator's username"`
UsernamePasswordCredential
*
UsernamePasswordCredential
`json:"username_password,omitempty" description:"username password Credential struct"`
SshCredential
*
SshCredential
`json:"ssh,omitempty" description:"ssh Credential struct"`
SecretTextCredential
*
SecretTextCredential
`json:"secret_text,omitempty" description:"secret_text Credential struct"`
KubeconfigCredential
*
KubeconfigCredential
`json:"kubeconfig,omitempty" description:"kubeconfig Credential struct"`
}
type
UsernamePasswordCredential
struct
{
...
...
pkg/simple/client/devops/fake/fakedevops.go
浏览文件 @
2fce04ef
...
...
@@ -27,6 +27,7 @@ func New(projects ...string) *Devops {
Data
:
nil
,
Projects
:
map
[
string
]
interface
{}{},
Pipelines
:
map
[
string
]
map
[
string
]
*
devopsv1alpha3
.
Pipeline
{},
Credentials
:
map
[
string
]
map
[
string
]
*
v1
.
Secret
{},
}
for
_
,
p
:=
range
projects
{
d
.
Projects
[
p
]
=
true
...
...
@@ -38,6 +39,7 @@ func NewWithPipelines(project string, pipelines ...*devopsv1alpha3.Pipeline) *De
Data
:
nil
,
Projects
:
map
[
string
]
interface
{}{},
Pipelines
:
map
[
string
]
map
[
string
]
*
devopsv1alpha3
.
Pipeline
{},
Credentials
:
map
[
string
]
map
[
string
]
*
v1
.
Secret
{},
}
d
.
Projects
[
project
]
=
true
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录