-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(2767): Add stage setup and teardown jobIds (#570)
- Loading branch information
Showing
14 changed files
with
741 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
const BaseModel = require('./base'); | ||
|
||
class StageBuildModel extends BaseModel { | ||
/** | ||
* Construct a StageBuildModel object | ||
* @method constructor | ||
* @param {Object} config | ||
* @param {Object} config.datastore Object that will perform operations on the datastore | ||
* @param {Number} config.eventId Event ID | ||
* @param {Number} config.stageId Stage ID | ||
* @param {String} config.status Stage build status | ||
*/ | ||
constructor(config) { | ||
super('stageBuild', config); | ||
} | ||
} | ||
|
||
module.exports = StageBuildModel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
'use strict'; | ||
|
||
const BaseFactory = require('./baseFactory'); | ||
const StageBuild = require('./stageBuild'); | ||
let instance; | ||
|
||
class StageBuildFactory extends BaseFactory { | ||
/** | ||
* Construct a StageBuildFactory object | ||
* @method constructor | ||
* @param {Object} config | ||
* @param {Datastore} config.datastore Object that will perform operations on the datastore | ||
*/ | ||
constructor(config) { | ||
super('stageBuild', config); | ||
} | ||
|
||
/** | ||
* Instantiate a StageBuild class | ||
* @method createClass | ||
* @param {Object} config StageBuild data | ||
* @return {StageBuild} | ||
*/ | ||
createClass(config) { | ||
return new StageBuild(config); | ||
} | ||
|
||
/** | ||
* Create a StageBuild model | ||
* @param {Object} config | ||
* @param {Number} config.eventId Event ID | ||
* @param {Number} config.stageId Stage ID | ||
* @param {Object} config.workflowGraph Stage workflowGraph | ||
* @memberof StageBuildFactory | ||
*/ | ||
create(config) { | ||
return super.create(config); | ||
} | ||
|
||
/** | ||
* Get an instance of the StageBuildFactory | ||
* @method getInstance | ||
* @param {Object} config | ||
* @param {Datastore} config.datastore | ||
* @return {StageBuildFactory} | ||
*/ | ||
static getInstance(config) { | ||
instance = BaseFactory.getInstance(StageBuildFactory, instance, config); | ||
|
||
return instance; | ||
} | ||
} | ||
|
||
module.exports = StageBuildFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.