install dokku from built deb package and use docker image for integrations tests

This commit is contained in:
Michael Hobbs
2019-06-11 11:32:41 -07:00
committed by Jose Diaz-Gonzalez
parent 1f882d09bf
commit d8ada6a6e9
9 changed files with 102 additions and 89 deletions

9
contrib/dokku-docker-bin.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x && DOKKU_DOCKER_ENV="--env DOKKU_TRACE=on"
DOKKU_DOCKER_CONTAINER_NAME=${DOKKU_DOCKER_CONTAINER_NAME:=dokku}
# TODO: handle cases where we need a tty
DOCKER_CMD="docker exec $DOKKU_DOCKER_ENV -i $DOKKU_DOCKER_CONTAINER_NAME dokku $*"
exec "$DOCKER_CMD"

View File

@@ -319,6 +319,13 @@ fn-require-bin() {
fi
}
fn-build-docker-image() {
declare desc="Builds the dokku docker image and tags it with the given version"
declare VERSION="$1"
docker build -t "dokku/dokku:$VERSION" .
docker push "dokku/dokku:$VERSION"
}
main() {
declare RELEASE="$1"
local CURRENT_VERSION NEXT_VERSION IS_RELEASE
@@ -360,14 +367,14 @@ main() {
if [[ "$RELEASE" != "build" ]]; then
fn-publish-package "$IS_RELEASE" "deb" "build/dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
docker build -t "dokku/dokku:$NEXT_VERSION" .
docker push "dokku/dokku:$NEXT_VERSION"
fn-build-docker-image "$NEXT_VERSION" || log-fail "Error building docker image"
fn-repo-push-tags "$IS_RELEASE"
fi
if [[ "$IS_RELEASE" != "true" ]]; then
git reset -q HEAD plugins/*/plugin.toml
git checkout -- plugins/*/plugin.toml
cp "build/dokku_${NEXT_VERSION}_amd64.deb" build/dokku.deb
fi
echo "build/dokku_${NEXT_VERSION}_amd64.deb" >build/deb-filename