Connect to docker network
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-10-05 12:26:42 +02:00
parent e6512d00a1
commit 1cafbdab6e
1 changed files with 4 additions and 9 deletions

View File

@ -57,17 +57,12 @@ module.exports = class Docker {
let netSettings = JSON.parse(inspect.stdout);
if (ci) {
console.log('Running on CI...');
// this.dbConf.host = netSettings.Gateway;
this.dbConf.host = netSettings.Networks.jenkins.IPAddress;
}
this.dbConf.port = 3306;
// console.log(netSettings);
// this.dbConf.port = netSettings.Ports['3306/tcp'][0]['HostPort'];
this.dbConf.port = 3306;
console.log('Host: ', this.dbConf.host);
console.log('Port: ', this.dbConf.port);
await this.execP(`docker network connect jenkins ${this.id}`);
} else
this.dbConf.port = netSettings.Ports['3306/tcp'][0]['HostPort'];
}
await this.wait();