Add quay releases

This commit is contained in:
Silas Sewell 2015-09-16 11:44:58 -04:00
parent 666907f03e
commit 386c017d99
9 changed files with 174 additions and 3 deletions

26
release.py Normal file
View file

@ -0,0 +1,26 @@
import os
_GIT_HEAD_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'GIT_HEAD')
SERVICE = 'quay'
GIT_HEAD = None
REGION = os.environ.get('QUAY_REGION')
# Load git head if available
if os.path.isfile(_GIT_HEAD_PATH):
with open(_GIT_HEAD_PATH) as f:
GIT_HEAD = f.read().strip()
def main():
from app import app
from data.model.release import set_region_release
if REGION and GIT_HEAD:
set_region_release(SERVICE, REGION, GIT_HEAD)
if __name__ == '__main__':
main()