Skip to content

Commit

Permalink
push migrate app as part of airbyte core (airbytehq#1748)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgardens authored Jan 21, 2021
1 parent edfb160 commit 6fc99a8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 15 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ TRACKING_STRATEGY=segment
# already exist on the host filesystem and MUST be parents of *_ROOT.
# Issue: https://github.com/airbytehq/airbyte/issues/577
HACK_LOCAL_ROOT_PARENT=/tmp
BUILD_TAG=dev
1 change: 0 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ TRACKING_STRATEGY=logging
# already exist on the host filesystem and MUST be parents of *_ROOT.
# Issue: https://github.com/airbytehq/airbyte/issues/577
HACK_LOCAL_ROOT_PARENT=/tmp
BUILD_TAG=dev
3 changes: 0 additions & 3 deletions airbyte-migration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ RUN tar xf ${APPLICATION}.tar --strip-components=1

# wait for upstream dependencies to become available before starting server
ENTRYPOINT ["/bin/bash", "-c", "bin/${APPLICATION} $@"]

LABEL io.airbyte.version=0.1.0
LABEL io.airbyte.name=airbyte/migration
1 change: 0 additions & 1 deletion airbyte-migration/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'application'
id 'airbyte-docker'
}

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ allprojects {
def composeDeps = [
"airbyte-config:init",
"airbyte-db",
"airbyte-migration",
"airbyte-scheduler",
"airbyte-server",
"airbyte-webapp",
Expand Down Expand Up @@ -202,7 +203,7 @@ task composeBuild {
exec {
workingDir rootDir
commandLine 'docker-compose', '-f', 'docker-compose.build.yaml', 'build', '--parallel', '--quiet'
environment 'BUILD_TAG', buildTag
environment 'VERSION', buildTag
}
}
}
Expand Down
19 changes: 13 additions & 6 deletions docker-compose.build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,51 @@ version: "3.7"

services:
init:
image: airbyte/init:${BUILD_TAG}
image: airbyte/init:${VERSION}
build:
dockerfile: Dockerfile
context: airbyte-config/init
labels:
io.airbyte.git-revision: ${GIT_REVISION}
db:
image: airbyte/db:${BUILD_TAG}
image: airbyte/db:${VERSION}
build:
dockerfile: Dockerfile
context: airbyte-db
labels:
io.airbyte.git-revision: ${GIT_REVISION}
seed:
image: airbyte/seed:${BUILD_TAG}
image: airbyte/seed:${VERSION}
build:
dockerfile: Dockerfile
context: airbyte-config/init
labels:
io.airbyte.git-revision: ${GIT_REVISION}
scheduler:
image: airbyte/scheduler:${BUILD_TAG}
image: airbyte/scheduler:${VERSION}
build:
dockerfile: Dockerfile
context: airbyte-scheduler
labels:
io.airbyte.git-revision: ${GIT_REVISION}
server:
image: airbyte/server:${BUILD_TAG}
image: airbyte/server:${VERSION}
build:
dockerfile: Dockerfile
context: airbyte-server
labels:
io.airbyte.git-revision: ${GIT_REVISION}
webapp:
image: airbyte/webapp:${BUILD_TAG}
image: airbyte/webapp:${VERSION}
build:
dockerfile: Dockerfile
context: airbyte-webapp
labels:
io.airbyte.git-revision: ${GIT_REVISION}
migration:
image: airbyte/migration:${VERSION}
build:
dockerfile: Dockerfile
context: airbyte-migration
labels:
io.airbyte.git-revision: ${GIT_REVISION}
8 changes: 6 additions & 2 deletions tools/bin/release_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ GIT_REVISION=$(git rev-parse HEAD)
[[ -z "$GIT_REVISION" ]] && echo "Couldn't get the git revision..." && exit 1

echo "Building and publishing version $VERSION for git revision $GIT_REVISION..."

ENV_VERSION=$(grep VERSION .env | xargs)
ENV_VERSION=${ENV_VERSION#*=}

./gradlew clean composeBuild
GIT_REVISION=$GIT_REVISION docker-compose -f docker-compose.build.yaml -f docker-compose.yaml build
GIT_REVISION=$GIT_REVISION docker-compose -f docker-compose.build.yaml -f docker-compose.yaml push
VERSION=$ENV_VERSION GIT_REVISION=$GIT_REVISION docker-compose -f docker-compose.build.yaml build
VERSION=$ENV_VERSION GIT_REVISION=$GIT_REVISION docker-compose -f docker-compose.build.yaml push
echo "Completed building and publishing..."

echo "Final Steps:"
Expand Down

0 comments on commit 6fc99a8

Please sign in to comment.