diff --git a/.travis.yml b/.travis.yml index 0e18f40..34cdabe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ dist: xenial # ubuntu 16.04 distro script: # runs only when PR is merged - make versionmaker + - make combineExpCR after_success: # runs only when PR is merged and push the version file to master version - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then make push; fi diff --git a/Makefile b/Makefile index 6398425..f81845a 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,12 @@ versionmaker: @echo "-----version maker-----" bash ./scripts/version_maker.sh +.PHONY: combineExpCR +combineExpCR: + @echo "--------Combining Experiments CR-------" + bash ./scripts/combine_all_cr.sh + .PHONY: push push: @echo "---------git push to master-------" - bash ./scripts/push.sh \ No newline at end of file + bash ./scripts/push.sh diff --git a/scripts/combine_all_cr.sh b/scripts/combine_all_cr.sh new file mode 100644 index 0000000..3c5356f --- /dev/null +++ b/scripts/combine_all_cr.sh @@ -0,0 +1,19 @@ +directories=$(find ./charts -maxdepth 1 -mindepth 1 -type d) +for directory in $directories +do + subDirectories=$(find $directory -maxdepth 1 -mindepth 1 -type d) + echo -e "---\n" > $directory/experiments.yaml + for subDirectory in $subDirectories + do + + if test -f "$subDirectory/experiment.yaml"; then + cat $subDirectory/experiment.yaml >> $directory/experiments.yaml + echo -e "\n---\n" >> $directory/experiments.yaml + fi + done +done +echo "validating combine charts for generic" +cat ./charts/generic/experiments.yaml +echo "validating combine charts for openebs" +cat ./charts/openebs/experiments.yaml +