Remove transactions from the koji staging-sync sql script.
This commit is contained in:
parent
2d7093cee5
commit
f3c857cc11
1 changed files with 0 additions and 11 deletions
|
@ -24,8 +24,6 @@
|
|||
-- [unset kojihub ServerOffline setting]
|
||||
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- bump sequences (not strictly needed anymore)
|
||||
select now() as time, 'bumping sequences' as msg;
|
||||
alter sequence task_id_seq restart with 90000000;
|
||||
|
@ -64,14 +62,10 @@ select now() as time, 'expiring repos' as msg;
|
|||
update repo set state = 3 where state in (0, 1, 2);
|
||||
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
||||
|
||||
-- add our staging builders, dynamically pulled from ansible inventory
|
||||
|
||||
{% for host in groups['buildvm-stg'] + groups['koji-stg'] %}
|
||||
BEGIN;
|
||||
select now() as time, 'adding staging host {{ host }}' as msg;
|
||||
insert into users (name, usertype, status) values ('{{ host }}', 1, 0);
|
||||
insert into host (user_id, name, arches) values (
|
||||
|
@ -80,11 +74,9 @@ insert into host (user_id, name, arches) values (
|
|||
insert into host_channels (host_id, channel_id) values (
|
||||
(select id from host where name='{{host}}'), (select id from channels where name='{{channel}}'));
|
||||
{% endfor %}
|
||||
COMMIT;
|
||||
{% endfor %}
|
||||
|
||||
{% for host in groups['arm-stg'] %}
|
||||
BEGIN;
|
||||
select now() as time, 'adding staging host {{ host }}' as msg;
|
||||
insert into users (name, usertype, status) values ('{{ host }}', 1, 0);
|
||||
insert into host (user_id, name, arches) values (
|
||||
|
@ -93,20 +85,17 @@ insert into host (user_id, name, arches) values (
|
|||
insert into host_channels (host_id, channel_id) values (
|
||||
(select id from host where name='{{host}}'), (select id from channels where name='{{channel}}'));
|
||||
{% endfor %}
|
||||
COMMIT;
|
||||
{% endfor %}
|
||||
|
||||
-- Add some people to be admins, only in staging. Feel free to grow this list..
|
||||
|
||||
{% for username in ['ralph', 'imcleod'] %}
|
||||
BEGIN;
|
||||
select now() as time, 'adding staging admin {{username}}' as msg;
|
||||
insert into user_perms (user_id, perm_id, active, creator_id) values (
|
||||
(select id from users where name='{{username}}'),
|
||||
(select id from permissions where name='admin'),
|
||||
True,
|
||||
(select id from users where name='{{username}}'));
|
||||
COMMIT;
|
||||
{% endfor %}
|
||||
|
||||
VACUUM ANALYZE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue