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