mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
rundir could not be kept, use consistent naming
This commit is contained in:
parent
f96e58c3f1
commit
32426ee34f
@ -484,7 +484,7 @@ make
|
|||||||
- `LAMINAR_BIND_HTTP`: The interface/port or unix socket on which `laminard` should listen for incoming connections to the web frontend. Default `*:8080`
|
- `LAMINAR_BIND_HTTP`: The interface/port or unix socket on which `laminard` should listen for incoming connections to the web frontend. Default `*:8080`
|
||||||
- `LAMINAR_BIND_RPC`: The interface/port or unix socket on which `laminard` should listen for incoming commands such as build triggers. Default `unix-abstract:laminar`
|
- `LAMINAR_BIND_RPC`: The interface/port or unix socket on which `laminard` should listen for incoming commands such as build triggers. Default `unix-abstract:laminar`
|
||||||
- `LAMINAR_TITLE`: The page title to show in the web frontend.
|
- `LAMINAR_TITLE`: The page title to show in the web frontend.
|
||||||
- `LAMINAR_KEEP_WORKDIR`: If set, do not delete run directories after completion
|
- `LAMINAR_KEEP_RUNDIR`: If set, do not delete run directories after completion
|
||||||
- `LAMINAR_ARCHIVE_URL`: If set, the web frontend served by `laminard` will use this URL to form links to artefacts archived jobs. Must be synchronized with web server configuration.
|
- `LAMINAR_ARCHIVE_URL`: If set, the web frontend served by `laminard` will use this URL to form links to artefacts archived jobs. Must be synchronized with web server configuration.
|
||||||
|
|
||||||
### Script execution order
|
### Script execution order
|
||||||
|
@ -33,12 +33,12 @@
|
|||||||
#LAMINAR_TITLE=
|
#LAMINAR_TITLE=
|
||||||
|
|
||||||
###
|
###
|
||||||
### LAMINAR_KEEP_WORKDIR
|
### LAMINAR_KEEP_RUNDIR
|
||||||
###
|
###
|
||||||
### If set (to anything), the job workdir $LAMINAR_HOME/run/$JOB/$NUM
|
### If set (to anything), the job rundir $LAMINAR_HOME/run/$JOB/$RUN
|
||||||
### will not be deleted after the run has completed
|
### will not be deleted after the run has completed
|
||||||
###
|
###
|
||||||
#LAMINAR_KEEP_WORKDIR=1
|
#LAMINAR_KEEP_RUNDIR=1
|
||||||
|
|
||||||
###
|
###
|
||||||
### LAMINAR_ARCHIVE_URL
|
### LAMINAR_ARCHIVE_URL
|
||||||
|
@ -73,7 +73,7 @@ Laminar::Laminar() {
|
|||||||
archiveUrl = ARCHIVE_URL_DEFAULT;
|
archiveUrl = ARCHIVE_URL_DEFAULT;
|
||||||
if(char* envArchive = getenv("LAMINAR_ARCHIVE_URL"))
|
if(char* envArchive = getenv("LAMINAR_ARCHIVE_URL"))
|
||||||
archiveUrl = envArchive;
|
archiveUrl = envArchive;
|
||||||
eraseWorkdir = true;
|
eraseRunDir = true;
|
||||||
homeDir = getenv("LAMINAR_HOME") ?: "/var/lib/laminar";
|
homeDir = getenv("LAMINAR_HOME") ?: "/var/lib/laminar";
|
||||||
|
|
||||||
db = new Database((fs::path(homeDir)/"laminar.sqlite").string().c_str());
|
db = new Database((fs::path(homeDir)/"laminar.sqlite").string().c_str());
|
||||||
@ -370,8 +370,8 @@ void Laminar::stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Laminar::loadConfiguration() {
|
bool Laminar::loadConfiguration() {
|
||||||
if(getenv("LAMINAR_KEEP_WORKDIR"))
|
if(getenv("LAMINAR_KEEP_RUNDIR"))
|
||||||
eraseWorkdir = false;
|
eraseRunDir = false;
|
||||||
|
|
||||||
NodeMap nm;
|
NodeMap nm;
|
||||||
|
|
||||||
@ -726,6 +726,7 @@ void Laminar::runFinished(Run * r) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove the rundir
|
// remove the rundir
|
||||||
|
if(eraseRunDir)
|
||||||
fs::remove_all(r->runDir);
|
fs::remove_all(r->runDir);
|
||||||
|
|
||||||
// will delete the job
|
// will delete the job
|
||||||
|
@ -85,7 +85,7 @@ private:
|
|||||||
std::string homeDir;
|
std::string homeDir;
|
||||||
std::set<LaminarClient*> clients;
|
std::set<LaminarClient*> clients;
|
||||||
std::set<LaminarWaiter*> waiters;
|
std::set<LaminarWaiter*> waiters;
|
||||||
bool eraseWorkdir;
|
bool eraseRunDir;
|
||||||
std::string archiveUrl;
|
std::string archiveUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user