Made builder root again
All checks were successful
continuous-integration/drone the build was successful

This commit is contained in:
Jef Roosens 2021-04-24 09:47:28 +02:00
parent 0abfaca967
commit 3bdf79e824
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
2 changed files with 15 additions and 18 deletions

23
fejctl
View file

@ -18,16 +18,6 @@ function dc() {
done
shift $((OPTIND-1))
if [[ "$build_builder" -eq 1 ]]; then
# We always rebuild the builder before we run any compose command
DOCKER_BUILDKIT=1 docker build \
-f docker/Dockerfile.builder \
-t "$image-builder:latest" . || {
>&2 echo "Failed to build builder.";
exit 1;
}
fi
if [[ "$release" -eq 1 ]]; then
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose \
--file docker/docker-compose.yml \
@ -53,6 +43,18 @@ function dcr() {
--detach
}
# Publish the builder image
function publish_builder() {
DOCKER_BUILDKIT=1 docker build \
-f docker/Dockerfile.builder \
-t "$image-builder:latest" . || {
>&2 echo "Failed to build builder.";
exit 1;
}
docker push "$image-builder:latest"
}
# Tags & pushes the release version to Docker Hub
function publish() {
local branch=`git rev-parse --abbrev-ref HEAD`
@ -113,6 +115,7 @@ function main() {
l | logs ) dc -- logs -f app ;;
lint ) cargo fmt -- --check ;;
p | push | publish ) publish ;;
pb ) publish_builder ;;
t | test ) dcr -- test --no-fail-fast && dc -- logs -f app ;;
* ) >&2 echo "Invalid command."; exit 1 ;;
esac