* [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/config/, buildbot_gentoo_ci/db/, sql/
@ 2023-02-03 22:21 Magnus Granberg
0 siblings, 0 replies; only message in thread
From: Magnus Granberg @ 2023-02-03 22:21 UTC (permalink / raw
To: gentoo-commits
commit: 102c51d88be07b23cd24d4cad6fad5e71edacb4c
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 3 22:21:42 2023 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Fri Feb 3 22:21:42 2023 +0000
URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=102c51d8
Add support for binhost on docker image build
Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>
buildbot_gentoo_ci/config/workers.py | 2 +-
buildbot_gentoo_ci/db/model.py | 3 ++-
buildbot_gentoo_ci/db/workers.py | 13 ++++++++++++-
sql/gentoo_ci_schema.sql | 3 ++-
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
);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-03 22:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-03 22:21 [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/config/, buildbot_gentoo_ci/db/, sql/ Magnus Granberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox