diff --git a/.github/workflows/advanced.yml b/.github/workflows/advanced.yml index 339b3199d..3f9f9d5d1 100644 --- a/.github/workflows/advanced.yml +++ b/.github/workflows/advanced.yml @@ -5,8 +5,6 @@ env: on: workflow_dispatch: - schedule: - - cron: '30 20 * * *' defaults: run: diff --git a/.github/workflows/quali-advanced.yml b/.github/workflows/quali-advanced.yml new file mode 100644 index 000000000..3a1ea8f20 --- /dev/null +++ b/.github/workflows/quali-advanced.yml @@ -0,0 +1,621 @@ +name: Quali advanced testing + +env: + ALLURE_CLI_VERSION: 2.14.0 + +on: + workflow_dispatch: + inputs: + openwifi_revision: + required: true + default: 'main' + description: 'revision of the Open Wifi Helm chart' + ap_models: + required: true + default: 'EAP102,cig_wf194c' + description: 'the AP models to test' + ap_version: + required: true + default: 'next-latest' + description: 'revision of firmware to flash on AP, -' + marker_expression: + required: true + default: 'advance' + description: 'Marker expression to select tests to execute' + schedule: + - cron: '30 20 * * *' + +defaults: + run: + shell: bash + +jobs: + vars: + runs-on: ubuntu-latest + outputs: + openwifi_revision: ${{ steps.vars.outputs.openwifi}} + ap_models: ${{ steps.vars.outputs.ap_models}} + ap_version: ${{ steps.vars.outputs.ap_version}} + marker_expression: ${{ steps.vars.outputs.marker_expression }} + + steps: + - name: set variables + id: vars + run: | + echo ::set-output name=openwifi::$(echo "${{ github.event.inputs.openwifi_revision || 'main' }}") + echo ::set-output name=ap_models::$(echo "${{ github.event.inputs.ap_models || 'EAP102,cig_wf194c' }}") + echo ::set-output name=ap_version::$(echo "${{ github.event.inputs.ap_version || 'next-latest' }}") + echo ::set-output name=marker_expression::$(echo "${{ github.event.inputs.marker_expression || 'advance' }}") + + generate-matrix: + name: generate AP model matrix + runs-on: ubuntu-latest + needs: vars + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: generate-matrix + id: set-matrix + run: | + AP_MODELS="${{ needs.vars.outputs.ap_models }}" + AP_MODELS=$(echo $AP_MODELS | sed "s/,/\",\"/g" | sed 's/^/[\"/g' | sed 's/$/\"]/g') + AP_MODELS=$(echo "$AP_MODELS" | jq -c 'map({"ap_model":.})') + echo "::set-output name=matrix::{\"include\":${AP_MODELS}}" + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: build and push Docker image + uses: ./.github/actions/build-and-push-docker + with: + registry: tip-tip-wlan-cloud-docker-repo.jfrog.io + registry_user: wlan-testing-cicd + registry_password: ${{ secrets.DOCKER_USER_PASSWORD }} + + test: + runs-on: [ self-hosted, small ] + needs: [ vars, generate-matrix, build ] + strategy: + fail-fast: false + matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }} + env: + AWS_EKS_NAME: tip-wlan-main + AWS_DEFAULT_OUTPUT: json + AWS_DEFAULT_REGION: us-east-2 + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_CLIENT_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_CLIENT_KEY }} + CLOUDSHELL_URL: quali-cloudshell.lab.wlan.tip.build + CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER}} + CLOUDSHELL_PASSWORD: ${{ secrets.CLOUDSHELL_PASSWORD }} + MARKER_EXPRESSION: ${{ needs.vars.outputs.marker_expression }} + + steps: + - name: install aws CLI tool + run: | + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + - name: install kubectl + run: | + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: checkout testing repo + uses: actions/checkout@v2 + with: + path: wlan-testing + + - name: install dependencies + run: pip install -r wlan-testing/.quali/requirements.txt + + - name: start reservation + id: start + run: | + RES_ID=$(python wlan-testing/.quali/start_reservation.py --openwifi-version "${{ needs.vars.outputs.openwifi_revision }}" --ap-model "${{ matrix.ap_model }}" --blueprint "Advance Lab") + echo ::set-output name=res_id::"$RES_ID" + + - name: set reservation identifier + id: reservation + run: echo ::set-output name=identifier::$(echo ${{ steps.start.outputs.res_id }} | cut -d "-" -f 1) + + - name: get EKS access credentials + run: aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }} + + - name: install Allure CLI tool + run: | + wget https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/${{ env.ALLURE_CLI_VERSION }}/allure-commandline-${{ env.ALLURE_CLI_VERSION }}.tgz + tar -xzf allure-commandline-${{ env.ALLURE_CLI_VERSION }}.tgz + + - name: set job name + id: job + run: echo "::set-output name=name::advanced-ci-${{ github.run_number }}" + + - name: prepare namespace + id: namespace + run: | + NAMESPACE="testing-${{ github.run_id }}-$(echo ${{ matrix.ap_model }} | tr '[:upper:]' '[:lower:]' | tr '_' '-')" + kubectl create ns $NAMESPACE + kubectl config set-context --current --namespace=$NAMESPACE + echo "::set-output name=name::${NAMESPACE}" + + - name: prepare configuration + run: | + cat << EOF > configuration.py + Customer = "" + server = "" + CONFIGURATION = { + "advanced": $(python wlan-testing/.quali/get_configuration.py ${{ steps.start.outputs.res_id }}) + } + + open_flow = {} + + RADIUS_SERVER_DATA = { + "ip": "10.10.1.221", + "port": 1812, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" + } + + RADIUS_ACCOUNTING_DATA = { + "ip": "10.10.1.221", + "port": 1813, + "secret": "testing123", + "user": "user", + "password": "password", + "pk_password": "whatever" + } + + PASSPOINT_RADIUS_SERVER_DATA = { + "ip": "52.234.179.191", + "port": 11812, + "secret": "yeababy20!", + "user": "nolaradius", + "password": "nolastart", + "pk_password": "whatever" + } + + PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA = { + "ip": "52.234.179.191", + "port": 11813, + "secret": "yeababy20!" + } + + PASSPOINT_PROVIDER_INFO = { + "mcc": None, + "mnc": None, + "network": None, + "nai_realms": { + "domain": "oss.ameriband.com", + "encoding": 0, + "eap_map": {"EAP-TTLS with username/password": ["Credential Type:username/password", + "Non-EAP Inner Authentication Type:MSCHAPV2"]} + }, + "osu_nai_standalone": "anonymous@ameriband.com", + "osu_nai_shared": "anonymous@ameriband.com", + "roaming_oi": [] + } + + PASSPOINT_OPERATOR_INFO = { + "osen": "Disabled", + "domain_name_list": ["telecominfraproject.atlassian.net"], + "operator_names": [ + {"locale": "eng", "name": "Default friendly passpoint_operator name"}, + {"locale": "fra", "name": "Nom de l'opérateur convivial par défaut"} + ] + } + + PASSPOINT_VENUE_INFO = { + "venue_type": {"group": "Business", "type": "Police Station"}, + "venue_names": [ + {"locale": "eng", "name": "Example passpoint_venue", "url": "http://www.example.com/info-eng"}, + {"locale": "fra", "name": "Exemple de lieu", "url": "http://www.example.com/info-fra"} + ] + } + + PASSPOINT_PROFILE_INFO = { + "profile_download_url_ios": "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig", + "profile_download_url_android": "https://onboard.almondlabs.net/ttls/androidconfig.cfg", + "profile_name_on_device": "AmeriBand", + "radius_configuration": { + "user_defined_nas_id": "FB001AP001", + "operator_id": "AmeribandTIP", + "radius_acounting_service_interval": 60 + }, + "interworking_hs2dot0": "Enabled", + "hessid": None, + "access_network": { + "Access Network Type": "Free Public Network", + "Authentication Type": "Acceptance of Terms & Conditions", + "Emergency Services Reachable": "Enabled", + "Unauthenticated Emergency Service": "Disabled", + }, + "ip_connectivity": { + "Internet Connectivity": "Enabled", + "IP Address Type": "Public IPv4 Address Available", + "Connection Capability": [{"status": "open", "protocol": "TCP", "port": 8888}], + "ANQP Domain ID": 1234, + "GAS Address 3 Behaviour": "P2P Spec Workaround From Request", + "Disable DGAF": False + } + } + + TEST_CASES = { + "ap_upgrade": 2233, + "5g_wpa2_bridge": 2236, + "2g_wpa2_bridge": 2237, + "5g_wpa_bridge": 2419, + "2g_wpa_bridge": 2420, + "2g_wpa_nat": 4323, + "5g_wpa_nat": 4324, + "2g_wpa2_nat": 4325, + "5g_wpa2_nat": 4326, + "2g_wpa2_eap_ttls_bridge": 5214, + "5g_wpa2_eap_ttls_bridge": 5215, + "2g_wpa2_eap_ttls_nat": 5216, + "5g_wpa2_eap_ttls_nat": 5217, + "cloud_connection": 5222, + "cloud_fw": 5247, + "5g_wpa2_vlan": 5248, + "5g_wpa_vlan": 5249, + "5g_wpa2_eap_ttls_vlan": 5250, + "2g_wpa2_vlan": 5251, + "2g_wpa_vlan": 5252, + "2g_wpa2_eap_ttls_vlan": 5253, + "cloud_ver": 5540, + "bridge_vifc": 5541, + "nat_vifc": 5542, + "vlan_vifc": 5543, + "bridge_vifs": 5544, + "nat_vifs": 5545, + "vlan_vifs": 5546, + "upgrade_api": 5547, + "create_fw": 5548, + "ap_profile_bridge": 5641, + "ap_profile_nat": 5642, + "ap_profile_vlan": 5643, + "ssid_2g_wpa2_eap_bridge": 5644, + "ssid_2g_wpa2_bridge": 5645, + "ssid_2g_wpa_bridge": 5646, + "ssid_5g_wpa2_eap_bridge": 5647, + "ssid_5g_wpa2_bridge": 5648, + "ssid_5g_wpa_bridge": 5649, + "ssid_2g_wpa2_eap_nat": 5650, + "ssid_2g_wpa2_nat": 5651, + "ssid_2g_wpa_nat": 5652, + "ssid_5g_wpa2_eap_nat": 5653, + "ssid_5g_wpa2_nat": 5654, + "ssid_5g_wpa_nat": 5655, + "ssid_2g_wpa2_eap_vlan": 5656, + "ssid_2g_wpa2_vlan": 5657, + "ssid_2g_wpa_vlan": 5658, + "ssid_5g_wpa2_eap_vlan": 5659, + "ssid_5g_wpa2_vlan": 5660, + "ssid_5g_wpa_vlan": 5661, + "radius_profile": 5808, + "bridge_ssid_update": 8742, + "nat_ssid_update": 8743, + "vlan_ssid_update": 8744, + "2g_wpa3_bridge": 9740, + "5g_wpa3_bridge": 9741, + "ssid_2g_wpa3_bridge": 9742, + "ssid_5g_wpa3_bridge": 9743, + "ssid_2g_wpa3_nat": 9744, + "ssid_5g_wpa3_nat": 9745, + "ssid_2g_wpa3_vlan": 9746, + "ssid_5g_wpa3_vlan": 9747, + "2g_wpa3_nat": 9748, + "5g_wpa3_nat": 9749, + "2g_wpa3_vlan": 9750, + "5g_wpa3_vlan": 9751, + "ssid_2g_wpa3_eap_bridge": 9752, + "ssid_5g_wpa3_eap_bridge": 9753, + "2g_wpa3_eap_ttls_bridge": 9754, + "5g_wpa3_eap_ttls_bridge": 9755, + "ssid_2g_wpa3_eap_nat": 9756, + "ssid_5g_wpa3_eap_nat": 9757, + "ssid_2g_wpa3_eap_vlan": 9758, + "ssid_5g_wpa3_eap_vlan": 9759, + "2g_wpa3_eap_ttls_nat": 9760, + "5g_wpa3_eap_ttls_nat": 9761, + "2g_wpa3_eap_ttls_vlan": 9762, + "5g_wpa3_eap_ttls_vlan": 9763, + "ssid_2g_wpa3_mixed_bridge": 9764, + "ssid_5g_wpa3_mixed_bridge": 9765, + "2g_wpa3_mixed_eap_ttls_wpa3_bridge": 9766, + "2g_wpa3_mixed_wpa3_bridge": 9767, + "5g_wpa3_mixed_eap_ttls_wpa3_bridge": 9768, + "5g_wpa3_mixed_wpa3_bridge": 9769, + "ssid_2g_wpa3_mixed_nat": 9770, + "ssid_5g_wpa3_mixed_nat": 9771, + "ssid_2g_wpa3_mixed_vlan": 9772, + "ssid_5g_wpa3_mixed_vlan": 9773, + # "2g_wpa3_mixed_wpa2_nat": 9774, + "2g_wpa3_mixed_wpa3_nat": 9775, + # "5g_wpa3_mixed_wpa2_nat": 9776, + "5g_wpa3_mixed_wpa3_nat": 9777, + # "2g_wpa3_mixed_wpa2_vlan": 9778, + "2g_wpa3_mixed_wpa3_vlan": 9779, + # "5g_wpa3_mixed_wpa2_vlan": 9780, + "5g_wpa3_mixed_wpa3_vlan": 9781, + "ssid_2g_wpa3_enterprise_mixed_bridge": 9782, + "ssid_5g_wpa3_enterprise_mixed_bridge": 9783, + "2g_wpa2_mixed_eap_wpa2_bridge": 9784, + "2g_wpa3_mixed_eap_wpa3_bridge": 9785, + "5g_wpa3_mixed_eap_wpa2_bridge": 9786, + "5g_wpa3_mixed_eap_wpa3_bridge": 9787, + "ssid_2g_wpa3_enterprise_mixed_nat": 9788, + "ssid_5g_wpa3_enterprise_mixed_nat": 9789, + "2g_wpa3_mixed_eap_wpa2_nat": 9790, + "2g_wpa3_mixed_eap_ttls_wpa3_nat": 9791, + "5g_wpa3_mixed_eap_wpa2_nat": 9792, + "5g_wpa3_mixed_eap_ttls_wpa3_nat": 9793, + "ssid_2g_wpa3_enterprise_mixed_vlan": 9794, + "ssid_5g_wpa3_enterprise_mixed_vlan": 9795, + "2g_wpa3_mixed_eap_wpa2_vlan": 9796, + "2g_wpa3_mixed_eap_ttls_wpa3_vlan": 9797, + "5g_wpa3_mixed_eap_wpa2_vlan": 9798, + "5g_wpa3_mixed_eap_ttls_wpa3_vlan": 9799, + "ssid_2g_open_bridge": 9805, + "ssid_5g_open_bridge": 9806, + "ssid_2g_open_nat": 9807, + "ssid_5g_open_nat": 9808, + "ssid_2g_open_vlan": 9809, + "ssid_5g_open_vlan": 9810, + "ssid_2g_wpa2_mixed_bridge": 9811, + "ssid_5g_wpa2_mixed_bridge": 9812, + "ssid_2g_wpa2_mixed_nat": 9813, + "ssid_5g_wpa2_mixed_nat": 9814, + "ssid_2g_wpa2_mixed_vlan": 9815, + "ssid_5g_wpa2_mixed_vlan": 9817, + "ssid_2g_wpa_wpa2_enterprise_mixed_bridge": 9818, + "ssid_5g_wpa_wpa2_enterprise_mixed_bridge": 9819, + "ssid_2g_wpa_wpa2_enterprise_mixed_nat": 9820, + "ssid_5g_wpa_wpa2_enterprise_mixed_nat": 9821, + "ssid_2g_wpa_wpa2_enterprise_mixed_vlan": 9822, + "ssid_5g_wpa_wpa2_enterprise_mixed_vlan": 9823, + "ssid_2g_wpa_eap_bridge": 9824, + "ssid_5g_wpa_eap_bridge": 9825, + # "ssid_2g_wpa2_eap_bridge": 9824, + # "ssid_5g_wpa2_eap_bridge": 9825, + "ssid_2g_wpa_eap_nat": 9826, + "ssid_5g_wpa_eap_nat": 9827, + "ssid_2g_wpa_eap_vlan": 9828, + "ssid_5g_wpa_eap_vlan": 9829, + # "ap_update_bridge": 9856, + # "ap_update_nat": 9857, + # "ap_update_vlan": 9858, + # "bridge_vifc_update": 9859, + # "nat_vifc_update": 9860, + # "vlan_vifc_update": 9861, + # "bridge_vifs_update": 9862, + # "nat_vifs_update": 9863, + # "vlan_vifs_update": 9864, + "2g_wpa_eap_ttls_bridge": 9867, + "5g_wpa_eap_ttls_bridge": 9768, + "2g_wpa_eap_ttls_nat": 9869, + "5g_wpa_eap_ttls_nat": 9770, + "2g_wpa_eap_ttls_vlan": 9871, + "5g_wpa_eap_ttls_vlan": 9872, + # "2g_wpa2_mixed_eap_wpa_bridge": 9873, + "2g_wpa2_mixed_eap_ttls_wpa2_bridge": 9874, + # "5g_wpa2_mixed_eap_wpa_bridge": 9875, + "5g_wpa2_mixed_eap_ttls_wpa2_bridge": 9876, + # "2g_wpa2_mixed_eap_wpa_nat": 9877, + "2g_wpa2_mixed_eap_ttls_wpa2_nat": 9878, + # "5g_wpa2_mixed_eap_wpa_nat": 9879, + "5g_wpa2_mixed_eap_ttls_wpa2_nat": 9880, + # "2g_wpa2_mixed_eap_wpa_vlan": 9881, + "2g_wpa2_mixed_eap_ttls_wpa2_vlan": 9882, + # "5g_wpa2_mixed_eap_wpa_vlan": 9883, + "5g_wpa2_mixed_eap_ttls_wpa2_vlan": 9884, + # "2g_wpa2_mixed_wpa_bridge": 9885, + "2g_wpa2_mixed_wpa2_bridge": 9886, + # "5g_wpa2_mixed_wpa_bridge": 9887, + "5g_wpa2_mixed_wpa2_bridge": 9888, + # "2g_wpa2_mixed_wpa_nat": 9889, + "2g_wpa2_mixed_wpa2_nat": 9890, + # "5g_wpa2_mixed_wpa_nat": 9891, + "5g_wpa2_mixed_wpa2_nat": 9892, + # "2g_wpa2_mixed_wpa_vlan": 9893, + "2g_wpa2_mixed_wpa2_vlan": 9894, + # "5g_wpa2_mixed_wpa_vlan": 9895, + "5g_wpa2_mixed_wpa2_vlan": 9896, + "2g_open_bridge": 2234, + "5g_open_bridge": 2235, + "2g_open_nat": 4321, + "5g_open_nat": 4322, + "2g_open_vlan": 9897, + "5g_open_vlan": 9898 + } + EOF + + cat configuration.py + + kubectl create secret generic configuration --from-file=configuration=./configuration.py + + - name: run tests + run: | + cat <> /etc/hosts + echo "DNS record for \$HOST resolved successfully!" + done + + cat /etc/hosts + + cd tests + pytest -m "${{ needs.vars.outputs.marker_expression }}" -s -vvv --testbed="advanced" --alluredir=/tmp/allure-results -o firmware="${{ needs.vars.outputs.ap_version }}" + ret=\$? + # sleep some time to be able to download the Allure results + sleep 60 + exit \$ret + volumeMounts: + - name: configuration + mountPath: "/wlan-testing/tests/configuration.py" + subPath: configuration + readOnly: true + nodeSelector: + env: tests + tolerations: + - key: "tests" + operator: "Exists" + effect: "NoSchedule" + imagePullSecrets: + - name: tip-docker-registry-key + restartPolicy: Never + volumes: + - name: configuration + secret: + secretName: configuration + backoffLimit: 0 + EOF + # wait for pod to spawn + sleep 1 + + podname=$(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l job-name="${{ steps.job.outputs.name }}" | sed "s/pod\///") + kubectl wait "pod/$podname" --for condition=ready --timeout=600s + kubectl logs -f $podname & + + until [ -s test_everything.xml ] + do + sleep 10 + kubectl cp $podname:/wlan-testing/tests/test_everything.xml test_everything.xml >/dev/null 2>&1 + done + echo "tests completed" + echo "downloading allure results..." + kubectl cp $podname:/tmp/allure-results allure-results >/dev/null 2>&1 + echo "waiting for pod to exit" + kubectl logs -f $podname >/dev/null 2>&1 + exit $(kubectl get pod $podname --output="jsonpath={.status.containerStatuses[].state.terminated.exitCode}") + + - name: show gw logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owgw + + - name: show fms logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owfms + + - name: show prov logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owprov + + - name: show sec logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.identifier }} logs deployment/owsec + + - name: upload Allure results as artifact + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: allure-results-${{ matrix.ap_model }} + path: allure-results + + - name: cleanup + if: ${{ always() }} + run: | + kubectl delete ns "${{ steps.namespace.outputs.name }}" --wait=true + + - name: stop reservation + if: always() + run: python wlan-testing/.quali/stop_reservation.py ${{ steps.start.outputs.res_id }} + + report: + needs: [ vars, generate-matrix, test ] + if: always() + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }} + steps: + - name: checkout testing repo + uses: actions/checkout@v2 + + - uses: actions/download-artifact@v2 + with: + name: allure-results-${{ matrix.ap_model }} + path: allure-results + + - name: download history of previous run + continue-on-error: true + run: | + LAST_RUN_ID=$(aws s3api head-object --bucket openwifi-allure-reports --key advance/${{ matrix.ap_model }}/latest/index.html | jq -r .Metadata.latest) + aws s3 cp --recursive s3://openwifi-allure-reports/advance/${{ matrix.ap_model }}/$LAST_RUN_ID/history history + + - name: generate Allure report + uses: ./.github/actions/generate-allure-report + with: + results_path: ./allure-results + history_path: ./history + additional_metadata: | + Ap.Model=${{ matrix.ap_model }} + + - name: upload Allure report as artifact + uses: actions/upload-artifact@v2 + with: + name: allure-report-${{ matrix.ap_model }} + path: allure-report + + # doing this to be able to aggregate multiple reports together later on + - name: copy results into report + run: | + cp -r allure-results allure-report/results + + - name: upload to S3 + if: github.ref == 'refs/heads/master' && needs.vars.outputs.marker_expression == 'advance' + uses: ./wlan-testing/.github/actions/allure-report-to-s3 + with: + test_type: advance + testbed: ${{ matrix.ap_model }} + report_path: allure-report + s3_access_key_id: ${{ secrets.ALLURE_S3_ACCESS_KEY_ID }} + s3_access_key_secret: ${{ secrets.ALLURE_S3_ACCESS_KEY_SECRET }} + + cleanup: + needs: [ test ] + runs-on: ubuntu-latest + if: always() + steps: + - uses: actions/checkout@v2 + - name: cleanup Docker image + uses: ./.github/actions/cleanup-docker + with: + registry_user: wlan-testing-cicd + registry_password: ${{ secrets.DOCKER_USER_PASSWORD }} diff --git a/.quali/start_reservation.py b/.quali/start_reservation.py index 672deb7da..43d19f6dc 100644 --- a/.quali/start_reservation.py +++ b/.quali/start_reservation.py @@ -7,6 +7,7 @@ import argparse from common import wait_for_provisioning_status, get_session run_id = os.environ.get('GITHUB_RUN_NUMBER', 1) +marker_expression = os.environ.get('MARKER_EXPRESSION', 'sanity') def main(): parser = argparse.ArgumentParser() @@ -17,15 +18,21 @@ def main(): parser.add_argument('--openwifi-ui-version', default='main') parser.add_argument('--ap-model', default='[Any]') parser.add_argument('--wifi-type', default='[Any]') + parser.add_argument('--blueprint', default='Basic Lab') args = parser.parse_args() session = get_session() + if marker_expression == 'advance': + reservation_duration = 720 + else + reservation_duration = 360 + reservation = session.CreateImmediateTopologyReservation( - reservationName=f'sanity-{run_id}', + reservationName=f'{marker_expression}-{run_id}', owner=session.username, - durationInMinutes=360, - topologyFullPath='Basic Lab', + durationInMinutes=reservation_duration, + topologyFullPath=args.blueprint, globalInputs=[ UpdateTopologyGlobalInputsRequest('Chart Version', args.openwifi_version), UpdateTopologyGlobalInputsRequest('owgw Version', args.openwifi_gw_version),