Merge pull request #17 from shubhamchaudhary/combineCRs

Add[CI]: Combine Experiments CR
This commit is contained in:
Karthik Satchitanand
2019-10-03 18:20:40 +05:30
committed by GitHub
3 changed files with 26 additions and 1 deletions

View File

@@ -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

View File

@@ -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
bash ./scripts/push.sh

19
scripts/combine_all_cr.sh Normal file
View File

@@ -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