Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OPENTECH
/
yoho-node-ci
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
2
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
沈志敏
8 years ago
Commit
9c3fe56c33d4a63d8a420f0e96c3898052f7808f
1 parent
ba6da6d4
检查分支 支持可配置
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
apps/web/actions/checkcode.js
apps/web/views/action/project_form.hbs
apps/web/actions/checkcode.js
View file @
9c3fe56
...
...
@@ -90,16 +90,16 @@ module.exports = {
router
,
async
check
()
{
let
rule
=
new
schedule
.
RecurrenceRule
();
let
projects
=
await
Project
.
findAll
();
if
(
!
projects
||
!
projects
.
length
)
{
return
;
}
rule
.
dayOfWeek
=
[
0
,
new
schedule
.
Range
(
1
,
6
)];
rule
.
hour
=
23
;
rule
.
minute
=
59
;
schedule
.
scheduleJob
(
rule
,
function
()
{
schedule
.
scheduleJob
(
rule
,
async
()
=>
{
let
running
=
{};
let
projects
=
await
Project
.
findAll
();
if
(
!
projects
||
!
projects
.
length
)
{
return
;
}
projects
.
forEach
(
async
(
p
)
=>
{
if
(
p
.
name
!==
'yohobuywap-node'
)
{
// todo 暂时只检查wap站
...
...
@@ -107,7 +107,7 @@ module.exports = {
}
if
(
!
running
[
p
.
name
])
{
running
[
p
.
name
]
=
true
;
new
Check
(
p
.
name
,
p
.
gitlab
,
'release/5.6
'
).
check
();
new
Check
(
p
.
name
,
p
.
gitlab
,
p
.
checkbranch
||
'master
'
).
check
();
}
});
});
...
...
apps/web/views/action/project_form.hbs
View file @
9c3fe56
...
...
@@ -81,6 +81,22 @@
<!-- row -->
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<h5
class=
"lg-title mb10"
>
检查分支配置
</h5>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<div
class=
"form-group"
>
<label
class=
"col-lg-2 control-label"
style=
"text-align: right;padding-top: 7px;"
>
Git分支:
</label>
<div
class=
"col-lg-10"
>
<input
type=
"text"
name=
"checkbranch"
value=
"
{{
project
.
checkbranch
}}
"
class=
"form-control"
placeholder=
"默认:master"
>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<h5
class=
"lg-title mb10"
>
脚本配置
</h5>
</div>
</div>
...
...
Please
register
or
login
to post a comment