show migration head
This commit is contained in:
parent
851686dd0b
commit
9fd455de28
3 changed files with 12 additions and 3 deletions
|
@ -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],
|
||||
},
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ container-base-build:
|
|||
- master
|
||||
- tags
|
||||
script:
|
||||
- docker build --cache-from quay.io/quay/quay-base:latest -t quay.io/quay/quay-base:latest -f quay-base.dockerfile .
|
||||
- docker build --no-cache -t quay.io/quay/quay-base:latest -f quay-base.dockerfile .
|
||||
- docker push quay.io/quay/quay-base:latest
|
||||
stage: docker_base
|
||||
tags:
|
||||
|
@ -23,6 +23,10 @@ container-build:
|
|||
image: docker:git
|
||||
script:
|
||||
- docker build -t quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} -f Dockerfile .
|
||||
- docker run --rm quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} cat ALEMBIC_HEAD > /tmp/ALEMBIC_HEAD
|
||||
- export MIGRATION_HEAD=`cat /tmp/ALEMBIC_HEAD | cut -d" " -f1`
|
||||
- echo $MIGRATION_HEAD
|
||||
- docker build --label db-schema-head=$MIGRATION_HEAD -t quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} -f Dockerfile .
|
||||
- docker push quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
||||
stage: docker_build
|
||||
tags:
|
||||
|
|
|
@ -19,7 +19,8 @@ local utils = import "utils.libsonnet";
|
|||
name: utils.containerName(self.repo, self.tag),
|
||||
},
|
||||
|
||||
quayci: { repo: "quay.io/quay/quay-ci", tag: "${CI_COMMIT_REF_SLUG}",
|
||||
quayci: { repo: "quay.io/quay/quay-ci",
|
||||
tag: "${CI_COMMIT_REF_SLUG}",
|
||||
name: utils.containerName(self.repo, self.tag),
|
||||
},
|
||||
|
||||
|
|
Reference in a new issue