#!/bin/bash

set -o errexit
set -o pipefail

export SUITES='jessie stretch buster bullseye'
export REPO='balenalib/rpi-raspbian'
LATEST='buster'
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
date=$(date +'%Y%m%d' -u)

bash "$dir/build-image.sh"
for suite in $SUITES; do

	docker tag $REPO:$suite $REPO:$suite-$date
	docker push $REPO:$suite
	docker push $REPO:$suite-$date

	if [ $LATEST == $suite ]; then
		docker tag $REPO:$suite $REPO:latest
		docker push $REPO:latest
	fi
done

# Clean up unnecessarry docker images after pushing
if [ $? -eq 0 ]; then
	for suite in $SUITES; do
		docker rmi -f $REPO:$suite
		docker rmi -f $REPO:$suite-$date
		docker rmi -f $REPO:latest || true
	done
fi

#!/bin/bash

set -o errexit
set -o pipefail

export SUITES='stretch buster bullseye'
export REPO='balenalib/rpi-raspbian'
LATEST='buster'
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
date=$(date +'%Y%m%d' -u)

bash "$dir/build-image.sh"
for suite in $SUITES; do

	docker tag $REPO:$suite $REPO:$suite-$date
	docker push $REPO:$suite
	docker push $REPO:$suite-$date

	if [ $LATEST == $suite ]; then
		docker tag $REPO:$suite $REPO:latest
		docker push $REPO:latest
	fi
done

# Clean up unnecessarry docker images after pushing
if [ $? -eq 0 ]; then
	for suite in $SUITES; do
		docker rmi -f $REPO:$suite
		docker rmi -f $REPO:$suite-$date
		docker rmi -f $REPO:latest || true
	done
fi

Remove Jessie from suite list
Remove Jessie from suite list

As release file for Debian Jessie is no longer available in raspbian repository

Change-type: patch
Signed-off-by: Trong Nghia Nguyen <8e1f45cdcce8e4aef30b6ef5f5ba85d3ec052bb0@gmail.com>
