Add git commit to build schema
@@ -29,6 +29,7 @@ class BuildSchema(Schema):
allow_none=True)
git = fields.Str(allow_none=True)
nocache = fields.Boolean(allow_none=True)
+ commit = fields.Str(allow_none=True)
class Meta:
ordered = True
@@ -50,15 +51,16 @@ class BuildSchema(Schema):
class BuildConfig(BaseConfig):
SCHEMA = BuildSchema
IDENTIFIER = 'build'
- REDUCED_ATTRIBUTES = ['build_steps', 'env_vars', 'git', 'nocache']
+ REDUCED_ATTRIBUTES = ['build_steps', 'env_vars', 'git', 'nocache', 'commit']
- def __init__(self, image, build_steps=None, env_vars=None, git=None, nocache=None):
+ def __init__(self, image, build_steps=None, env_vars=None, git=None, nocache=None, commit=None):
validate_image(image)
self.image = image
self.build_steps = build_steps
self.env_vars = env_vars
self.git = git
self.nocache = nocache
+ self.commit = commit
@property
def image_tag(self):
