Skip to content

Commit a0225bc

Browse files
Izak88jkuri
authored andcommitted
fix(deploy): enable custom deploy or with predefined deploy providers (closes #304)
1 parent 3f4753e commit a0225bc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/api/process.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ export function startBuildProcess(
5757
const scriptCommands = prepareCommands(proc, scriptTypes);
5858
let beforeDeployCommands = prepareCommands(proc, [CommandType.before_deploy]);
5959
const afterDeployCommands = prepareCommands(proc, [CommandType.after_deploy]);
60-
const deployCommands = prepareCommands(proc, [CommandType.deploy]);
60+
let deployCommands = prepareCommands(proc, [CommandType.deploy]);
61+
6162
let deployPreferences;
62-
if (deployCommands.length) {
63-
deployPreferences = deployCommands
64-
.map(p => p.command)
65-
.reduce((a, b) => Object.assign(b, a));
63+
if (deployCommands.length && typeof deployCommands[0].command === 'object') {
64+
deployPreferences = deployCommands.reduce((curr, acc) => Object.assign(acc, curr.command));
65+
deployCommands = [];
6666
}
6767

6868
let restoreCache: Observable<any> = Observable.empty();
@@ -116,6 +116,7 @@ export function startBuildProcess(
116116
.concat(...scriptCommands.map(cmd => docker.attachExec(name, cmd)))
117117
.concat(...beforeDeployCommands.map(cmd => docker.attachExec(name, cmd)))
118118
.concat(...deployCommands.map(cmd => docker.attachExec(name, cmd)))
119+
.concat(deploy(deployPreferences, name, envs))
119120
.concat(...afterDeployCommands.map(cmd => docker.attachExec(name, cmd)))
120121
.timeoutWith(idleTimeout, Observable.throw(new Error('command timeout')))
121122
.takeUntil(Observable.timer(jobTimeout).timeInterval().mergeMap(() => {

src/app/styles/nav.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
height: 25px
6969

7070
i
71-
color: $white
71+
color: $dark
7272
margin-left: 10px
7373
margin-top: 2px
7474
font-size: 14px

0 commit comments

Comments
 (0)