mirror of https://github.com/openwrt/docker.git
switch $TYPE logic to work during tests
THe recent changes were a bit short-sighted, not putting into consideration all labels and different behaviour during testing. This final commit should fix building for all versions, be it snapshot, a release snapshot or a regular point release. Signed-off-by: Paul Spooren <mail@aparcar.org>pull/79/head
parent
9d87aec468
commit
f7a375b9dc
|
@ -5,7 +5,8 @@ build-imagebuilder_x86-64:
|
||||||
script: |
|
script: |
|
||||||
bash docker-imagebuilder.sh
|
bash docker-imagebuilder.sh
|
||||||
TARGET=$(echo "$CI_JOB_NAME" | cut -d _ -f 2-)
|
TARGET=$(echo "$CI_JOB_NAME" | cut -d _ -f 2-)
|
||||||
docker tag "$DOCKER_IMAGE:$TARGET" \
|
VERSION="${VERSION:-snapshot}"
|
||||||
|
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" \
|
||||||
"$DOCKER_IMAGE:imagebuilder-$TARGET-$CI_COMMIT_REF_SLUG"
|
"$DOCKER_IMAGE:imagebuilder-$TARGET-$CI_COMMIT_REF_SLUG"
|
||||||
docker push "$DOCKER_IMAGE:imagebuilder-$TARGET-$CI_COMMIT_REF_SLUG"
|
docker push "$DOCKER_IMAGE:imagebuilder-$TARGET-$CI_COMMIT_REF_SLUG"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
build-rootfs_x86-64:
|
build-rootfs_x86-64:
|
||||||
extends: .build
|
extends: .build
|
||||||
except:
|
except:
|
||||||
|
@ -9,7 +8,8 @@ build-rootfs_x86-64:
|
||||||
script: |
|
script: |
|
||||||
bash docker-rootfs.sh
|
bash docker-rootfs.sh
|
||||||
TARGET=$(echo "$CI_JOB_NAME" | cut -d _ -f 2-)
|
TARGET=$(echo "$CI_JOB_NAME" | cut -d _ -f 2-)
|
||||||
docker tag "$DOCKER_IMAGE:$TARGET" \
|
VERSION="${VERSION:-snapshot}"
|
||||||
|
docker tag "$DOCKER_IMAGE:$TARGET-$VERSION" \
|
||||||
"$DOCKER_IMAGE:rootfs-$TARGET-$CI_COMMIT_REF_SLUG"
|
"$DOCKER_IMAGE:rootfs-$TARGET-$CI_COMMIT_REF_SLUG"
|
||||||
docker push "$DOCKER_IMAGE:rootfs-$TARGET-$CI_COMMIT_REF_SLUG"
|
docker push "$DOCKER_IMAGE:rootfs-$TARGET-$CI_COMMIT_REF_SLUG"
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
rootfs_x86-64:
|
deploy-rootfs_x86-64:
|
||||||
extends: .deploy-rootfs
|
extends: .deploy-rootfs
|
||||||
variables:
|
variables:
|
||||||
ARCH: x86_64
|
ARCH: x86_64
|
||||||
|
|
||||||
rootfs_x86-generic:
|
deploy-rootfs_x86-generic:
|
||||||
extends: .deploy-rootfs
|
extends: .deploy-rootfs
|
||||||
variables:
|
variables:
|
||||||
ARCH: i386_pentium4
|
ARCH: i386_pentium4
|
||||||
|
|
||||||
rootfs_x86-geode:
|
deploy-rootfs_x86-geode:
|
||||||
extends: .deploy-rootfs
|
extends: .deploy-rootfs
|
||||||
variables:
|
variables:
|
||||||
ARCH: i386_pentium-mmx
|
ARCH: i386_pentium-mmx
|
||||||
|
|
||||||
rootfs_armvirt-32:
|
deploy-rootfs_armvirt-32:
|
||||||
extends: .deploy-rootfs
|
extends: .deploy-rootfs
|
||||||
variables:
|
variables:
|
||||||
ARCH: arm_cortex-a15_neon-vfpv4
|
ARCH: arm_cortex-a15_neon-vfpv4
|
||||||
|
|
||||||
rootfs_armvirt-64:
|
deploy-rootfs_armvirt-64:
|
||||||
extends: .deploy-rootfs
|
extends: .deploy-rootfs
|
||||||
variables:
|
variables:
|
||||||
ARCH: aarch64_cortex-a53
|
ARCH: aarch64_cortex-a53
|
||||||
|
|
||||||
rootfs_malta-be:
|
deploy-rootfs_malta-be:
|
||||||
extends: .deploy-rootfs
|
extends: .deploy-rootfs
|
||||||
variables:
|
variables:
|
||||||
ARCH: mips_24kc
|
ARCH: mips_24kc
|
||||||
|
|
|
@ -7,7 +7,7 @@ export_variables() {
|
||||||
export JOB
|
export JOB
|
||||||
TARGET="${TARGET:-$JOB}"
|
TARGET="${TARGET:-$JOB}"
|
||||||
export TARGET
|
export TARGET
|
||||||
TYPE=$(echo "$CI_JOB_NAME" | cut -d _ -f 1)
|
TYPE=$(echo "$CI_JOB_NAME" | cut -d _ -f 1 | cut -d - -f 2)
|
||||||
export TYPE
|
export TYPE
|
||||||
export VERSION="${VERSION:-snapshot}"
|
export VERSION="${VERSION:-snapshot}"
|
||||||
export DOCKERFILE="${DOCKERFILE:-Dockerfile}"
|
export DOCKERFILE="${DOCKERFILE:-Dockerfile}"
|
||||||
|
|
|
@ -12,7 +12,7 @@ gen_targets_sdk() {
|
||||||
ARCH=$(echo "$LINE" | cut -d ' ' -f 1)
|
ARCH=$(echo "$LINE" | cut -d ' ' -f 1)
|
||||||
TARGETS=$(echo "$LINE" | cut -d ' ' -f 2-)
|
TARGETS=$(echo "$LINE" | cut -d ' ' -f 2-)
|
||||||
echo "
|
echo "
|
||||||
sdk_$ARCH:
|
deploy-sdk_$ARCH:
|
||||||
extends: .deploy-sdk
|
extends: .deploy-sdk
|
||||||
variables:
|
variables:
|
||||||
TARGETS: \"$TARGETS\""
|
TARGETS: \"$TARGETS\""
|
||||||
|
@ -23,7 +23,7 @@ gen_targets_imagebuilder() {
|
||||||
perl ./scripts/dump-target-info.pl targets | while read -r LINE; do
|
perl ./scripts/dump-target-info.pl targets | while read -r LINE; do
|
||||||
TARGET=$(echo "$LINE" | cut -d ' ' -f 1 | tr '/' '-')
|
TARGET=$(echo "$LINE" | cut -d ' ' -f 1 | tr '/' '-')
|
||||||
echo "
|
echo "
|
||||||
imagebuilder_$TARGET:
|
deploy-imagebuilder_$TARGET:
|
||||||
extends: .deploy-imagebuilder"
|
extends: .deploy-imagebuilder"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue