mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
Add tox target to detect schema changes
Fetches reference schema from public bucket Still need define method for updating reference schema on merge.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
# Ignore generated schema
|
# Ignore generated schema
|
||||||
swagger.json
|
swagger.json
|
||||||
schema.json
|
schema.json
|
||||||
|
reference-schema.json
|
||||||
|
|
||||||
# Tags
|
# Tags
|
||||||
.tags
|
.tags
|
||||||
|
|||||||
14
Makefile
14
Makefile
@@ -84,6 +84,11 @@ clean-venv:
|
|||||||
clean-dist:
|
clean-dist:
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
|
|
||||||
|
clean-schema:
|
||||||
|
rm -rf swagger.json
|
||||||
|
rm -rf schema.json
|
||||||
|
rm -rf reference-schema.json
|
||||||
|
|
||||||
# Remove temporary build files, compiled Python files.
|
# Remove temporary build files, compiled Python files.
|
||||||
clean: clean-ui clean-dist
|
clean: clean-ui clean-dist
|
||||||
rm -rf awx/public
|
rm -rf awx/public
|
||||||
@@ -566,6 +571,15 @@ docker-compose-runtest:
|
|||||||
docker-compose-build-swagger:
|
docker-compose-build-swagger:
|
||||||
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /start_tests.sh swagger
|
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /start_tests.sh swagger
|
||||||
|
|
||||||
|
docker-compose-genschema:
|
||||||
|
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /start_tests.sh genschema
|
||||||
|
mv swagger.json schema.json
|
||||||
|
|
||||||
|
docker-compose-validate-schema:
|
||||||
|
$(MAKE) docker-compose-genschema
|
||||||
|
curl https://s3.amazonaws.com/awx-public-ci-files/schema.json -o reference-schema.json
|
||||||
|
diff -u schema.json reference-schema.json
|
||||||
|
|
||||||
docker-compose-clean:
|
docker-compose-clean:
|
||||||
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm -w /awx_devel --service-ports awx make clean
|
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm -w /awx_devel --service-ports awx make clean
|
||||||
cd tools && TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose rm -sf
|
cd tools && TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose rm -sf
|
||||||
|
|||||||
8
tox.ini
8
tox.ini
@@ -6,6 +6,7 @@ envlist =
|
|||||||
api,
|
api,
|
||||||
ui,
|
ui,
|
||||||
swagger,
|
swagger,
|
||||||
|
validate-schema,
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
;basepython = python2.7
|
;basepython = python2.7
|
||||||
@@ -71,3 +72,10 @@ deps =
|
|||||||
commands =
|
commands =
|
||||||
make docker-compose-build
|
make docker-compose-build
|
||||||
make docker-compose-build-swagger
|
make docker-compose-build-swagger
|
||||||
|
|
||||||
|
[testenv:validate-schema]
|
||||||
|
deps =
|
||||||
|
nodeenv
|
||||||
|
commands =
|
||||||
|
make docker-compose-build
|
||||||
|
make docker-compose-validate-schema
|
||||||
|
|||||||
Reference in New Issue
Block a user