diff --git a/db/docker.js b/db/docker.js index a844c13f2..3bf05cc9b 100644 --- a/db/docker.js +++ b/db/docker.js @@ -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();