Update Gemfile and Makefile configuration
- One Gemfile for all formulas tests
- Update Makefile for OpenStack tests
Fixes: PROD-24408 (PROD:24408)
Change-Id: I83626604fcea27b792664adcb3be70d0470dc9c6
diff --git a/.travis.yml b/.travis.yml
index adb26a1..fee7bcb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,15 +16,9 @@
- pip install virtualenv
- pip install reno
- |
- test -e Gemfile || cat <<EOF > Gemfile
- source 'https://rubygems.org'
- gem 'rake'
- gem 'test-kitchen'
- gem 'kitchen-docker'
- gem 'kitchen-inspec'
- gem 'inspec', '<3.0.0'
- #Version was frozen, because of issues in the version of inspec >3.0.0 -- see https://mirantis.jira.com/browse/PROD-24324 for more info
- gem 'kitchen-salt' #, :git => 'https://github.com/salt-formulas/kitchen-salt.git'
+ if [ ! -e Gemfile ]; then
+ curl -s -o ./Gemfile 'https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas/salt-formulas-scripts.git;a=blob_plain;f=Gemfile;hb=refs/heads/master'
+ fi
- bundle install
env:
diff --git a/Makefile b/Makefile
index d0e6fa4..fb69046 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,11 @@
JOBS := 1
endif
+ifeq (,$(wildcard ./.kitchen.openstack.yml))
+KITCHEN_LOCAL_YAML?=.kitchen.openstack.yml
+else
KITCHEN_LOCAL_YAML?=.kitchen.yml
+endif
KITCHEN_OPTS?="--concurrency=$(JOBS)"
KITCHEN_OPTS_CREATE?=""
KITCHEN_OPTS_CONVERGE?=""
@@ -34,7 +38,6 @@
@echo "make release-major - Generate new major release"
@echo "make release-minor - Generate new minor release"
@echo "make changelog - Show changes since last release"
- @echo "make test-model-validate - Run salt jsonschema validation"
install:
# Formula
@@ -53,10 +56,6 @@
test:
[ ! -d tests ] || (cd tests; ./run_tests.sh)
-test-model-validate:
- # TODO make it actually fail
- [ ! -d $(FORMULANAME)/schemas/ ] || (cd tests; ./run_tests.sh model-validate)
-
release-major: check-changes
@echo "Current version is $(VERSION), new version is $(NEW_MAJOR_VERSION)"
@[ $(VERSION_MAJOR) != $(NEW_MAJOR_VERSION) ] || (echo "Major version $(NEW_MAJOR_VERSION) already released, nothing to do. Do you want release-minor?" && exit 1)
@@ -74,7 +73,7 @@
[ ! -f debian/changelog ] || dch -v $(VERSION_MAJOR).$(NEW_MINOR_VERSION) -m --force-distribution -D `dpkg-parsechangelog -S Distribution` "New version"
make genchangelog-$(VERSION_MAJOR).$(NEW_MINOR_VERSION)
(git add -u; git commit -m "Version $(VERSION_MAJOR).$(NEW_MINOR_VERSION)")
- git tag -s -m $(VERSION_MAJOR) $(VERSION_MAJOR).$(NEW_MINOR_VERSION)
+ git tag -s -m $(VERSION_MAJOR).$(NEW_MINOR_VERSION) $(VERSION_MAJOR).$(NEW_MINOR_VERSION)
check-changes:
@git log --pretty=oneline --decorate $(VERSION)..HEAD | grep -Eqc '.*' || (echo "No new changes since version $(VERSION)"; exit 1)