diff --git a/.github/workflows/e2etests.yml b/.github/workflows/e2etests.yml index 971edc95..92ee7a9a 100644 --- a/.github/workflows/e2etests.yml +++ b/.github/workflows/e2etests.yml @@ -28,24 +28,6 @@ jobs: with: name: meshery-meshsync path: /tmp/meshery-meshsync.tar - # Setup meshery config.yaml and auth.json - - name: Setup meshery config and infinite token for use - env: - provider_token: ${{ secrets.PROVIDER_TOKEN }} - provider: "Meshery" - run: | - echo $provider_token - mkdir ~/.meshery - config='{"contexts":{"local":{"endpoint":"http://localhost:9081","token":"default","platform":"kubernetes","components":[],"channel":"stable","version":"latest"}},"current-context":"local","tokens":[{"location":"auth.json","name":"default"}]}' - echo $config > ~/.meshery/config.yaml - cat ~/.meshery/config.yaml - echo "Using provider": $provider - if [ $provider = "Meshery" ] && [ "$provider_token" != "" ] ;then - echo '{ "meshery-provider": "Meshery", "token": null }' | jq -c '.token = "'$provider_token'"' > ~/.meshery/auth.json - else - echo '{ "meshery-provider": "None", "token": "" }' > ~/.meshery/auth.json - fi - cat ~/.meshery/auth.json e2e-test: name: End to End @@ -75,7 +57,24 @@ jobs: mv ~/.kube/configtemp ~/.kube/config echo "After flattening" cat ~/.kube/config - + # Setup meshery config.yaml and auth.json + - name: Setup meshery config and infinite token for use + env: + provider_token: ${{ secrets.PROVIDER_TOKEN }} + provider: "Meshery" + run: | + echo $provider_token + mkdir ~/.meshery + config='{"contexts":{"local":{"endpoint":"http://localhost:9081","token":"default","platform":"kubernetes","components":[],"channel":"stable","version":"latest"}},"current-context":"local","tokens":[{"location":"auth.json","name":"default"}]}' + echo $config > ~/.meshery/config.yaml + cat ~/.meshery/config.yaml + echo "Using provider": $provider + if [ $provider = "Meshery" ] && [ "$provider_token" != "" ] ;then + echo '{ "meshery-provider": "Meshery", "token": null }' | jq -c '.token = "'$provider_token'"' > ~/.meshery/auth.json + else + echo '{ "meshery-provider": "None", "token": "" }' > ~/.meshery/auth.json + fi + cat ~/.meshery/auth.json - name: Cluster info for debugging before starting Meshery run: kubectl get all -A # Start Meshery Server (Assuming that this step will create the meshery namespace)