Skip to content

Commit

Permalink
Merge pull request #19 from screwdriver-cd/periodic
Browse files Browse the repository at this point in the history
[2] fix: add start/stop periodic functions
  • Loading branch information
Pranav Ravichandran authored May 2, 2018
2 parents d216a40 + 1debb36 commit ec52dea
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
18 changes: 18 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,24 @@ class JenkinsExecutor extends Executor {
params: [{ name: jobName }]
});
}

/**
* Starts a new periodic build in an executor
* @method _startPeriodic
* @return {Promise} Resolves to null since it's not supported
*/
async _startPeriodic() {
return Promise.resolve(null);
}

/**
* Stops a new periodic build in an executor
* @method _stopPeriodic
* @return {Promise} Resolves to null since it's not supported
*/
async _stopPeriodic() {
return Promise.resolve(null);
}
}

module.exports = JenkinsExecutor;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"circuit-fuses": "^2.2.1",
"jenkins": "^0.20.0",
"request": "^2.72.0",
"screwdriver-executor-base": "^5.2.0",
"screwdriver-executor-base": "^6.1.0",
"tinytim": "^0.1.1",
"xml-escape": "^1.1.0"
},
Expand Down
8 changes: 8 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ describe('index', () => {
});
});

describe('periodic', () => {
it('resolves to null when calling periodic start',
() => executor.startPeriodic().then(res => assert.isNull(res)));

it('resolves to null when calling periodic stop',
() => executor.stopPeriodic().then(res => assert.isNull(res)));
});

describe('_loadJobXml', () => {
let fsMock;

Expand Down

0 comments on commit ec52dea

Please sign in to comment.