diff --git a/lib/buildFactory.js b/lib/buildFactory.js index 5c29a9da..f22a6222 100644 --- a/lib/buildFactory.js +++ b/lib/buildFactory.js @@ -157,8 +157,7 @@ class BuildFactory extends BaseFactory { modelConfig.environment = permutation.environment; modelConfig.steps = permutation.commands.map(command => ({ name: command.name, - command: command.command, - alwaysRun: command.alwaysRun || false + command: command.command })); const bookendConfig = { pipeline, job, build: modelConfig }; @@ -169,7 +168,7 @@ class BuildFactory extends BaseFactory { ]).then(([setup, teardown]) => { modelConfig.steps = setup.concat(modelConfig.steps, teardown); // Launcher is hardcoded to do some business in sd-setup-launcher - modelConfig.steps.unshift({ name: 'sd-setup-launcher', alwaysRun: true }); + modelConfig.steps.unshift({ name: 'sd-setup-launcher' }); return super.create(modelConfig); }); diff --git a/test/lib/buildFactory.test.js b/test/lib/buildFactory.test.js index 81bacc37..b34ea2b9 100644 --- a/test/lib/buildFactory.test.js +++ b/test/lib/buildFactory.test.js @@ -134,30 +134,30 @@ describe('Build Factory', () => { const isoTime = (new Date(dateNow)).toISOString(); const container = 'node:4'; const steps = [ - { name: 'sd-setup-launcher', alwaysRun: true }, - { name: 'sd-setup-scm', command: 'git clone', alwaysRun: true }, - { command: 'npm install', name: 'init', alwaysRun: false }, - { command: 'npm test', name: 'test', alwaysRun: false } + { name: 'sd-setup-launcher' }, + { name: 'sd-setup-scm', command: 'git clone' }, + { command: 'npm install', name: 'init' }, + { command: 'npm test', name: 'test' } ]; const environment = { NODE_ENV: 'test', NODE_VERSION: '4' }; const permutations = [{ commands: [ - { command: 'npm install', name: 'init', alwaysRun: false }, - { command: 'npm test', name: 'test', alwaysRun: false } + { command: 'npm install', name: 'init' }, + { command: 'npm test', name: 'test' } ], environment: { NODE_ENV: 'test', NODE_VERSION: '4' }, image: 'node:4' }, { commands: [ - { command: 'npm install', name: 'init', alwaysRun: false }, - { command: 'npm test', name: 'test', alwaysRun: false } + { command: 'npm install', name: 'init' }, + { command: 'npm test', name: 'test' } ], environment: { NODE_ENV: 'test', NODE_VERSION: '5' }, image: 'node:5' }, { commands: [ - { command: 'npm install', name: 'init', alwaysRun: false }, - { command: 'npm test', name: 'test', alwaysRun: false } + { command: 'npm install', name: 'init' }, + { command: 'npm test', name: 'test' } ], environment: { NODE_ENV: 'test', NODE_VERSION: '6' }, image: 'node:6'