You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.0 KiB

  1. #!/bin/sh
  2. # Generates MD formatted CI matrix from the .travis.yml
  3. a=$(perl -ne '/^\s{6}(CLOUD_IMAGE|KUBE_NETWORK_PLUGIN|CLOUD_REGION|CLUSTER_MODE)=(\S+)$/ && print "$2\n"' .travis.yml.bak)
  4. echo Travis-CI
  5. printf "|%25s|%25s|%25s|%25s|\n" "Network plugin" "OS type" "GCE region" "Nodes layout"
  6. echo "|-------------------------|-------------------------|-------------------------|-------------------------|"
  7. c=0
  8. for i in `echo $a`; do
  9. printf "|%25s" $i
  10. [ $(($c % 4)) -eq 3 ] && printf "|\n"
  11. c=$(( c + 1))
  12. done
  13. echo
  14. a=$(perl -ne '/^#\sstage:\sdeploy-gce-(\S+)$/ && print "$1\n";/^\s{2}(CLOUD_IMAGE|KUBE_NETWORK_PLUGIN|CLOUD_REGION|CLUSTER_MODE):\s(\S+)$/ && print "$2\n"' .gitlab-ci.yml)
  15. echo Gitlab-CI
  16. printf "|%20s|%20s|%20s|%20s|%20s\n" "Stage" "Network plugin" "OS type" "GCE region" "Nodes layout"
  17. echo "|--------------------|--------------------|--------------------|--------------------|--------------------|"
  18. c=0
  19. for i in `echo $a`; do
  20. printf "|%20s" $i
  21. [ $(($c % 5)) -eq 4 ] && printf "|\n"
  22. c=$(( c + 1))
  23. done