1
0
Ana Guerrero 2024-06-07 13:01:57 +00:00 committed by Git OBS Bridge
commit c1780768d9
3 changed files with 48 additions and 3 deletions

View File

@ -16,8 +16,8 @@ if [ -e "${BUILD_DATA}" ]; then
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data # The build script renames the recipe (to strip _service:foo:), but doesn't update .data
RECIPEFILE="${RECIPEFILE##*:}" RECIPEFILE="${RECIPEFILE##*:}"
if [ "${RECIPEFILE##*.}" != "kiwi" ] && [ "${RECIPEFILE}" != "Dockerfile" ] && [ "${RECIPEFILE}" != "Chart.yaml" ]; then if [ "${RECIPEFILE##*.}" != "kiwi" ] && [[ ! "${RECIPEFILE}" =~ ^Dockerfile.* ]] && [ "${RECIPEFILE}" != "Chart.yaml" ]; then
echo "Recipe is neither Dockerfile, kiwi recipe nor helm chart - exiting" echo "Recipe ${RECIPEFILE} is neither Dockerfile, kiwi recipe nor helm chart - exiting"
exit 0 exit 0
fi fi

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 7 08:35:33 UTC 2024 - Andrea Mazzotti <andrea.mazzotti@suse.com>
- Support Docker.FLAVOR in _multibuild (boo#1226010)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 1 15:54:12 UTC 2024 - Marina Latini <marina.latini@suse.com> Thu Feb 1 15:54:12 UTC 2024 - Marina Latini <marina.latini@suse.com>

40
test.sh
View File

@ -85,6 +85,46 @@ DISTURL=obs://build.suse.de/SUSE:SLE-15-SP3:Update:CR/images/5f0a221b7877396cbf9
SOURCEURL=https://sources.suse.com/SUSE:SLE-15-SP3:Update:CR/sles15-image/5f0a221b7877396cbf977205e64690d2/ SOURCEURL=https://sources.suse.com/SUSE:SLE-15-SP3:Update:CR/sles15-image/5f0a221b7877396cbf977205e64690d2/
EOF EOF
# Test _multibuild
cat >.data <<EOF
DISTURL="obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e512949b6bca09-opensuse-tumbleweed-image:docker"
RELEASE=4.2
RELEASE=4.2
RECIPEFILE=_service:foobar:Dockerfile.FLAVOR
BUILD_ARCH=aarch64:aarch64_ilp32:armv8l
EOF
export BUILD_DIST=.dist
cat >Dockerfile.FLAVOR <<EOF
RELEASE=%RELEASE%
EOF
bash "${script}"
diff -u Dockerfile.FLAVOR - <<EOF
RELEASE=4.2
EOF
# Test _multibuild when not a Dockerfile
cat >.data <<EOF
DISTURL="obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e512949b6bca09-opensuse-tumbleweed-image:docker"
RELEASE=4.2
RELEASE=4.2
RECIPEFILE=_service:foobar:NotADockerfile
BUILD_ARCH=aarch64:aarch64_ilp32:armv8l
EOF
export BUILD_DIST=.dist
cat >NotADockerfile <<EOF
RELEASE=%RELEASE%
EOF
bash "${script}"
diff -u NotADockerfile - <<EOF
RELEASE=%RELEASE%
EOF
# Now test without build data (osc chroot build) and that without %OS_*% it doesn't need a release RPM # Now test without build data (osc chroot build) and that without %OS_*% it doesn't need a release RPM
rm -r ./.data ./repos/ rm -r ./.data ./repos/