WIP: 5739-useDocker_inSalix #5

Closed
alexm wants to merge 4 commits from 5739-useDocker_inSalix into master
4 changed files with 1330 additions and 7 deletions
Showing only changes of commit 95f6c6d5d2 - Show all commits

View File

@ -6,8 +6,12 @@ const fs = require('fs-extra');
* @param {Connection} conn MySQL connection object
* @returns {Array<Result>} The resultset
*/
async function queryFromFile(conn, file) {
async function queryFromFile(conn, file, logger) {
const sql = await fs.readFile(file, 'utf8');
if(logger){
// console.log('TRY', await this.multiQuery(conn, 'SELECT * FROM vn.saleGroup;'));
// console.log('sql: ', sql);
}
return await this.multiQuery(conn, sql);
}

View File

@ -273,12 +273,15 @@ class Push extends Command {
let err;
try {
console.log(versionDir, script.file);
await connExt.queryFromFile(pushConn,
`${versionsDir}/${versionDir}/${script.file}`);
`${versionsDir}/${versionDir}/${script.file}`, versionDir == '10724-maroonOrchid');
} catch (e) {
err = e;
}
console.log('HOLAAAAAAAAAAAAAAAAAAA')
// console.log(await conn.query(`SELECT * FROM versionLog LIMIT 1`))
// console.log(await conn.query(`SELECT * FROM vn.saleGroup LIMIT 1`))
await conn.query(
`INSERT INTO versionLog
SET code = ?,
@ -302,7 +305,7 @@ class Push extends Command {
]
);
if (err) throw err;
if (err) console.log('FALLO', err);
nChanges++;
}

View File

@ -124,14 +124,14 @@ class Run extends Command {
try {
const server = new Server(ct, dbConfig);
if (isRandom) {
const useCustom = opts.ci || opts.network
if (isRandom || useCustom) {
try {
const netSettings = await ct.inspect({
format: '{{json .NetworkSettings}}'
});
if (opts.ci || opts.network) {
if (useCustom) {
dbConfig.host = opts.network
? netSettings.Networks[opts.network].IPAddress
: netSettings.Gateway;

1316
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff