Commit 79c32592 authored by Peter Hutterer's avatar Peter Hutterer

Check for FDO_DISTRIBUTION_VERSION to be set correctly

If we're not using a custom suffix or a base image, the distribution version
must be set. Let's check for that.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 584867f9
Pipeline #261188 failed with stages
in 1 minute and 13 seconds
......@@ -30,7 +30,12 @@
- if [ x"$FDO_REPO_SUFFIX" == x"" ] ;
then
export FDO_REPO_SUFFIX={{distribution}}/$DISTRO_VERSION ;
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
export FDO_REPO_SUFFIX={{distribution}}/$DISTRO_VERSION ;
fi
- export BUILDAH_RUN="buildah run --isolation chroot"
......@@ -143,6 +148,11 @@
{% if image %}
BASE_IMAGE="{{image}}";
{% else %}
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
BASE_IMAGE="$DISTRO:$DISTRO_VERSION";
{% endif %}
fi
......
......@@ -25,7 +25,12 @@
- if [ x"$FDO_REPO_SUFFIX" == x"" ] ;
then
export FDO_REPO_SUFFIX=alpine/$DISTRO_VERSION ;
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
export FDO_REPO_SUFFIX=alpine/$DISTRO_VERSION ;
fi
- export BUILDAH_RUN="buildah run --isolation chroot"
......
......@@ -25,7 +25,12 @@
- if [ x"$FDO_REPO_SUFFIX" == x"" ] ;
then
export FDO_REPO_SUFFIX=arch/$DISTRO_VERSION ;
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
export FDO_REPO_SUFFIX=arch/$DISTRO_VERSION ;
fi
- export BUILDAH_RUN="buildah run --isolation chroot"
......
......@@ -24,7 +24,12 @@
- if [ x"$FDO_REPO_SUFFIX" == x"" ] ;
then
export FDO_REPO_SUFFIX=centos/$DISTRO_VERSION ;
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
export FDO_REPO_SUFFIX=centos/$DISTRO_VERSION ;
fi
- export BUILDAH_RUN="buildah run --isolation chroot"
......@@ -134,6 +139,11 @@
then
BASE_IMAGE="$FDO_BASE_IMAGE";
else
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
BASE_IMAGE="$DISTRO:$DISTRO_VERSION";
fi
- echo Building $FDO_REPO_SUFFIX:$DISTRO_TAG from $BASE_IMAGE
......
......@@ -24,7 +24,12 @@
- if [ x"$FDO_REPO_SUFFIX" == x"" ] ;
then
export FDO_REPO_SUFFIX=debian/$DISTRO_VERSION ;
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
export FDO_REPO_SUFFIX=debian/$DISTRO_VERSION ;
fi
- export BUILDAH_RUN="buildah run --isolation chroot"
......@@ -134,6 +139,11 @@
then
BASE_IMAGE="$FDO_BASE_IMAGE";
else
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
BASE_IMAGE="$DISTRO:$DISTRO_VERSION";
fi
- echo Building $FDO_REPO_SUFFIX:$DISTRO_TAG from $BASE_IMAGE
......
......@@ -24,7 +24,12 @@
- if [ x"$FDO_REPO_SUFFIX" == x"" ] ;
then
export FDO_REPO_SUFFIX=fedora/$DISTRO_VERSION ;
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
export FDO_REPO_SUFFIX=fedora/$DISTRO_VERSION ;
fi
- export BUILDAH_RUN="buildah run --isolation chroot"
......@@ -134,6 +139,11 @@
then
BASE_IMAGE="$FDO_BASE_IMAGE";
else
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
BASE_IMAGE="$DISTRO:$DISTRO_VERSION";
fi
- echo Building $FDO_REPO_SUFFIX:$DISTRO_TAG from $BASE_IMAGE
......
......@@ -24,7 +24,12 @@
- if [ x"$FDO_REPO_SUFFIX" == x"" ] ;
then
export FDO_REPO_SUFFIX=ubuntu/$DISTRO_VERSION ;
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
export FDO_REPO_SUFFIX=ubuntu/$DISTRO_VERSION ;
fi
- export BUILDAH_RUN="buildah run --isolation chroot"
......@@ -134,6 +139,11 @@
then
BASE_IMAGE="$FDO_BASE_IMAGE";
else
if [ x"$DISTRO_VERSION" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_VERSION is not set" ;
exit 1 ;
fi ;
BASE_IMAGE="$DISTRO:$DISTRO_VERSION";
fi
- echo Building $FDO_REPO_SUFFIX:$DISTRO_TAG from $BASE_IMAGE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment