Merge pull request #17 from shubhamchaudhary/combineCRs
Add[CI]: Combine Experiments CR
This commit is contained in:
@@ -3,6 +3,7 @@ dist: xenial # ubuntu 16.04 distro
|
|||||||
script:
|
script:
|
||||||
# runs only when PR is merged
|
# runs only when PR is merged
|
||||||
- make versionmaker
|
- make versionmaker
|
||||||
|
- make combineExpCR
|
||||||
after_success:
|
after_success:
|
||||||
# runs only when PR is merged and push the version file to master version
|
# runs only when PR is merged and push the version file to master version
|
||||||
- if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then make push; fi
|
- if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then make push; fi
|
||||||
|
7
Makefile
7
Makefile
@@ -6,7 +6,12 @@ versionmaker:
|
|||||||
@echo "-----version maker-----"
|
@echo "-----version maker-----"
|
||||||
bash ./scripts/version_maker.sh
|
bash ./scripts/version_maker.sh
|
||||||
|
|
||||||
|
.PHONY: combineExpCR
|
||||||
|
combineExpCR:
|
||||||
|
@echo "--------Combining Experiments CR-------"
|
||||||
|
bash ./scripts/combine_all_cr.sh
|
||||||
|
|
||||||
.PHONY: push
|
.PHONY: push
|
||||||
push:
|
push:
|
||||||
@echo "---------git push to master-------"
|
@echo "---------git push to master-------"
|
||||||
bash ./scripts/push.sh
|
bash ./scripts/push.sh
|
||||||
|
19
scripts/combine_all_cr.sh
Normal file
19
scripts/combine_all_cr.sh
Normal 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
|
||||||
|
|
Reference in New Issue
Block a user