checkin for saving current state
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
#include "ismas/ismas_client.h"
|
||||
#include "progress_event.h"
|
||||
#include "mainwindow.h"
|
||||
#include "utils.h"
|
||||
#include "utils.h" // deprecated
|
||||
#include "utils_internal.h"
|
||||
#include "process/command.h"
|
||||
#include "process/update_command.h"
|
||||
#include "process/check_ismas_connectivity_command.h"
|
||||
@@ -194,61 +195,75 @@ Worker::Worker(int customerNr,
|
||||
//, m_withoutIsmasDirectPort(true) /* useful for testing */ {
|
||||
, m_withoutIsmasDirectPort(false) /* useful for testing */ {
|
||||
|
||||
// check ISMAS connectivity
|
||||
// *** check ISMAS connectivity ***
|
||||
// NOTE: if the customer repository does not exist, then it does not matter
|
||||
// if there is a connection to ISMAS (via APISM).
|
||||
// NOTE: the several processes will be started WorkList::exec().
|
||||
int next = 1;
|
||||
m_workList.push_back(
|
||||
std::make_unique<CheckIsmasConnectivityCommand>(
|
||||
//QString("echo CheckIsmasConnectivityCommand")
|
||||
QString("/opt/app/tools/atbupdate/ATBUpdateCheck --ismas-connected")
|
||||
, this));
|
||||
, this, ++next));
|
||||
|
||||
// check if update activated in ISMAS
|
||||
// *** check if update activated in ISMAS ***
|
||||
// NOTE: if the customer repository does not exist, then it does not matter
|
||||
// if the update has been activated via ISMAS.
|
||||
m_workList.push_back(
|
||||
std::make_unique<CheckUpdateActivationCommand>(
|
||||
QString("echo CheckUpdateActivationCommand")
|
||||
, this));
|
||||
//QString("echo CheckUpdateActivationCommand")
|
||||
QString("/opt/app/tools/atbupdate/ATBUpdateCheck --update-requested")
|
||||
, this, ++next));
|
||||
|
||||
// check and fetch git-customer repository
|
||||
// *** check and fetch git-customer repository ***
|
||||
// (1): if the customer repository does not exist, clone the repository.
|
||||
// (2): if the repository exists, pull the repository. Optionally, checkout
|
||||
// the corresponding branch, and check the integrity of the repository.
|
||||
m_workList.push_back(
|
||||
std::make_unique<CheckAndFetchCustomerRepositoryCommand>(
|
||||
QString("echo CheckAndFetchCustomerRepositoryCommand")
|
||||
, this));
|
||||
// QString("echo CheckAndFetchCustomerRepositoryCommand")
|
||||
QString("/opt/app/tools/atbupdate/ATBUpdateGit")
|
||||
, this, ++next));
|
||||
|
||||
// exec opkg-commands
|
||||
// first with no action -> dry-run
|
||||
// *** exec opkg-commands (noaction) ***
|
||||
// NOTE: first run the opkg commands with no action -> dry-run
|
||||
m_workList.push_back(
|
||||
std::make_unique<ExecOpkgCommand>(
|
||||
QString("echo ExecOpkgCommand")
|
||||
, this, true));
|
||||
QString("echo ExecOpkgCommand dry-run")
|
||||
, this, ++next, true));
|
||||
|
||||
// exec opkg-commands
|
||||
// now with action -> no dry-run
|
||||
// *** exec opkg-commands ***
|
||||
// NOTE: first run the opkg commands with action -> no dry-run
|
||||
m_workList.push_back(
|
||||
std::make_unique<ExecOpkgCommand>(
|
||||
QString("echo ExecOpkgCommand run")
|
||||
, this, ++next, true));
|
||||
|
||||
// send json files down to device controller
|
||||
// *** send json files down to device controller ***
|
||||
m_workList.push_back(
|
||||
std::make_unique<UpdateJsonCommand>(
|
||||
QString("echo UpdateJsonCommand")
|
||||
//QString("/opt/app/tools/atbupdate/ATBDownloadDCJsonFiles --set-ppid %1").arg(QCoreApplication::applicationPid())
|
||||
, this, false));
|
||||
, this, ++next, false));
|
||||
|
||||
// sync json files in repo etc-directory with /etc fs-directory
|
||||
m_workList.push_back(
|
||||
std::make_unique<UpdateFileSystemCommand>(
|
||||
QString("echo UpdateFileSystemCommand")
|
||||
, this));
|
||||
|
||||
, this, ++next));
|
||||
|
||||
// send device-controller firmware down to device-controller-hardware
|
||||
m_workList.push_back(
|
||||
std::make_unique<UpdateDCCommand>(
|
||||
QString("echo UpdateDCCommand")
|
||||
// QString("/opt/app/tools/atbupdate/ATBDownloadDCFirmware --read-dc-version true")
|
||||
, this));
|
||||
, this, ++next));
|
||||
|
||||
// show/send software-status
|
||||
m_workList.push_back(
|
||||
std::make_unique<ShowSoftwareStatusCommand>(
|
||||
QString("echo ShowSoftwareStatusCommand")
|
||||
, this));
|
||||
, this, -1));
|
||||
|
||||
// reboot machine
|
||||
///////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user