Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
水淹萌龙
kubesphere
提交
955d20fe
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看板
提交
955d20fe
编写于
4月 24, 2019
作者:
R
runzexia
提交者:
zryfish
4月 24, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
Signed-off-by:
N
runzexia
<
runzexia@yunify.com
>
上级
68809bcc
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
18 addition
and
10 deletion
+18
-10
pkg/apis/devops/install/install.go
pkg/apis/devops/install/install.go
+2
-2
pkg/apis/devops/v1alpha2/register.go
pkg/apis/devops/v1alpha2/register.go
+1
-1
pkg/apiserver/devops/devops.go
pkg/apiserver/devops/devops.go
+1
-1
pkg/apiserver/tenant/tenant.go
pkg/apiserver/tenant/tenant.go
+2
-0
pkg/gojenkins/build.go
pkg/gojenkins/build.go
+9
-3
pkg/models/devops/devops.go
pkg/models/devops/devops.go
+1
-1
pkg/models/devops/jkerror.go
pkg/models/devops/jkerror.go
+1
-1
pkg/models/devops/urlconfig.go
pkg/models/devops/urlconfig.go
+1
-1
未找到文件。
pkg/apis/devops/install/install.go
浏览文件 @
955d20fe
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
package
install
package
install
import
(
import
(
...
@@ -30,4 +30,4 @@ func init() {
...
@@ -30,4 +30,4 @@ func init() {
func
Install
(
c
*
restful
.
Container
)
{
func
Install
(
c
*
restful
.
Container
)
{
urlruntime
.
Must
(
devopsv1alpha2
.
AddToContainer
(
c
))
urlruntime
.
Must
(
devopsv1alpha2
.
AddToContainer
(
c
))
}
}
\ No newline at end of file
pkg/apis/devops/v1alpha2/register.go
浏览文件 @
955d20fe
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
package
v1alpha2
package
v1alpha2
import
(
import
(
...
...
pkg/apiserver/devops/devops.go
浏览文件 @
955d20fe
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
package
devops
package
devops
import
(
import
(
...
...
pkg/apiserver/tenant/tenant.go
浏览文件 @
955d20fe
...
@@ -262,6 +262,7 @@ func CreateDevopsProject(req *restful.Request, resp *restful.Response) {
...
@@ -262,6 +262,7 @@ func CreateDevopsProject(req *restful.Request, resp *restful.Response) {
err
:=
req
.
ReadEntity
(
&
devops
)
err
:=
req
.
ReadEntity
(
&
devops
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Infof
(
"%+v"
,
err
)
resp
.
WriteHeaderAndEntity
(
http
.
StatusBadRequest
,
errors
.
Wrap
(
err
))
resp
.
WriteHeaderAndEntity
(
http
.
StatusBadRequest
,
errors
.
Wrap
(
err
))
return
return
}
}
...
@@ -270,6 +271,7 @@ func CreateDevopsProject(req *restful.Request, resp *restful.Response) {
...
@@ -270,6 +271,7 @@ func CreateDevopsProject(req *restful.Request, resp *restful.Response) {
project
,
err
,
code
:=
tenant
.
CreateDevopsProject
(
username
,
workspaceName
,
&
devops
)
project
,
err
,
code
:=
tenant
.
CreateDevopsProject
(
username
,
workspaceName
,
&
devops
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"%+v"
,
err
)
resp
.
WriteHeaderAndEntity
(
code
,
errors
.
Wrap
(
err
))
resp
.
WriteHeaderAndEntity
(
code
,
errors
.
Wrap
(
err
))
return
return
}
}
...
...
pkg/gojenkins/build.go
浏览文件 @
955d20fe
...
@@ -24,6 +24,12 @@ import (
...
@@ -24,6 +24,12 @@ import (
"time"
"time"
)
)
const
(
Git
=
"git"
Hg
=
"hg"
Svn
=
"svc"
)
type
Build
struct
{
type
Build
struct
{
Raw
*
BuildResponse
Raw
*
BuildResponse
Job
*
Job
Job
*
Job
...
@@ -392,7 +398,7 @@ func (b *Build) GetDuration() int64 {
...
@@ -392,7 +398,7 @@ func (b *Build) GetDuration() int64 {
func
(
b
*
Build
)
GetRevision
()
string
{
func
(
b
*
Build
)
GetRevision
()
string
{
vcs
:=
b
.
Raw
.
ChangeSet
.
Kind
vcs
:=
b
.
Raw
.
ChangeSet
.
Kind
if
vcs
==
"git"
||
vcs
==
"hg"
{
if
vcs
==
Git
||
vcs
==
Hg
{
for
_
,
a
:=
range
b
.
Raw
.
Actions
{
for
_
,
a
:=
range
b
.
Raw
.
Actions
{
if
a
.
LastBuiltRevision
.
SHA1
!=
""
{
if
a
.
LastBuiltRevision
.
SHA1
!=
""
{
return
a
.
LastBuiltRevision
.
SHA1
return
a
.
LastBuiltRevision
.
SHA1
...
@@ -401,7 +407,7 @@ func (b *Build) GetRevision() string {
...
@@ -401,7 +407,7 @@ func (b *Build) GetRevision() string {
return
a
.
MercurialRevisionNumber
return
a
.
MercurialRevisionNumber
}
}
}
}
}
else
if
vcs
==
"svn"
{
}
else
if
vcs
==
Svn
{
return
strconv
.
Itoa
(
b
.
Raw
.
ChangeSet
.
Revisions
[
0
]
.
Revision
)
return
strconv
.
Itoa
(
b
.
Raw
.
ChangeSet
.
Revisions
[
0
]
.
Revision
)
}
}
return
""
return
""
...
@@ -409,7 +415,7 @@ func (b *Build) GetRevision() string {
...
@@ -409,7 +415,7 @@ func (b *Build) GetRevision() string {
func
(
b
*
Build
)
GetRevisionBranch
()
string
{
func
(
b
*
Build
)
GetRevisionBranch
()
string
{
vcs
:=
b
.
Raw
.
ChangeSet
.
Kind
vcs
:=
b
.
Raw
.
ChangeSet
.
Kind
if
vcs
==
"git"
{
if
vcs
==
Git
{
for
_
,
a
:=
range
b
.
Raw
.
Actions
{
for
_
,
a
:=
range
b
.
Raw
.
Actions
{
if
len
(
a
.
LastBuiltRevision
.
Branch
)
>
0
&&
a
.
LastBuiltRevision
.
Branch
[
0
]
.
SHA1
!=
""
{
if
len
(
a
.
LastBuiltRevision
.
Branch
)
>
0
&&
a
.
LastBuiltRevision
.
Branch
[
0
]
.
SHA1
!=
""
{
return
a
.
LastBuiltRevision
.
Branch
[
0
]
.
SHA1
return
a
.
LastBuiltRevision
.
Branch
[
0
]
.
SHA1
...
...
pkg/models/devops/devops.go
浏览文件 @
955d20fe
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
package
devops
package
devops
import
(
import
(
...
...
pkg/models/devops/jkerror.go
浏览文件 @
955d20fe
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
package
devops
package
devops
type
JkError
struct
{
type
JkError
struct
{
...
...
pkg/models/devops/urlconfig.go
浏览文件 @
955d20fe
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
package
devops
package
devops
// Some apis for Jenkins.
// Some apis for Jenkins.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录