Commit 584867f9 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

Check the FDO_DISTRIBUTION_TAG when including the variables



This is the one variables we need in every template, so let's check for it in
the place where we expand it.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 6f86b8bc
......@@ -15,6 +15,12 @@
is a read-only variable #}
- export DISTRO={{distribution}}
- if [ x"$FDO_DISTRIBUTION_TAG" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_TAG is not set" ;
exit 1 ;
fi
- export DISTRO_TAG=$FDO_DISTRIBUTION_TAG
{% if fixed_version %}
- export FDO_DISTRIBUTION_VERSION="{{versions[0]}}"
......@@ -128,12 +134,6 @@
- skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- *fdo_distro_vars
- if [[ x"$DISTRO_TAG" == x"" ]] ;
then
echo $DISTRO tag missing;
exit 1;
fi
- *fdo_distro_exists
- if [[ x"$FDO_BASE_IMAGE" != x"" ]] ;
......
......@@ -12,6 +12,12 @@
- export DISTRO=alpine
- if [ x"$FDO_DISTRIBUTION_TAG" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_TAG is not set" ;
exit 1 ;
fi
- export DISTRO_TAG=$FDO_DISTRIBUTION_TAG
- export FDO_DISTRIBUTION_VERSION="latest"
- export DISTRO_VERSION="$FDO_DISTRIBUTION_VERSION"
......@@ -123,12 +129,6 @@
- skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- *fdo_distro_vars
- if [[ x"$DISTRO_TAG" == x"" ]] ;
then
echo $DISTRO tag missing;
exit 1;
fi
- *fdo_distro_exists
- if [[ x"$FDO_BASE_IMAGE" != x"" ]] ;
......
......@@ -12,6 +12,12 @@
- export DISTRO=arch
- if [ x"$FDO_DISTRIBUTION_TAG" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_TAG is not set" ;
exit 1 ;
fi
- export DISTRO_TAG=$FDO_DISTRIBUTION_TAG
- export FDO_DISTRIBUTION_VERSION="rolling"
- export DISTRO_VERSION="$FDO_DISTRIBUTION_VERSION"
......@@ -123,12 +129,6 @@
- skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- *fdo_distro_vars
- if [[ x"$DISTRO_TAG" == x"" ]] ;
then
echo $DISTRO tag missing;
exit 1;
fi
- *fdo_distro_exists
- if [[ x"$FDO_BASE_IMAGE" != x"" ]] ;
......
......@@ -12,6 +12,12 @@
- export DISTRO=centos
- if [ x"$FDO_DISTRIBUTION_TAG" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_TAG is not set" ;
exit 1 ;
fi
- export DISTRO_TAG=$FDO_DISTRIBUTION_TAG
- export DISTRO_VERSION="$FDO_DISTRIBUTION_VERSION"
- export DISTRO_EXEC=$FDO_DISTRIBUTION_EXEC
......@@ -122,12 +128,6 @@
- skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- *fdo_distro_vars
- if [[ x"$DISTRO_TAG" == x"" ]] ;
then
echo $DISTRO tag missing;
exit 1;
fi
- *fdo_distro_exists
- if [[ x"$FDO_BASE_IMAGE" != x"" ]] ;
......
......@@ -12,6 +12,12 @@
- export DISTRO=debian
- if [ x"$FDO_DISTRIBUTION_TAG" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_TAG is not set" ;
exit 1 ;
fi
- export DISTRO_TAG=$FDO_DISTRIBUTION_TAG
- export DISTRO_VERSION="$FDO_DISTRIBUTION_VERSION"
- export DISTRO_EXEC=$FDO_DISTRIBUTION_EXEC
......@@ -122,12 +128,6 @@
- skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- *fdo_distro_vars
- if [[ x"$DISTRO_TAG" == x"" ]] ;
then
echo $DISTRO tag missing;
exit 1;
fi
- *fdo_distro_exists
- if [[ x"$FDO_BASE_IMAGE" != x"" ]] ;
......
......@@ -12,6 +12,12 @@
- export DISTRO=fedora
- if [ x"$FDO_DISTRIBUTION_TAG" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_TAG is not set" ;
exit 1 ;
fi
- export DISTRO_TAG=$FDO_DISTRIBUTION_TAG
- export DISTRO_VERSION="$FDO_DISTRIBUTION_VERSION"
- export DISTRO_EXEC=$FDO_DISTRIBUTION_EXEC
......@@ -122,12 +128,6 @@
- skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- *fdo_distro_vars
- if [[ x"$DISTRO_TAG" == x"" ]] ;
then
echo $DISTRO tag missing;
exit 1;
fi
- *fdo_distro_exists
- if [[ x"$FDO_BASE_IMAGE" != x"" ]] ;
......
......@@ -12,6 +12,12 @@
- export DISTRO=ubuntu
- if [ x"$FDO_DISTRIBUTION_TAG" == x"" ] ;
then
echo "Required variable FDO_DISTRIBUTION_TAG is not set" ;
exit 1 ;
fi
- export DISTRO_TAG=$FDO_DISTRIBUTION_TAG
- export DISTRO_VERSION="$FDO_DISTRIBUTION_VERSION"
- export DISTRO_EXEC=$FDO_DISTRIBUTION_EXEC
......@@ -122,12 +128,6 @@
- skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- *fdo_distro_vars
- if [[ x"$DISTRO_TAG" == x"" ]] ;
then
echo $DISTRO tag missing;
exit 1;
fi
- *fdo_distro_exists
- if [[ x"$FDO_BASE_IMAGE" != x"" ]] ;
......
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