aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2023-02-03 23:21:42 +0100
committerMagnus Granberg <zorry@gentoo.org>2023-02-03 23:21:42 +0100
commit102c51d88be07b23cd24d4cad6fad5e71edacb4c (patch)
treefba6a061b3983a95caf599585a8669364bc1b4a3
parentRename setBuildbotLog to Summarylog (diff)
downloadtinderbox-cluster-102c51d88be07b23cd24d4cad6fad5e71edacb4c.tar.gz
tinderbox-cluster-102c51d88be07b23cd24d4cad6fad5e71edacb4c.tar.bz2
tinderbox-cluster-102c51d88be07b23cd24d4cad6fad5e71edacb4c.zip
Add support for binhost on docker image build
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
-rw-r--r--buildbot_gentoo_ci/config/workers.py2
-rw-r--r--buildbot_gentoo_ci/db/model.py3
-rw-r--r--buildbot_gentoo_ci/db/workers.py13
-rw-r--r--sql/gentoo_ci_schema.sql3
4 files changed, 17 insertions, 4 deletions
diff --git a/buildbot_gentoo_ci/config/workers.py b/buildbot_gentoo_ci/config/workers.py
index 3dcef1a..c29502e 100644
--- a/buildbot_gentoo_ci/config/workers.py
+++ b/buildbot_gentoo_ci/config/workers.py
@@ -43,7 +43,7 @@ def getDockerHost(props, docker_worker):
node_data = yield gentooci.db.workers.getNodeByUuid(node['node_uuid'])
print(worker_data)
print(node_data)
- return node_data['host_url']
+ return node_data['docker_host_url']
@util.renderer
@defer.inlineCallbacks
diff --git a/buildbot_gentoo_ci/db/model.py b/buildbot_gentoo_ci/db/model.py
index 87d7dbc..a4b5935 100644
--- a/buildbot_gentoo_ci/db/model.py
+++ b/buildbot_gentoo_ci/db/model.py
@@ -372,7 +372,8 @@ class Model(base.DBConnectorComponent):
sa.Column('uuid', sa.String(36), primary_key=True,
default=lambda: str(uuid.uuid4())),
sa.Column('name', sa.String(255), nullable=False),
- sa.Column('host_url', sa.String(255), nullable=False),
+ sa.Column('docker_host_url', sa.String(255), nullable=False),
+ sa.Column('bin_host_url', sa.String(255), nullable=False),
sa.Column('enable', sa.Boolean, default=False),
)
diff --git a/buildbot_gentoo_ci/db/workers.py b/buildbot_gentoo_ci/db/workers.py
index e82a6b2..d09d88c 100644
--- a/buildbot_gentoo_ci/db/workers.py
+++ b/buildbot_gentoo_ci/db/workers.py
@@ -130,6 +130,16 @@ class WorkersConnectorComponent(base.DBConnectorComponent):
res = yield self.db.pool.do(thd)
return res
+ @defer.inlineCallbacks
+ def getAllNodes(self):
+ def thd(conn):
+ tbl = self.db.model.nodes
+ q = tbl.select()
+ return [self._row2dict_node(conn, row)
+ for row in conn.execute(q).fetchall()]
+ res = yield self.db.pool.do(thd)
+ return res
+
def _row2dict(self, conn, row):
return dict(
uuid=row.uuid,
@@ -164,7 +174,8 @@ class WorkersConnectorComponent(base.DBConnectorComponent):
return dict(
uuid=row.uuid,
name=row.name,
- host_url=row.host_url,
+ docker_host_url=row.docker_host_url,
+ bin_host_url=row.bin_host_url,
enable=row.enable
)
def _row2dict_node_worker(self, conn, row):
diff --git a/sql/gentoo_ci_schema.sql b/sql/gentoo_ci_schema.sql
index ff81661..5956664 100644
--- a/sql/gentoo_ci_schema.sql
+++ b/sql/gentoo_ci_schema.sql
@@ -274,7 +274,8 @@ ALTER TABLE public.migrate_version OWNER TO buildbot;
CREATE TABLE public.nodes (
name character varying,
- host_url character varying,
+ docker_host_url character varying,
+ bin_host_url character varying,
enable boolean,
uuid character varying(36) NOT NULL
);