mirror of https://github.com/openwrt/docker.git
add OpenWrt branch as tag
this simplifies the CI testing Signed-off-by: Paul Spooren <mail@aparcar.org>pull/77/head
parent
a4d29eeb6d
commit
bc917bfb33
|
|
@ -13,8 +13,7 @@ if [ -n "$ARCH" ]; then
|
|||
fi
|
||||
|
||||
if [ "$VERSION" == "snapshot" ]; then
|
||||
# backwards compatibility. New setups should use snapshot instead
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" "$DOCKER_IMAGE:$TARGET-master"
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" "$DOCKER_IMAGE:$TARGET-$BRANCH"
|
||||
|
||||
if [ -n "$ARCH" ]; then
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" "$DOCKER_IMAGE:$ARCH"
|
||||
|
|
@ -22,9 +21,7 @@ if [ "$VERSION" == "snapshot" ]; then
|
|||
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" "$DOCKER_IMAGE:$TARGET"
|
||||
|
||||
if [ "$TARGET" == "x86-64" ]; then
|
||||
# backwards compatibility. New setups should use snapshot instead
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" "$DOCKER_IMAGE:master"
|
||||
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" "$DOCKER_IMAGE:$BRANCH"
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" "$DOCKER_IMAGE:latest"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@ export VERSION="${VERSION:-snapshot}"
|
|||
export DOCKER_IMAGE="${DOCKER_IMAGE:-openwrt-imagebuilder}"
|
||||
export DOWNLOAD_FILE="openwrt-imagebuilder*x86_64.tar.xz"
|
||||
|
||||
if [ "$VERSION" = "snapshot" ]; then
|
||||
export BRANCH="master"
|
||||
else
|
||||
export BRANCH="openwrt-${VERSION%.*}"
|
||||
fi
|
||||
|
||||
if [ "$VERSION" == "snapshot" ]; then
|
||||
DOWNLOAD_PATH="snapshots/targets/$(echo "$TARGET" | tr '-' '/')"
|
||||
else
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@ export DOCKER_IMAGE="${DOCKER_IMAGE:-openwrt-rootfs}"
|
|||
export DOWNLOAD_FILE="openwrt-*-rootfs.tar.gz"
|
||||
export DOCKERFILE="Dockerfile.rootfs"
|
||||
|
||||
if [ "$VERSION" = "snapshot" ]; then
|
||||
export BRANCH="master"
|
||||
else
|
||||
export BRANCH="openwrt-${VERSION%.*}"
|
||||
fi
|
||||
|
||||
if [ "$VERSION" = "snapshot" ]; then
|
||||
DOWNLOAD_PATH="snapshots/targets/$(echo "$TARGET" | tr '-' '/')"
|
||||
else
|
||||
|
|
|
|||
|
|
@ -12,6 +12,12 @@ export VERSION="${VERSION:-snapshot}"
|
|||
export DOCKER_IMAGE="${DOCKER_IMAGE:-openwrt-sdk}"
|
||||
export DOWNLOAD_FILE="openwrt-sdk-*.Linux-x86_64.tar.xz"
|
||||
|
||||
if [ "$VERSION" = "snapshot" ]; then
|
||||
export BRANCH="master"
|
||||
else
|
||||
export BRANCH="openwrt-${VERSION%.*}"
|
||||
fi
|
||||
|
||||
if [ "$VERSION" == "snapshot" ]; then
|
||||
DOWNLOAD_PATH="snapshots/targets/$(echo "$TARGET" | tr '-' '/')"
|
||||
else
|
||||
|
|
@ -30,14 +36,11 @@ cp "$DOCKERFILE" ./build/
|
|||
docker build -t "$DOCKER_IMAGE:$ARCH-$VERSION" -f "./build/$DOCKERFILE" ./build
|
||||
|
||||
if [ "$VERSION" == "snapshot" ]; then
|
||||
# backwards compatibility. New setups should use snapshot instead
|
||||
docker tag "$DOCKER_IMAGE:$ARCH-$VERSION" "$DOCKER_IMAGE:$ARCH-master"
|
||||
docker tag "$DOCKER_IMAGE:$ARCH-$VERSION" "$DOCKER_IMAGE:$ARCH-$BRANCH"
|
||||
|
||||
docker tag "$DOCKER_IMAGE:$ARCH-$VERSION" "$DOCKER_IMAGE:$ARCH"
|
||||
if [ "$ARCH" == "x86_64" ]; then
|
||||
# backwards compatibility. New setups should use snapshot instead
|
||||
docker tag "$DOCKER_IMAGE:$ARCH-$VERSION" "$DOCKER_IMAGE:master"
|
||||
|
||||
docker tag "$DOCKER_IMAGE:$ARCH-$VERSION" "$DOCKER_IMAGE:$BRANCH"
|
||||
docker tag "$DOCKER_IMAGE:$ARCH-$VERSION" "$DOCKER_IMAGE:latest"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ gen_targets_sdk() {
|
|||
deploy-sdk_$ARCH:
|
||||
extends: .deploy-sdk
|
||||
variables:
|
||||
BRANCH: \"$BRANCH\"
|
||||
VERSION: \"$VERSION\"
|
||||
TARGETS: \"$TARGETS\""
|
||||
done
|
||||
|
|
@ -29,6 +30,7 @@ gen_targets_imagebuilder() {
|
|||
deploy-imagebuilder_$TARGET:
|
||||
extends: .deploy-imagebuilder
|
||||
variables:
|
||||
BRANCH: \"$BRANCH\"
|
||||
VERSION: \"$VERSION\""
|
||||
done
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue