8000 Load user mesh config if set and display on the mesh page. (#8330) · kiali/kiali@1568f26 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Kiali Molecule Tests #1210

Kiali Molecule Tests

Kiali Molecule Tests #1210

Workflow file for this run

name: Kiali Molecule Tests
on:
schedule:
# These are in UTC time.
# If you change any of these, you must also change the switch statment in the determine-istio-version-to-use task.
- cron: '0 2 * * *'
- cron: '0 4 * * *'
- cron: '0 6 * * *'
workflow_dispatch:
inputs:
all_tests:
description: "Molecule Test Names (space-separated)"
required: false
default: ""
type: string
olm_version:
description: "Version of OLM to install or 'latest'. e.g. v0.28.0"
required: false
default: "latest"
type: string
istio_minor_version_offset:
description: 'By default, the latest Istio minor version is tested. But you can test the previous minor version by asking for an Istio minor version offset of 1 (i.e. 1 minor version prior to the latest minor version)'
required: false
default: 0
type: number
workflow_call:
inputs:
all_tests:
required: false
type: string
olm_version:
required: false
type: string
default: "latest"
istio_minor_version_offset:
required: false
type: number
default: 0
jobs:
molecules:
name: Molecule tests
runs-on: ubuntu-latest
steps:
- name: Checkout the hack script that runs the tests
id: checkout-source
uses: actions/checkout@v4
with:
sparse-checkout: |
hack/ci-kind-molecule-tests.sh
- name: Print the names of the tests that are to be run
id: log-test-names
run: |
if [ -z "${{ inputs.all_tests }}" ]; then
echo "all tests"
else
echo "tests=${{ inputs.all_tests }}"
fi
- name: Determine Istio version to use
id: determine-istio-version-to-use
run: |
OFFSET="${{ inputs.istio_minor_version_offset }}"
# Convert to absolute value - we want a positive offset, though some people might find it more intuitive to say "-1" offset for the previous version
OFFSET=$(( OFFSET < 0 ? -OFFSET : OFFSET ))
if [[ -z "${OFFSET}" ]]; then
case "${{ github.event.schedule }}" in
"0 2 * * *") OFFSET=0 ;;
"0 4 * * *") OFFSET=1 ;;
"0 6 * * *") OFFSET=2 ;;
*) echo "Invalid schedule or unknown trigger! Cannot determine Istio version." && exit 1 ;;
esac
fi
LATEST_ISTIO_VERSIONS="$(curl -s https://api.github.com/repos/istio/istio/releases | jq -r '.[].tag_name' | sort -rV | awk -F'[-.]' '
{
minor = $1"."$2
is_rc = ($4 == "rc")
z = is_rc ? $3 : $3
rc_ver = is_rc ? $5 : ""
if (!minor_ga[minor] && !minor_rc[minor]) {
if (is_rc) { minor_rc[minor] = $0; minor_rc_z[minor] = z; minor_rc_rc[minor] = rc_ver }
else { minor_ga[minor] = $0; minor_ga_z[minor] = z }
} else if (!is_rc && minor_ga[minor]) {
if (z > minor_ga_z[minor]) { minor_ga[minor] = $0; minor_ga_z[minor] = z }
} else if (!is_rc && !minor_ga[minor]) {
minor_ga[minor] = $0; minor_ga_z[minor] = z; delete minor_rc[minor]; delete minor_rc_z[minor]; delete minor_rc_rc[minor]
} else if (is_rc && !minor_ga[minor]) {
current_rc_stored = minor_rc[minor]
split(current_rc_stored, current_rc_parts, "[-.]")
current_rc_num_stored = current_rc_parts[5]
if (!minor_rc[minor] || z > minor_rc_z[minor] || (z == minor_rc_z[minor] && rc_ver > current_rc_num_stored)) {
minor_rc[minor] = $0; minor_rc_z[minor] = z; minor_rc_rc[minor] = rc_ver
}
}
}
END {
for (m in minor_ga) { print minor_ga[m] }
for (m in minor_rc) { print minor_rc[m] }
}' | sort -Vr | grep -v '^$' | head -n $((OFFSET + 1)))"
ISTIO_VERSION=$(echo "${LATEST_ISTIO_VERSIONS}" | tail -n 1)
echo "The latest Istio versions are:"
echo "${LATEST_ISTIO_VERSIONS}"
echo "The Istio minor version offset is [${OFFSET}], thus the Istio version to be used in the tests will be: ${ISTIO_VERSION}"
echo "ISTIO_VERSION=${ISTIO_VERSION}" >> $GITHUB_ENV
- name: Run molecule tests HELM
id: run-molecule-tests-helm
run: |
ISTIO_VERSION="${{ env.ISTIO_VERSION }}"
if [ -z "${ISTIO_VERSION}" ]; then
echo "Could not determine the Istio version to use." && exit 1
fi
echo
echo "================================================================"
echo "Testing with Istio version [${ISTIO_VERSION}] using helm install"
echo "================================================================"
echo
./hack/ci-kind-molecule-tests.sh --istio-version ${ISTIO_VERSION} --client-exe $(which kubectl) --kind-exe $(which kind) --all-tests "${{ inputs.all_tests }}" --git-clone-protocol https --irc-room "" --upload-logs false --rebuild-cluster true -ci true --operator-installer helm --olm-enabled false
- name: Run molecule tests OLM
id: run-molecule-tests-olm
run: |
ISTIO_VERSION="${{ env.ISTIO_VERSION }}"
if [ -z "${ISTIO_VERSION}" ]; then
echo "Could not determine the Istio version to use." && exit 1
fi
echo
echo "================================================================"
echo "Testing with Istio version [${ISTIO_VERSION}] using OLM install"
echo "================================================================"
echo
./hack/ci-kind-molecule-tests.sh --istio-version ${ISTIO_VERSION} --client-exe $(which kubectl) --kind-exe $(which kind) --all-tests "${{ inputs.all_tests }}" --git-clone-protocol https --irc-room "" --upload-logs false --rebuild-cluster false -ci true --operator-installer skip --olm-enabled true --olm-version "${{ inputs.olm_version }}"
0