Skip to content

Commit

Permalink
Switch environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kchason committed Aug 25, 2023
1 parent fe844d8 commit ef79a0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY entrypoint.py /opt/workspace/entrypoint.py
# Define the base path for the validation path
ENV CASE_PATH "/opt/json/"
ENV CASE_VERSION "case-1.2.0"
ENV CASE_FILTER_EXTENSION ""
ENV CASE_EXTENSION_FILTER ""
ENV CASE_VALIDATE_ABORT "false"

# Define the command to run the entrypoint.py script that will detect the type
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The environment variables are defined below in the "Inputs" table, and the below
docker run --rm \
-e CASE_PATH="/opt/case/" \
-e CASE_VERSION="case-1.2.0" \
-e CASE_FILTER_EXTENSION="jsonld" \
-e CASE_EXTENSION_FILTER="jsonld" \
-v "/path/to/local:/opt/case" \
kchason/case-validator:latest
```
Expand All @@ -56,7 +56,7 @@ Example usage and documentation are available in a demo project on GitLab at [ht
| ---------------- |-----------------------| ------------------------------------------------------------ | ---------------------------------- | ------------ |
| case-path | CASE_PATH | The path to the file or directory to be validated. | Any | /opt/json |
| case-version | CASE_VERSION | The version of the ontology against which the graph should be validatated. | "none", "case-0.5.0", "case-0.6.0" , "case-0.7.0", "case-0.7.1", "case-1.0.0", "case-1.1.0", "case-1.2.0" | "case-1.2.0" |
| extension-filter | CASE_FILTER_EXTENSION | The extension of only the files against which the validator should be run. Eg. `"json"`, `"jsonld"`, `"case"`. Defaults to `""` to run against all files defined in `case-path`. | Any | "" |
| extension-filter | CASE_EXTENSION_FILTER | The extension of only the files against which the validator should be run. Eg. `"json"`, `"jsonld"`, `"case"`. Defaults to `""` to run against all files defined in `case-path`. | Any | "" |
| abort | CASE_VALIDATE_ABORT | Whether to abort the validator on the first failure | "true", "false" | "false" |

## Example Output
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
os.environ.get("CASE_VALIDATE_ABORT", "false").lower() == "true"
) # noqa: E501
case_path: str = os.environ.get("CASE_PATH", "/opt/json/")
extension_filter: str = os.environ.get("CASE_FILTER_EXTENSION", "")
extension_filter: str = os.environ.get("CASE_EXTENSION_FILTER", "")

# Determine if the provided path is a directory. If so, then there is filtering
# and other handling to address. If it is a file, then it is assumed it should
Expand Down

0 comments on commit ef79a0b

Please sign in to comment.