gardenctl icon indicating copy to clipboard operation
gardenctl copied to clipboard

executed the test_local from github action

Open tedteng opened this issue 5 years ago • 8 comments

Describe the bug I like to execute the test_local for e2e testing from GitHub action when any new commit pushed. the action which able to handle ssh testing in test_local and others eg gardenctl execution. and need feasible solution handle configuration file(garden dev kubeconfig)

tedteng avatar Nov 17 '20 01:11 tedteng

so far I am able to execute the action to check when PR changed. but

image

tedteng avatar Nov 17 '20 08:11 tedteng

with the latest approach, will try to create kubectl image with oidc-login plugin which uses for GitHub action

Error: unknown command "oidc-login" for "kubectl"

tedteng avatar Nov 20 '20 06:11 tedteng

We can't use the oidc kubeconfigs with the CICD as the 2-factor is meant for humans (not automation). We would need a normal kubeconfig with sufficient permissions to perform these tasks

dansible avatar Nov 20 '20 20:11 dansible

yes, you are right, 2-factor required humans input, and it seems to enable in Live only, I never met in Dev required me to input the security code. I thought I could found some silent mode since dev landscape never asking input 2-factor code. however, OIDC required an access browser. I can't handle it when in Github action.

now I am using the normal kubeconfig . as latest testing. It seems working well.

+ go run cmd/gardenctl/main.go target -g dev -p gardenctl -t gctl-aws
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://localhost:8000'
error: could not open the browser: exit status 3

Please visit the following URL in your browser manually: http://localhost:8000

image

tedteng avatar Nov 24 '20 05:11 tedteng

manually checked ssh AWS and Azure all green for SSH testing, but GCP failed in action (python v3.8 and Gcloud cli with the latest version). will investigating.
(skip openstack as is internal which not able to access from github.com)

image

tedteng avatar Nov 25 '20 08:11 tedteng

after debug the current gcp ssh workaound in operate.go not support in github action yet.

arguments image

tedteng avatar Nov 26 '20 02:11 tedteng

achieved execute test_local through GitHub action. which also covers more testing cases mention in form #393 (not include ssh testing and GCP feature as GCP workaround not working well now)however, it takes almost 10 mins. planning optimize it

image

tedteng avatar Dec 01 '20 03:12 tedteng

as the latest changes, the total time cost around 3 mins after using container in Github action

image

tedteng avatar Dec 01 '20 07:12 tedteng