forked from pool/obs-service-kiwi_metainfo_helper
Accepting request 1179158 from openSUSE:Tools
OBS-URL: https://build.opensuse.org/request/show/1179158 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-kiwi_metainfo_helper?expand=0&rev=17
This commit is contained in:
commit
c1780768d9
@ -16,8 +16,8 @@ if [ -e "${BUILD_DATA}" ]; then
|
||||
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
|
||||
RECIPEFILE="${RECIPEFILE##*:}"
|
||||
|
||||
if [ "${RECIPEFILE##*.}" != "kiwi" ] && [ "${RECIPEFILE}" != "Dockerfile" ] && [ "${RECIPEFILE}" != "Chart.yaml" ]; then
|
||||
echo "Recipe is neither Dockerfile, kiwi recipe nor helm chart - exiting"
|
||||
if [ "${RECIPEFILE##*.}" != "kiwi" ] && [[ ! "${RECIPEFILE}" =~ ^Dockerfile.* ]] && [ "${RECIPEFILE}" != "Chart.yaml" ]; then
|
||||
echo "Recipe ${RECIPEFILE} is neither Dockerfile, kiwi recipe nor helm chart - exiting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
42
test.sh
42
test.sh
@ -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/
|
||||
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
|
||||
rm -r ./.data ./repos/
|
||||
|
||||
@ -104,4 +144,4 @@ SOURCEURL=https://local/package/show/local/local?rev=local
|
||||
RELEASE=0
|
||||
BUILDTIME=2018-10-30T09:19:02.074934628Z
|
||||
ARCH=noarch
|
||||
EOF
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user