From ccb6c90731fca914e8cc63992021bdc03955d150 Mon Sep 17 00:00:00 2001 From: shubhamchaudhary Date: Thu, 3 Oct 2019 13:51:22 +0530 Subject: [PATCH] CI combine file Signed-off-by: shubhamchaudhary --- .travis.yml | 1 + Makefile | 7 ++++++- scripts/merge_all_cr.sh | 12 ++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 scripts/merge_all_cr.sh diff --git a/.travis.yml b/.travis.yml index 0e18f40..64c5073 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 mergeExpCR 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..b02cb78 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,12 @@ versionmaker: @echo "-----version maker-----" bash ./scripts/version_maker.sh +.PHONY: mergeExpCR +push: + @echo "--------merging experiment Crs-------" + bash ./scripts/merge_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/merge_all_cr.sh b/scripts/merge_all_cr.sh new file mode 100644 index 0000000..7b2f995 --- /dev/null +++ b/scripts/merge_all_cr.sh @@ -0,0 +1,12 @@ +directories=$(ls -l ../charts/ | grep ^d | awk '{print $9}') +for directory in $directories +do + echo -e "---\n" > ../charts/$directory/experiments.yaml + subDirectories=$(ls -l ../charts/$directory | grep ^d | awk '{print $9}') + for subDirectory in $subDirectories + do + cat ../charts/$directory/$subDirectory/experiment.yaml >> ../charts/$directory/experiments.yaml + echo -e "\n---\n" >> ../charts/$directory/experiments.yaml + done +done +