Skip to content

Commit

Permalink
Merge pull request #1 from StackStorm/master
Browse files Browse the repository at this point in the history
Merge master
  • Loading branch information
bishopbm1 authored May 11, 2020
2 parents 9ea4173 + b542627 commit 3a13c58
Show file tree
Hide file tree
Showing 10 changed files with 1,096 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changelog
in development
--------------

Added
~~~~~
* Add make command to autogen JSON schema from the models of action, rule, etc. Add check
to ensure update to the models require schema to be regenerated. (new feature)

Fixed
~~~~~
* Fixed a bug where persisting Orquesta to the MongoDB database returned an error
Expand Down
23 changes: 22 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ configgen: requirements .configgen
echo "" >> conf/st2.conf.sample
. $(VIRTUALENV_DIR)/bin/activate; python ./tools/config_gen.py >> conf/st2.conf.sample;

.PHONY: schemasgen
schemasgen: requirements .schemasgen

.PHONY: .schemasgen
.schemasgen:
@echo
@echo "================== content model schemas gen ===================="
@echo
. $(VIRTUALENV_DIR)/bin/activate; python ./st2common/bin/st2-generate-schemas;

.PHONY: .pylint
.pylint:
@echo
Expand Down Expand Up @@ -1054,7 +1064,18 @@ ci-py3-integration: requirements .ci-prepare-integration .ci-py3-integration
cp st2common/st2common/openapi.yaml /tmp/openapi.yaml.upstream
make .generate-api-spec
diff st2common/st2common/openapi.yaml /tmp/openapi.yaml.upstream || (echo "st2common/st2common/openapi.yaml hasn't been re-generated and committed. Please run \"make generate-api-spec\" and include and commit the generated file." && exit 1)

# 3. Schemas for the content models - st2common/bin/st2-generate-schemas
cp contrib/schemas/pack.json /tmp/pack.json.upstream
cp contrib/schemas/action.json /tmp/action.json.upstream
cp contrib/schemas/alias.json /tmp/alias.json.upstream
cp contrib/schemas/policy.json /tmp/policy.json.upstream
cp contrib/schemas/rule.json /tmp/rule.json.upstream
make .schemasgen
diff contrib/schemas/pack.json /tmp/pack.json.upstream || (echo "contrib/schemas/pack.json hasn't been re-generated and committed. Please run \"make schemasgen\" and include and commit the generated file." && exit 1)
diff contrib/schemas/action.json /tmp/action.json.upstream || (echo "contrib/schemas/pack.json hasn't been re-generated and committed. Please run \"make schemasgen\" and include and commit the generated file." && exit 1)
diff contrib/schemas/alias.json /tmp/alias.json.upstream || (echo "contrib/schemas/pack.json hasn't been re-generated and committed. Please run \"make schemasgen\" and include and commit the generated file." && exit 1)
diff contrib/schemas/policy.json /tmp/policy.json.upstream || (echo "contrib/schemas/pack.json hasn't been re-generated and committed. Please run \"make schemasgen\" and include and commit the generated file." && exit 1)
diff contrib/schemas/rule.json /tmp/rule.json.upstream || (echo "contrib/schemas/pack.json hasn't been re-generated and committed. Please run \"make schemasgen\" and include and commit the generated file." && exit 1)
@echo "All automatically generated files are up to date."

.PHONY: ci-unit
Expand Down
Loading

0 comments on commit 3a13c58

Please sign in to comment.