From 94f9e2a768327479c8b2da99cd57ac717cf1589a Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 27 Mar 2018 23:04:41 +0100 Subject: Add domains to backends, and rework build jobs Add a domain to the libvirt and AWS Terraform backends. Along the way, improve the backend controllers and views, and rework the build jobs, simplifying them in to a single new class GovukGuix::BuildJob, which uses configuration from the respective backend. --- .../20180327204244_add_domain_to_terraform_libvirt_backends.rb | 5 +++++ db/migrate/20180327204322_add_domain_to_terraform_aws_backends.rb | 5 +++++ db/schema.rb | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20180327204244_add_domain_to_terraform_libvirt_backends.rb create mode 100644 db/migrate/20180327204322_add_domain_to_terraform_aws_backends.rb (limited to 'db') diff --git a/db/migrate/20180327204244_add_domain_to_terraform_libvirt_backends.rb b/db/migrate/20180327204244_add_domain_to_terraform_libvirt_backends.rb new file mode 100644 index 0000000..5ef99d1 --- /dev/null +++ b/db/migrate/20180327204244_add_domain_to_terraform_libvirt_backends.rb @@ -0,0 +1,5 @@ +class AddDomainToTerraformLibvirtBackends < ActiveRecord::Migration[5.1] + def change + add_column :terraform_libvirt_backends, :domain, :string + end +end diff --git a/db/migrate/20180327204322_add_domain_to_terraform_aws_backends.rb b/db/migrate/20180327204322_add_domain_to_terraform_aws_backends.rb new file mode 100644 index 0000000..9eff4f7 --- /dev/null +++ b/db/migrate/20180327204322_add_domain_to_terraform_aws_backends.rb @@ -0,0 +1,5 @@ +class AddDomainToTerraformAwsBackends < ActiveRecord::Migration[5.1] + def change + add_column :terraform_aws_backends, :domain, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 5c53432..36f0983 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180326201857) do +ActiveRecord::Schema.define(version: 20180327204322) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -61,6 +61,7 @@ ActiveRecord::Schema.define(version: 20180326201857) do t.string "aws_secret_access_key" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "domain" end create_table "terraform_libvirt_backends", force: :cascade do |t| @@ -68,6 +69,7 @@ ActiveRecord::Schema.define(version: 20180326201857) do t.string "uri" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "domain" end create_table "terraform_states", force: :cascade do |t| -- cgit v1.2.3