web-api-commander/doc/Docker.md

52 lines
2.2 KiB
Markdown
Raw Normal View History

# RESO Commander and Docker
#94 Added Testing Rules for the Lookup Resource (#108) * Updated odata-openapi commit * Update odata-openapi submodule * Issue #94: Initial addition of Lookup resoruce tests * Issue #94: added Cucumber BDD for Lookup Resource and stubs for gluecode * Issue #94: Added Lookup Replication Tests * Updated .gitignore * Issue #94: Retrieve data using fetch api * Issue #94: Added timestamp query replication strategy * Issue #94: Added timestamp query replication strategy for asc * Issue #94: Add relevant annotation and metadata cache tests * Issue #94: Added required annotation and lookup name testing in the lookup resource for standard fields * Issue #94: WARN when empty LookupName items are found * Issue #94: update to use TopAndSkip replication strategy instead * Issue #94: Changed fail to warn when lookup name not present. Changed DataAvailability to use the in-container cache. * Issue #94: separated the required annotation check from lookup name checks in the lookup data * Issue #94: Lookup Resource Cleanup * Issue #105: Add fast-fail behavior to all XML Metadata validation steps * Added better page handling and logging for sampling * Issue #94: move annotation reader to common utils * Issue #94: added JSON Serializer * Issue #94: Lookups JSON serializer * Issue #94: Refactored utils into ODataUtils, separated functions * Issue #94: Refactored ODataUtils to use Optional, and added comments * Issue #94: further conversion to optional * Issue #94: created new json serializers * #94: Intermediate commit * #94: updated sampling strategy * #107: Added support for OriginatingSystemName and OriginatingSystemID * Updated Docker instructions in the README * #106: updated docker README * Issue #94: annotated lookup field serializer * Issue #94: adding parallel stream logic * #94: merge main
2022-07-08 10:10:14 -04:00
RESO automated testing tools and Commander utilities can both be run in a Docker containers.
The containers are slightly different in each case.
#94 Added Testing Rules for the Lookup Resource (#108) * Updated odata-openapi commit * Update odata-openapi submodule * Issue #94: Initial addition of Lookup resoruce tests * Issue #94: added Cucumber BDD for Lookup Resource and stubs for gluecode * Issue #94: Added Lookup Replication Tests * Updated .gitignore * Issue #94: Retrieve data using fetch api * Issue #94: Added timestamp query replication strategy * Issue #94: Added timestamp query replication strategy for asc * Issue #94: Add relevant annotation and metadata cache tests * Issue #94: Added required annotation and lookup name testing in the lookup resource for standard fields * Issue #94: WARN when empty LookupName items are found * Issue #94: update to use TopAndSkip replication strategy instead * Issue #94: Changed fail to warn when lookup name not present. Changed DataAvailability to use the in-container cache. * Issue #94: separated the required annotation check from lookup name checks in the lookup data * Issue #94: Lookup Resource Cleanup * Issue #105: Add fast-fail behavior to all XML Metadata validation steps * Added better page handling and logging for sampling * Issue #94: move annotation reader to common utils * Issue #94: added JSON Serializer * Issue #94: Lookups JSON serializer * Issue #94: Refactored utils into ODataUtils, separated functions * Issue #94: Refactored ODataUtils to use Optional, and added comments * Issue #94: further conversion to optional * Issue #94: created new json serializers * #94: Intermediate commit * #94: updated sampling strategy * #107: Added support for OriginatingSystemName and OriginatingSystemID * Updated Docker instructions in the README * #106: updated docker README * Issue #94: annotated lookup field serializer * Issue #94: adding parallel stream logic * #94: merge main
2022-07-08 10:10:14 -04:00
### RESO Automated Testing Tools
A [GradleDockerfile](../GradleDockerfile) has been provided in order to prepare a Gradle
environment for the Commander. The container builds itself from the main branch of the source code, so you don't need
the entire repo checked out locally, just the file.
#94 Added Testing Rules for the Lookup Resource (#108) * Updated odata-openapi commit * Update odata-openapi submodule * Issue #94: Initial addition of Lookup resoruce tests * Issue #94: added Cucumber BDD for Lookup Resource and stubs for gluecode * Issue #94: Added Lookup Replication Tests * Updated .gitignore * Issue #94: Retrieve data using fetch api * Issue #94: Added timestamp query replication strategy * Issue #94: Added timestamp query replication strategy for asc * Issue #94: Add relevant annotation and metadata cache tests * Issue #94: Added required annotation and lookup name testing in the lookup resource for standard fields * Issue #94: WARN when empty LookupName items are found * Issue #94: update to use TopAndSkip replication strategy instead * Issue #94: Changed fail to warn when lookup name not present. Changed DataAvailability to use the in-container cache. * Issue #94: separated the required annotation check from lookup name checks in the lookup data * Issue #94: Lookup Resource Cleanup * Issue #105: Add fast-fail behavior to all XML Metadata validation steps * Added better page handling and logging for sampling * Issue #94: move annotation reader to common utils * Issue #94: added JSON Serializer * Issue #94: Lookups JSON serializer * Issue #94: Refactored utils into ODataUtils, separated functions * Issue #94: Refactored ODataUtils to use Optional, and added comments * Issue #94: further conversion to optional * Issue #94: created new json serializers * #94: Intermediate commit * #94: updated sampling strategy * #107: Added support for OriginatingSystemName and OriginatingSystemID * Updated Docker instructions in the README * #106: updated docker README * Issue #94: annotated lookup field serializer * Issue #94: adding parallel stream logic * #94: merge main
2022-07-08 10:10:14 -04:00
This can also be used in CI/CD environments such as Jenkins or TravisCI.
Run the RESO Certification tests in a Docker container locally by issuing one of the following commands.
Docker must be running on your local machine.
One way to do this is to build the container first and then run it:
```docker build --file GradleDockerfile -t web-api-commander-gradle .```
Once the container is built, you can use the Gradle commands normally with:
```docker run -it web-api-commander-gradle testWebApiCore_2_0_0 -DpathToRESOScript=/home/gradle/project/resoscripts/your.resoscript -DshowResponses=true```
You can also build the container on the fly:
```docker run --rm -it -v "$PWD":/home/gradle/project -v /path/to/your/resoscripts:/home/gradle/project/resoscripts -w /home/gradle/project -it $(docker build -f GradleDockerfile -q .) testWebApiCore_2_0_0 -DpathToRESOScript=/home/gradle/project/resoscripts/your.resoscript -DshowResponses=true```
Note that this will create a directory in your home directory for the project, and build artifacts and the log will be placed in that directory,
which is also where you will end up after runtime.
You may need to adjust the path separators if using Windows.
### Commander Utilities
A [Dockerfile](../Dockerfile) has also been provided to Dockerize the application for Commander utilities.
To run the Commander utilities, use the following commands:
```
$ docker build -t web-api-commander .
```
The usage for the docker container is the same for `web-api-commander.jar` presented above.
```
$ docker run -it web-api-commander --help
```
If you have input files you may need to mount your filesystem into the docker container
```
$ docker run -it -v $PWD:/app web-api-commander --validateMetadata --inputFile <pathInContainer>
```