mirror of
https://github.com/caprover/caprover
synced 2026-08-01 05:10:59 +00:00
Added Image Maker file - to be filled according the diagram
This commit is contained in:
@@ -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
@@ -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
|
||||
@@ -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"}
|
||||
@@ -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
@@ -336,7 +336,7 @@ class AppsDataStore {
|
||||
})
|
||||
}
|
||||
|
||||
getNewVersion(appName: string) {
|
||||
createNewVersion(appName: string) {
|
||||
if (!appName) {
|
||||
throw new Error('App Name should not be empty')
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user