Use the JobID as the Version ID for mirage job versions

This commit is contained in:
Michael Lange 2018-07-27 16:31:25 -07:00
parent 0b83575106
commit ab54583878
2 changed files with 9 additions and 0 deletions

View file

@ -12,6 +12,12 @@ export default Factory.extend({
jobId: null,
version: 0,
// ID is used for record tracking within Mirage,
// but Nomad uses the JobID as the version ID.
tempVersionId() {
return this.job.id;
},
// Directive to restrict any related deployments from having a 'running' status
noActiveDeployment: false,

View file

@ -16,6 +16,9 @@ export default ApplicationSerializer.extend({
hash.Diffs.push(version.Diff);
delete version.Diff;
// ID is used for record tracking within Mirage,
// but Nomad uses the JobID as the version ID.
version.ID = version.TempVersionID;
hash.Versions.push(version);
return hash;
},