Connect to docker network
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e6512d00a1
commit
1cafbdab6e
13
db/docker.js
13
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();
|
||||
|
|
Loading…
Reference in New Issue