Skip to content
Snippets Groups Projects

WIP: Adding first RH image testing steps

Closed Daniel Juarez Gonzalez requested to merge adding_rh_testing into master
Compare and
11 files
+ 231
32
Compare changes
  • Side-by-side
  • Inline
Files
11
+ 24
17
@@ -17,21 +17,28 @@
.get_latest_image: &get_latest_image
- |
if [[ -z "${IMAGE}" ]]; then
if [[ "${OS: -1}" == "s" ]]; then
OS_DISTRO="CS"
OS_MAJOR="${OS:0:-1}"
if [[ "${OS:0:2}" == "RH" ]]; then
OS_DISTRO="RHEL"
OS_MAJOR="${OS: -1}"
else
OS_MAJOR="${OS}"
if [[ "${OS}" -eq 7 ]]; then
OS_DISTRO="CC"
# All CentOS images are public, so we add an extra parameter for finer searching
OS_VISIBILITY="--public"
if [[ "${OS: -1}" == "s" ]]; then
OS_DISTRO="CS"
OS_MAJOR="${OS:0:-1}"
else
OS_DISTRO="C"
OS_MAJOR="${OS}"
if [[ "${OS}" -eq 7 ]]; then
OS_DISTRO="CC"
else
OS_DISTRO="C"
fi
fi
fi
IMAGE=$(openstack image list --property os_distro="${OS_DISTRO}" --property os_distro_major="${OS_MAJOR}" --property architecture="${ARCH}" --property os_edition="Base" --public --sort created_at -c ID -f value | tail -n1)
IMAGE=$(openstack image list --property os_distro="${OS_DISTRO}" --property os_distro_major="${OS_MAJOR}" --property architecture="${ARCH}" --property os_edition="Base" $OS_VISIBILITY --sort created_at -c ID -f value | tail -n1)
if [[ -z "${IMAGE}" ]]; then
echo "No image found matching:"
echo openstack image list --property os_distro="${OS_DISTRO}" --property os_distro_major="${OS_MAJOR}" --property architecture="${ARCH}" --property os_edition="Base" --public --sort created_at
echo openstack image list --property os_distro="${OS_DISTRO}" --property os_distro_major="${OS_MAJOR}" --property architecture="${ARCH}" --property os_edition="Base" $OS_VISIBILITY --sort created_at
exit 1
fi
fi
@@ -41,8 +48,8 @@
script:
- export OS_PROJECT_NAME="${PROJECT_PHYSICAL}"
- *get_latest_image
- echo bash testallthethings.sh -i "${IMAGE}" -f "${FLAVOR}"
- bash testallthethings.sh -i "${IMAGE}" -f "${FLAVOR}"
- echo bash testallthethings.sh -d "${OS_DISTRO}" -m "${OS_MAJOR}" -i "${IMAGE}" -f "${FLAVOR}"
- bash testallthethings.sh -d "${OS_DISTRO}" -m "${OS_MAJOR}" -i "${IMAGE}" -f "${FLAVOR}"
allow_failure: true
.test_unmanaged_virtual:
@@ -50,8 +57,8 @@
script:
- export OS_PROJECT_NAME="${PROJECT_VIRTUAL}"
- *get_latest_image
- echo bash testallthethings.sh -i "${IMAGE}" -f "m2.small"
- bash testallthethings.sh -i "${IMAGE}" -f "m2.small"
- echo bash testallthethings.sh -d "${OS_DISTRO}" -m "${OS_MAJOR}" -i "${IMAGE}" -f "m2.small"
- bash testallthethings.sh -d "${OS_DISTRO}" -m "${OS_MAJOR}" -i "${IMAGE}" -f "m2.small"
.test_puppet_physical:
extends: .openstack
@@ -62,8 +69,8 @@
- export OS_PROJECT_NAME="${PROJECT_PHYSICAL}"
- *get_latest_image
- yum install -y openssh-clients jq
- echo bash testallthethings.sh -i "${IMAGE}" -f "${FLAVOR}" -p
- bash testallthethings.sh -i "${IMAGE}" -f "${FLAVOR}" -p
- echo bash testallthethings.sh -d "${OS_DISTRO}" -m "${OS_MAJOR}" -i "${IMAGE}" -f "${FLAVOR}" -p
- bash testallthethings.sh -d "${OS_DISTRO}" -m "${OS_MAJOR}" -i "${IMAGE}" -f "${FLAVOR}" -p
allow_failure: true
.test_puppet_virtual:
@@ -75,5 +82,5 @@
- export OS_PROJECT_NAME="${PROJECT_VIRTUAL}"
- *get_latest_image
- yum install -y openssh-clients jq
- echo bash testallthethings.sh -i "${IMAGE}" -f "m2.small" -p
- bash testallthethings.sh -i "${IMAGE}" -f "m2.small" -p
- echo bash testallthethings.sh -d "${OS_DISTRO}" -m "${OS_MAJOR}" -i "${IMAGE}" -f "m2.small" -p
- bash testallthethings.sh -d "${OS_DISTRO}" -m "${OS_MAJOR}" -i "${IMAGE}" -f "m2.small" -p
Loading