Merge ~pappacena/launchpad:db-ocirecipe-args into launchpad:db-devel

Proposed by Thiago F. Pappacena
Status: Merged
Approved by: Thiago F. Pappacena
Approved revision: e9eef429b33b1b0ece6c90188b4c9053b59ce822
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pappacena/launchpad:db-ocirecipe-args
Merge into: launchpad:db-devel
Diff against target: 16 lines (+10/-0)
1 file modified
database/schema/patch-2210-20-1.sql (+10/-0)
Reviewer Review Type Date Requested Status
William Grant db Approve
Colin Watson (community) db Approve
Review via email: mp+389748@code.launchpad.net

Commit message

Database changes to support build ARG parameters when building OCI recipes

Description of the change

This field will be mapped on OCIRecipe.build_args as a JSON field. It should be an uni-dimensional dict with the arguments that ultimately will be used to add `--build-arg VARIABLE=value` to `docker build` command on the builders.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Other than the comment, OK by me, but I think we're still generally preferring to get second DB reviews from William so I'm adding him as a reviewer as well.

review: Approve (db)
e9eef42... by Thiago F. Pappacena

Changing json field datatype to jsonb instead of text

Revision history for this message
William Grant (wgrant) :
review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2210-20-1.sql b/database/schema/patch-2210-20-1.sql
2new file mode 100644
3index 0000000..83d5615
4--- /dev/null
5+++ b/database/schema/patch-2210-20-1.sql
6@@ -0,0 +1,10 @@
7+-- Copyright 2020 Canonical Ltd. This software is licensed under the
8+-- GNU Affero General Public License version 3 (see the file LICENSE).
9+
10+SET client_min_messages=ERROR;
11+
12+ALTER TABLE OCIRecipe ADD COLUMN build_args jsonb;
13+
14+COMMENT ON COLUMN OCIRecipe.build_args IS 'ARGs to be used when building the OCI Recipe.';
15+
16+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 20, 1);