mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-10-31 19:08:01 +00:00 
			
		
		
		
	allow to set arbitrary existing cloud controller
Signed-off-by: Max Brenner <xamrennerb@gmail.com>
This commit is contained in:
		
							
								
								
									
										28
									
								
								.github/workflows/quali.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.github/workflows/quali.yml
									
									
									
									
										vendored
									
									
								
							| @@ -32,11 +32,10 @@ on: | |||||||
|         required: true |         required: true | ||||||
|         default: 'uc_sanity' |         default: 'uc_sanity' | ||||||
|         description: 'Marker expression to select tests to execute' |         description: 'Marker expression to select tests to execute' | ||||||
|       use_qa01: |       existing_controller: | ||||||
|         type: boolean |         required: false | ||||||
|         required: true |         default: '' | ||||||
|         default: 'true' |         description: 'Use an existing cloud controller, e.g. like qa01 instead of dynamic one' | ||||||
|         description: 'Use openwifi-qa01 instead of dynamic cloud controller' |  | ||||||
|   schedule: |   schedule: | ||||||
|   - cron: '30 20 * * *' |   - cron: '30 20 * * *' | ||||||
|  |  | ||||||
| @@ -48,7 +47,7 @@ jobs: | |||||||
|       ap_models: ${{ steps.vars.outputs.ap_models}} |       ap_models: ${{ steps.vars.outputs.ap_models}} | ||||||
|       ap_version: ${{ steps.vars.outputs.ap_version}} |       ap_version: ${{ steps.vars.outputs.ap_version}} | ||||||
|       marker_expression: ${{ steps.vars.outputs.marker_expression }} |       marker_expression: ${{ steps.vars.outputs.marker_expression }} | ||||||
|       use_qa01: ${{ steps.vars.outputs.use_qa01 }} |       existing_controller: ${{ steps.vars.outputs.existing_controller }} | ||||||
|  |  | ||||||
|     steps: |     steps: | ||||||
|       - name: set variables |       - name: set variables | ||||||
| @@ -58,7 +57,7 @@ jobs: | |||||||
|           echo ::set-output name=ap_models::$(echo "${{ github.event.inputs.ap_models || 'edgecore_ecw5410,edgecore_eap101,tp-link_ec420-g1,edgecore_ecw5211,cig_wf188n,edgecore_eap102,cig_wf194c,hfcl_ion4' }}") |           echo ::set-output name=ap_models::$(echo "${{ github.event.inputs.ap_models || 'edgecore_ecw5410,edgecore_eap101,tp-link_ec420-g1,edgecore_ecw5211,cig_wf188n,edgecore_eap102,cig_wf194c,hfcl_ion4' }}") | ||||||
|           echo ::set-output name=ap_version::$(echo "${{ github.event.inputs.ap_version || 'next-latest' }}") |           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 || 'uc_sanity' }}") |           echo ::set-output name=marker_expression::$(echo "${{ github.event.inputs.marker_expression || 'uc_sanity' }}") | ||||||
|           echo ::set-output name=use_qa01::$(echo "${{ github.event.inputs.use_qa01 || 'true' }}") |           echo ::set-output name=existing_controller::$(echo "${{ github.event.inputs.existing_controller || 'qa01' }}") | ||||||
|  |  | ||||||
|   generate-matrix: |   generate-matrix: | ||||||
|     name: generate AP model matrix |     name: generate AP model matrix | ||||||
| @@ -109,9 +108,9 @@ jobs: | |||||||
|  |  | ||||||
|     - name: start reservation |     - name: start reservation | ||||||
|       run: | |       run: | | ||||||
|         if [ ${{ needs.vars.outputs.use_qa01 }} == 'true' ] |         if [ ${{ needs.vars.outputs.existing_controller }} != '' ] | ||||||
|         then |         then | ||||||
|           python .quali/start_reservation.py --global-inputs '{"Chart Version":"${{ needs.vars.outputs.openwifi_revision }}","AP Model":"${{ matrix.ap_model }}","Optional Existing SDK Namespace":"qa01"}' "Basic Lab" |           python .quali/start_reservation.py --global-inputs '{"Chart Version":"${{ needs.vars.outputs.openwifi_revision }}","AP Model":"${{ matrix.ap_model }}","Optional Existing SDK Namespace":"${{ needs.vars.outputs.existing_controller }}"}' "Basic Lab" | ||||||
|         else |         else | ||||||
|           python .quali/start_reservation.py --global-inputs '{"Chart Version":"${{ needs.vars.outputs.openwifi_revision }}","AP Model":"${{ matrix.ap_model }}"}' "Basic Lab" |           python .quali/start_reservation.py --global-inputs '{"Chart Version":"${{ needs.vars.outputs.openwifi_revision }}","AP Model":"${{ matrix.ap_model }}"}' "Basic Lab" | ||||||
|         fi |         fi | ||||||
| @@ -121,9 +120,9 @@ jobs: | |||||||
|       id: reservation |       id: reservation | ||||||
|       run: | |       run: | | ||||||
|         echo ::set-output name=identifier::"$(cat ./reservation_id.txt)" |         echo ::set-output name=identifier::"$(cat ./reservation_id.txt)" | ||||||
|         if [ ${{ needs.vars.outputs.use_qa01 }} == 'true' ] |         if [ ${{ needs.vars.outputs.existing_controller }} != '' ] | ||||||
|         then |         then | ||||||
|           echo ::set-output name=namespace::"qa01" |           echo ::set-output name=namespace::"${{ needs.vars.outputs.existing_controller }}" | ||||||
|         else |         else | ||||||
|           echo ::set-output name=namespace::"$(cat ./reservation_id.txt | cut -d "-" -f 1)" |           echo ::set-output name=namespace::"$(cat ./reservation_id.txt | cut -d "-" -f 1)" | ||||||
|         fi |         fi | ||||||
| @@ -287,11 +286,10 @@ jobs: | |||||||
|         } |         } | ||||||
|         EOF |         EOF | ||||||
|  |  | ||||||
|  |         # overwrite configuration value from Quali | ||||||
|         # fix wrong configuration value from Quali |         if [ ${{ needs.vars.outputs.existing_controller }} != '' ] | ||||||
|         if [ ${{ needs.vars.outputs.use_qa01 }} == 'true' ] |  | ||||||
|         then |         then | ||||||
|           sed -i "s/https:\/\/sec-.*\.cicd\.lab\.wlan\.tip\.build/https:\/\/sec-qa01.cicd.lab.wlan.tip.build/g" configuration.py |           sed -i "s/https:\/\/sec-.*\.cicd\.lab\.wlan\.tip\.build/https:\/\/sec-${{ needs.vars.outputs.existing_controller }}.cicd.lab.wlan.tip.build/g" configuration.py | ||||||
|         fi |         fi | ||||||
|  |  | ||||||
|         kubectl create secret generic configuration --from-file=configuration=./configuration.py |         kubectl create secret generic configuration --from-file=configuration=./configuration.py | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Brenner
					Max Brenner