Added Image Maker file - to be filled according the diagram

This commit is contained in:
Kasra Bigdeli
2018-11-27 22:38:12 -08:00
parent 439081d376
commit cb2a42fd35
9 changed files with 88 additions and 6 deletions
+1 -1
View File
@@ -237,7 +237,7 @@ class AppsDataStore {
throw ApiStatusCodes.createError(ApiStatusCodes.ILLEGAL_PARAMETER, `customDomain ${customDomain} is not attached to app ${appName}`);
});
}
getNewVersion(appName) {
createNewVersion(appName) {
if (!appName) {
throw new Error('App Name should not be empty');
}
File diff suppressed because one or more lines are too long
+41
View File
@@ -0,0 +1,41 @@
"use strict";
/*
+---------------------------------+
+------------------+ | |
|------------------| | Assign the final Image | +--------------------+
|| || | (library/mysql +----------------+ Retag and push +<-----------+
|| Update |-----------+ or | | IF NEEDED | |
||Captain Service || | repo.com:996/captain/myimage) | +--------------------+ |
|| || | | |
|------------------| | as new ver's image +-----------+ +
+------------------+ | | | CREATE
+---------------------------------+ | img-captain--appname:5
| | |
| Set the Deployed Version | +-------------+ ^
+---------------------------------+ | |
| |
| |
| |
+-----------------------+ | |
| | | |
| Docker ImageName +-------+ |
| | |
+-----------------------+ |
+-------------------+ | | |
| | | captain-definition +-------------+ |
| | | content | | |
| ServiceManager +----> CreateNewVersion +----> +-----------------------+ | |
| | | | ^ |
| | | Uploaded Tar +-----------------> ImageMaker. +
+-------------------+ | | ^ createImage(appName,Ver,Data)
+-----------------------+ |
| | |
| GIT Repo +-------------+
| |
+-----------------------+
*/
class ImageMaker {
}
module.exports = ImageMaker;
//# sourceMappingURL=ImageMaker.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"ImageMaker.js","sourceRoot":"","sources":["../../src/user/ImageMaker.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCE;AAEF,MAAM,UAAU;CAAG;AAEnB,iBAAS,UAAU,CAAA"}
+1 -1
View File
@@ -125,7 +125,7 @@ class ServiceManager {
this.buildLogs[appName].log('Build started for ' + appName);
return Promise.resolve()
.then(function () {
return dataStore.getAppsDataStore().getNewVersion(appName);
return dataStore.getAppsDataStore().createNewVersion(appName);
})
.then(function (newVersionPulled) {
newVersion = newVersionPulled;
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -336,7 +336,7 @@ class AppsDataStore {
})
}
getNewVersion(appName: string) {
createNewVersion(appName: string) {
if (!appName) {
throw new Error('App Name should not be empty')
}
+40
View File
@@ -0,0 +1,40 @@
/*
+---------------------------------+
+------------------+ | |
|------------------| | Assign the final Image | +--------------------+
|| || | (library/mysql +----------------+ Retag and push +<-----------+
|| Update |-----------+ or | | IF NEEDED | |
||Captain Service || | repo.com:996/captain/myimage) | +--------------------+ |
|| || | | |
|------------------| | as new ver's image +-----------+ +
+------------------+ | | | CREATE
+---------------------------------+ | img-captain--appname:5
| | |
| Set the Deployed Version | +-------------+ ^
+---------------------------------+ | |
| |
| |
| |
+-----------------------+ | |
| | | |
| Docker ImageName +-------+ |
| | |
+-----------------------+ |
+-------------------+ | | |
| | | captain-definition +-------------+ |
| | | content | | |
| ServiceManager +----> CreateNewVersion +----> +-----------------------+ | |
| | | | ^ |
| | | Uploaded Tar +-----------------> ImageMaker. +
+-------------------+ | | ^ createImage(appName,Ver,Data)
+-----------------------+ |
| | |
| GIT Repo +-------------+
| |
+-----------------------+
*/
class ImageMaker {}
export = ImageMaker
+1 -1
View File
@@ -189,7 +189,7 @@ class ServiceManager {
return Promise.resolve()
.then(function() {
return dataStore.getAppsDataStore().getNewVersion(appName)
return dataStore.getAppsDataStore().createNewVersion(appName)
})
.then(function(newVersionPulled) {
newVersion = newVersionPulled