aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-01-17 16:01:30 +0000
committerChristopher Baines <mail@cbaines.net>2021-01-17 16:01:30 +0000
commit984c0d8c80f72ffbb183ed39ce256b70d464682b (patch)
treef4e422802f27025239eae9c7fa4815e90086a87c /sqitch
parent87e4827be7c1370915930fb75850fdf89b30fb7b (diff)
downloadbuild-coordinator-984c0d8c80f72ffbb183ed39ce256b70d464682b.tar
build-coordinator-984c0d8c80f72ffbb183ed39ce256b70d464682b.tar.gz
Add tags for agents
This will allow doing things like restricting builds by matching up there tags to the tags of the agents.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/pg/deploy/add_agent_tags.sql7
-rw-r--r--sqitch/pg/revert/add_agent_tags.sql7
-rw-r--r--sqitch/pg/verify/add_agent_tags.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/sqlite/deploy/add_agent_tags.sql11
-rw-r--r--sqitch/sqlite/revert/add_agent_tags.sql7
-rw-r--r--sqitch/sqlite/verify/add_agent_tags.sql7
7 files changed, 47 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/add_agent_tags.sql b/sqitch/pg/deploy/add_agent_tags.sql
new file mode 100644
index 0000000..ad061a3
--- /dev/null
+++ b/sqitch/pg/deploy/add_agent_tags.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:add_agent_tags to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/add_agent_tags.sql b/sqitch/pg/revert/add_agent_tags.sql
new file mode 100644
index 0000000..1d6e34c
--- /dev/null
+++ b/sqitch/pg/revert/add_agent_tags.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:add_agent_tags from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/add_agent_tags.sql b/sqitch/pg/verify/add_agent_tags.sql
new file mode 100644
index 0000000..b374187
--- /dev/null
+++ b/sqitch/pg/verify/add_agent_tags.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:add_agent_tags on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 2240cc1..513609c 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -25,3 +25,4 @@ add_unbuilt_outputs_table 2020-11-06T18:58:08Z Christopher Baines <mail@cbaines.
support_build_cancelation 2020-12-11T18:25:42Z Christopher Baines <mail@cbaines.net> # Add builds.canceled
add_build_tags_build_id_idx 2020-12-21T13:20:54Z Christopher Baines <mail@cbaines.net> # Add an index on build_tags.build_id
add_builds_deferred_until 2020-12-26T19:26:32Z Christopher Baines <mail@cbaines.net> # Add builds.deferred_until
+add_agent_tags 2021-01-17T11:13:23Z Christopher Baines <mail@cbaines.net> # Add tags for agents
diff --git a/sqitch/sqlite/deploy/add_agent_tags.sql b/sqitch/sqlite/deploy/add_agent_tags.sql
new file mode 100644
index 0000000..d1efbe1
--- /dev/null
+++ b/sqitch/sqlite/deploy/add_agent_tags.sql
@@ -0,0 +1,11 @@
+-- Deploy guix-build-coordinator:add_agent_tags to sqlite
+
+BEGIN;
+
+CREATE TABLE agent_tags (
+ agent_id TEXT NOT NULL REFERENCES agents (id),
+ tag_id INTEGER NOT NULL REFERENCES tags (id),
+ PRIMARY KEY (agent_id, tag_id)
+);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/add_agent_tags.sql b/sqitch/sqlite/revert/add_agent_tags.sql
new file mode 100644
index 0000000..f9891f6
--- /dev/null
+++ b/sqitch/sqlite/revert/add_agent_tags.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:add_agent_tags from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/add_agent_tags.sql b/sqitch/sqlite/verify/add_agent_tags.sql
new file mode 100644
index 0000000..27bd13a
--- /dev/null
+++ b/sqitch/sqlite/verify/add_agent_tags.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:add_agent_tags on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;