From be4fdce20d8128dde4f86efd9fc3bf12813fe2f8 Mon Sep 17 00:00:00 2001 From: dutta-rohan <94938704+dutta-rohan@users.noreply.github.com> Date: Thu, 14 Apr 2022 13:57:45 -0700 Subject: [PATCH] Modified .quali/get_config Signed-off-by: dutta-rohan <94938704+dutta-rohan@users.noreply.github.com> --- .github/workflows/interop.yml | 56 +++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index b58a3f68c..1c8f0019f 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -133,25 +133,75 @@ jobs: test-iphone-11: runs-on: ubuntu-latest - needs: [vars, test-galaxy-s9] + needs: [ vars, test-galaxy-s9 ] if: "!cancelled() && contains(fromJSON(needs.vars.outputs.devices), 'iphone-11')" steps: - uses: actions/checkout@v2 + - name: install dependencies + run: | + pip install -r .quali/requirements.txt + # curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + # unzip awscliv2.zip + # sudo ./aws/install + + - name: start reservation + env: + CLOUDSHELL_URL: quali-cloudshell.lab.wlan.tip.build + CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }} + CLOUDSHELL_PASSWORD: ${{ secrets.CLOUDSHELL_PASSWORD }} + run: | + python .quali/start_reservation.py --global-inputs '{"Phone ID(s)":"6","AP ID(s)":"1","Include a LANForge?":"Yes","securityToken":"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MzI4Mzc2NDEsImp0aSI6IjAwZGRiYWY5LWQwYjMtNDRjNS1hYjVlLTkyNzFlNzc5ZGUzNiIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiODNkNjUxMWQtNTBmZS00ZWM5LThkNzAtYTA0ZjBkNTdiZDUyIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI2ZjE1YzYxNy01YTU5LTQyOWEtODc2Yi1jOTQxMTQ1ZDFkZTIiLCJzZXNzaW9uX3N0YXRlIjoiYmRjZTFmYTMtMjlkYi00MmFmLWI5YWMtYjZjZmJkMDEyOTFhIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.5R85_1R38ZFXv_wIjjCIsj8NJm1p66dCsLJI5DBEmks"}' "InterOp Lab - Specific Selection" + + - name: set reservation outputs + if: always() + id: reservation + run: | + echo ::set-output name=identifier::"$(cat ./reservation_id.txt)" + echo ::set-output name=namespace::"$(cat ./reservation_id.txt | cut -d "-" -f 1)" + - name: get EKS access credentials run: aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }} + - 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: prepare configuration + env: + CLOUDSHELL_URL: quali-cloudshell.lab.wlan.tip.build + CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }} + CLOUDSHELL_PASSWORD: ${{ secrets.CLOUDSHELL_PASSWORD }} + run: | + cat << EOF > lab_info.json + ${{ secrets.LAB_CONFIGURATION_JSON }} + EOF + + DYN_CONFIG="$(python .quali/get_configuration.py --json ${{ steps.reservation.outputs.identifier }})" + + jq ".CONFIGURATION.interop=$DYN_CONFIG" lab_info.json > lab_info.json.tmp && mv lab_info.json.tmp lab_info.json + - name: run tests uses: ./.github/actions/run-tests with: namespace: interop-${{ github.run_id }}-iphone-11 - testbed: interop-01 + testbed: interop marker_expression: "${{ needs.vars.outputs.marker_overwrite || 'interop_uc_sanity and client_connect and ios' }}" - configuration: "${{ secrets.LAB_CONFIGURATION_JSON }}" + configuration_file: "./lab_info.json" testing_docker_image: tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }} additional_args: "--device='iPhone-11' --skip-lanforge" allure_results_artifact_name: allure-results-iphone-11 + - name: stop reservation + if: always() + run: python .quali/stop_reservation.py ${{ steps.reservation.outputs.identifier }} + env: + CLOUDSHELL_URL: quali-cloudshell.lab.wlan.tip.build + CLOUDSHELL_USER: ${{ secrets.CLOUDSHELL_USER }} + CLOUDSHELL_PASSWORD: ${{ secrets.CLOUDSHELL_PASSWORD }} + + # necessary because if conditionals in composite actions are currently not respected - name: delete namespace if: always()