mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-11 04:45:07 +00:00
cmd type is optional now - shell is the default + more info at ui
This commit is contained in:
parent
bfc877bba5
commit
45193664ab
@ -7,20 +7,14 @@ scm:
|
|||||||
rev: default
|
rev: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- type: shell
|
- cmd: >
|
||||||
cmd: >
|
|
||||||
echo "long multiline string" &&
|
echo "long multiline string" &&
|
||||||
sleep 2 &&
|
sleep 2 &&
|
||||||
echo "is not a problem when you're using yaml" &&
|
echo "is not a problem when you're using yaml" &&
|
||||||
echo "cur dir is `pwd`"
|
echo "cur dir is `pwd`"
|
||||||
- type: shell
|
- name: sleep
|
||||||
name: sleep
|
|
||||||
cmd: sleep 4
|
cmd: sleep 4
|
||||||
- type: shell
|
- cmd: echo 1 > 1.txt
|
||||||
cmd: echo 1 > 1.txt
|
- cmd: sleep 4
|
||||||
- type: shell
|
- cmd: echo 2 > 2.txt
|
||||||
cmd: sleep 4
|
- cmd: cat 1.txt 2.txt
|
||||||
- type: shell
|
|
||||||
cmd: echo 2 > 2.txt
|
|
||||||
- type: shell
|
|
||||||
cmd: cat 1.txt 2.txt
|
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
"rev": "1"
|
"rev": "1"
|
||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{"type": "shell", "cmd": "echo 11 > 11.txt"},
|
{"cmd": "echo 11 > 11.txt"},
|
||||||
{"type": "shell", "cmd": "sleep 4"},
|
{"cmd": "sleep 4"},
|
||||||
{"type": "shell", "cmd": "echo 22 > 22.txt"},
|
{"cmd": "echo 22 > 22.txt"},
|
||||||
{"type": "shell", "cmd": "cat 11.txt 22.txt"}
|
{"cmd": "cat 11.txt 22.txt"}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -68,7 +68,7 @@ Distributor.prototype._runNext = function(callback) {
|
|||||||
{
|
{
|
||||||
endDate: Date.now(),
|
endDate: Date.now(),
|
||||||
status: err ? 'error' : 'done',
|
status: err ? 'error' : 'done',
|
||||||
error: err
|
error: err ? err.message : null
|
||||||
},
|
},
|
||||||
function(err, build) {
|
function(err, build) {
|
||||||
// try to run next project from the queue
|
// try to run next project from the queue
|
||||||
|
@ -63,6 +63,14 @@ exports.loadConfig = function(dir, callback) {
|
|||||||
function() {
|
function() {
|
||||||
reader.load(dir, 'config', this.slot());
|
reader.load(dir, 'config', this.slot());
|
||||||
},
|
},
|
||||||
|
function(err, config) {
|
||||||
|
// apply defaults
|
||||||
|
_(config.steps).each(function(step) {
|
||||||
|
_(step).defaults({type: 'shell'});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.pass(config);
|
||||||
|
},
|
||||||
callback
|
callback
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
background: lighten(@brand-success, 50%);
|
background: lighten(@brand-success, 50%);
|
||||||
}
|
}
|
||||||
&__error {
|
&__error {
|
||||||
background: lighten(@brand-danger, 50%);
|
background: lighten(@brand-danger, 30%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&_info {
|
&_info {
|
||||||
|
@ -8,6 +8,9 @@ mixin statusText(build)
|
|||||||
if build.status === 'done'
|
if build.status === 'done'
|
||||||
span done
|
span done
|
||||||
|
|
||||||
|
if build.status === 'error'
|
||||||
|
span error
|
||||||
|
|
||||||
- var build = this.props.build;
|
- var build = this.props.build;
|
||||||
|
|
||||||
.build(class="build__#{build.status}")
|
.build(class="build__#{build.status}")
|
||||||
|
@ -2,4 +2,32 @@ if this.state.build
|
|||||||
h2
|
h2
|
||||||
span Build #
|
span Build #
|
||||||
span= this.state.build.number
|
span= this.state.build.number
|
||||||
|
|
||||||
|
if this.state.build.startDate
|
||||||
|
div
|
||||||
|
| Started at
|
||||||
|
if this.state.build.startDate
|
||||||
|
DateTime(date=new Date(this.state.build.startDate))
|
||||||
|
else
|
||||||
|
| -
|
||||||
|
else
|
||||||
|
div
|
||||||
|
| Queued at
|
||||||
|
if this.state.build.createDate
|
||||||
|
DateTime(date=new Date(this.state.build.createDate))
|
||||||
|
else
|
||||||
|
| -
|
||||||
|
|
||||||
|
div
|
||||||
|
| Builded at
|
||||||
|
if this.state.build.endDate
|
||||||
|
DateTime(date=new Date(this.state.build.endDate))
|
||||||
|
else
|
||||||
|
| -
|
||||||
|
|
||||||
|
div
|
||||||
|
if this.state.build.error
|
||||||
|
| Error:
|
||||||
|
span= this.state.build.error
|
||||||
|
|
||||||
Terminal(build=this.state.build.id)
|
Terminal(build=this.state.build.id)
|
||||||
|
@ -6,11 +6,14 @@ define([
|
|||||||
'app/actions/build',
|
'app/actions/build',
|
||||||
'app/stores/build',
|
'app/stores/build',
|
||||||
'app/components/terminal/terminal',
|
'app/components/terminal/terminal',
|
||||||
'templates/app/components/builds/view'
|
'templates/app/components/builds/view',
|
||||||
|
'app/components/common/index'
|
||||||
], function(
|
], function(
|
||||||
React, Reflux, BuildActions, buildStore, TerminalComponent, template
|
React, Reflux, BuildActions, buildStore, TerminalComponent, template,
|
||||||
|
CommonComponents
|
||||||
) {
|
) {
|
||||||
template = template.locals({
|
template = template.locals({
|
||||||
|
DateTime: CommonComponents.DateTime,
|
||||||
Terminal: TerminalComponent
|
Terminal: TerminalComponent
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user