show migration head

This commit is contained in:
Antoine Legrand 2017-07-27 11:53:23 +02:00
parent 851686dd0b
commit 9fd455de28
3 changed files with 12 additions and 3 deletions

View file

@ -34,7 +34,7 @@ local jobs = {
// Update the base container
stage: stages.docker_base,
script: [
'docker build --cache-from quay.io/quay/quay-base:latest' +
'docker build --no-cache' +
' -t %s -f quay-base.dockerfile .' % images.base.name,
'docker push %s' % images.base.name,
],
@ -46,6 +46,10 @@ local jobs = {
stage: stages.docker_build,
script: [
'docker build -t %s -f Dockerfile .' % images.quayci.name,
'docker run --rm %s cat ALEMBIC_HEAD > /tmp/ALEMBIC_HEAD' % images.quayci.name,
'export MIGRATION_HEAD=`cat /tmp/ALEMBIC_HEAD | cut -d" " -f1`',
'echo $MIGRATION_HEAD',
'docker build --label db-schema-head=$MIGRATION_HEAD -t %s -f Dockerfile .' % images.quayci.name,
'docker push %s' % images.quayci.name],
},