diff --git a/old_build b/old_build deleted file mode 100755 index 0fc3669..0000000 --- a/old_build +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -eu - -# cd to location of script -cd "$(dirname "$(realpath "$0")")" - -# Builds the docker images. -# Usage: ./build {COMPONENTS}, or just ./build to build all. -# The resulting images are named wubloader-COMPONENT. -# Pass PUSH=true to also push the resulting images, or PUSH=latest to push them as :latest tag - -# The different images we can build -COMPONENTS=(downloader restreamer backfiller thrimshim cutter sheetsync nginx postgres segment_coverage playlist_manager chat_archiver graphs) - -# Define push if not already defined -PUSH=${PUSH:-} - -# Base is the repository namespace information, not including the wubloader-component part. -BASE="ghcr.io/dbvideostriketeam" - -# The docker image tag, derived from the git commit + whether working tree is clean -TAG=$(./get-build-tag) - -if [ "$#" -gt 0 ]; then - COMPONENTS=("$@") -fi - -for component in "${COMPONENTS[@]}"; do - echo "Building image for $component" - latest="$BASE/wubloader-$component:latest" - specific="$BASE/wubloader-$component:$TAG" - docker build \ - -f "$component/Dockerfile" \ - -t "$latest" \ - -t "$specific" \ - . - echo "Built image wubloader-$component:$TAG" - if [ -n "$PUSH" ]; then - echo "Pushing tag $specific" - docker push "$specific" - fi - if [ "$PUSH" == "latest" ]; then - echo "Pushing tag $latest" - docker push "$latest" - fi -done