-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from folio-org/Initial
Initial service commit
- Loading branch information
Showing
55 changed files
with
3,436 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# http://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
continuation_indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: api-doc | ||
|
||
# https://dev.folio.org/guides/api-doc/ | ||
|
||
# API_TYPES: string: The space-separated list of types to consider. | ||
# One or more of 'RAML OAS'. | ||
# e.g. 'OAS' | ||
# | ||
# API_DIRECTORIES: string: The space-separated list of directories to search | ||
# for API description files. | ||
# e.g. 'src/main/resources/openapi' | ||
# NOTE: -- Also add each separate path to each of the "on: paths:" sections. | ||
# e.g. 'src/main/resources/openapi/**' | ||
# | ||
# API_EXCLUDES: string: The space-separated list of directories and files | ||
# to exclude from traversal, in addition to the default exclusions. | ||
# e.g. '' | ||
|
||
env: | ||
API_TYPES: 'OAS' | ||
API_DIRECTORIES: 'src/main/resources/openapi' | ||
API_EXCLUDES: '' | ||
OUTPUT_DIR: 'folio-api-docs' | ||
AWS_S3_BUCKET: 'foliodocs' | ||
AWS_S3_FOLDER: 'api' | ||
AWS_S3_REGION: 'us-east-1' | ||
AWS_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} | ||
AWS_S3_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }} | ||
|
||
on: | ||
push: | ||
branches: [ main, master ] | ||
paths: | ||
- 'src/main/resources/openapi/**' | ||
tags: '[vV][0-9]+.[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
api-doc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.REF }} | ||
submodules: recursive | ||
- name: Prepare folio-tools | ||
run: | | ||
git clone https://github.com/folio-org/folio-tools | ||
cd folio-tools/api-doc \ | ||
&& yarn install \ | ||
&& pip3 install -r requirements.txt | ||
- name: Obtain version if release tag | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
run: | | ||
version=$(echo ${GITHUB_REF#refs/tags/[vV]} | awk -F'.' '{ printf("%d.%d", $1, $2) }') | ||
echo "VERSION_MAJ_MIN=${version}" >> $GITHUB_ENV | ||
- name: Set some vars | ||
run: | | ||
echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | ||
- name: Report some info | ||
run: | | ||
echo "REPO_NAME=${{ env.REPO_NAME }}" | ||
- name: Do api-doc | ||
run: | | ||
if test -n "${{ env.VERSION_MAJ_MIN }}"; then | ||
echo "Docs for release version ${{ env.VERSION_MAJ_MIN }}" | ||
option_release=$(echo "--version ${{ env.VERSION_MAJ_MIN }}") | ||
else | ||
option_release="" | ||
fi | ||
python3 folio-tools/api-doc/api_doc.py \ | ||
--loglevel info \ | ||
--types ${{ env.API_TYPES }} \ | ||
--directories ${{ env.API_DIRECTORIES }} \ | ||
--excludes ${{ env.API_EXCLUDES }} \ | ||
--output ${{ env.OUTPUT_DIR }} $option_release | ||
- name: Show generated files | ||
working-directory: ${{ env.OUTPUT_DIR }} | ||
run: ls -R | ||
- name: Publish to AWS S3 | ||
uses: sai-sharan/[email protected] | ||
with: | ||
access_key: ${{ env.AWS_S3_ACCESS_KEY_ID }} | ||
secret_access_key: ${{ env.AWS_S3_ACCESS_KEY }} | ||
region: ${{ env.AWS_S3_REGION }} | ||
source: ${{ env.OUTPUT_DIR }} | ||
destination_bucket: ${{ env.AWS_S3_BUCKET }} | ||
destination_prefix: ${{ env.AWS_S3_FOLDER }} | ||
delete: false | ||
quiet: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: api-lint | ||
|
||
# https://dev.folio.org/guides/api-lint/ | ||
|
||
# API_TYPES: string: The space-separated list of types to consider. | ||
# One or more of 'RAML OAS'. | ||
# e.g. 'OAS' | ||
# | ||
# API_DIRECTORIES: string: The space-separated list of directories to search | ||
# for API description files. | ||
# e.g. 'src/main/resources/openapi' | ||
# NOTE: -- Also add each separate path to each of the "on: paths:" sections. | ||
# e.g. 'src/main/resources/openapi/**' | ||
# | ||
# API_EXCLUDES: string: The space-separated list of directories and files | ||
# to exclude from traversal, in addition to the default exclusions. | ||
# e.g. '' | ||
# | ||
# API_WARNINGS: boolean: Whether to cause Warnings to be displayed, | ||
# and to fail the workflow. | ||
# e.g. false | ||
|
||
env: | ||
API_TYPES: 'OAS' | ||
API_DIRECTORIES: 'src/main/resources/openapi' | ||
API_EXCLUDES: '' | ||
API_WARNINGS: false | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'src/main/resources/openapi/**' | ||
pull_request: | ||
paths: | ||
- 'src/main/resources/openapi/**' | ||
|
||
jobs: | ||
api-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Prepare folio-tools | ||
run: | | ||
git clone https://github.com/folio-org/folio-tools | ||
cd folio-tools/api-lint \ | ||
&& yarn install \ | ||
&& pip3 install -r requirements.txt | ||
- name: Configure default options | ||
run: | | ||
echo "OPTION_WARNINGS=''" >> $GITHUB_ENV | ||
- name: Configure option warnings | ||
if: ${{ env.API_WARNINGS == 'true' }} | ||
run: | | ||
echo "OPTION_WARNINGS=--warnings" >> $GITHUB_ENV | ||
- name: Do api-lint | ||
run: | | ||
python3 folio-tools/api-lint/api_lint.py \ | ||
--loglevel info \ | ||
--types ${{ env.API_TYPES }} \ | ||
--directories ${{ env.API_DIRECTORIES }} \ | ||
--excludes ${{ env.API_EXCLUDES }} \ | ||
${{ env.OPTION_WARNINGS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: api-schema-lint | ||
|
||
# https://dev.folio.org/guides/describe-schema/ | ||
|
||
# API_DIRECTORIES: string: The space-separated list of directories to search | ||
# for JSON Schema files. | ||
# e.g. 'src/main/resources/openapi' | ||
# NOTE: -- Also add each separate path to each of the "on: paths:" sections. | ||
# e.g. 'src/main/resources/openapi/**' | ||
# | ||
# API_EXCLUDES: string: The space-separated list of directories and files | ||
# to exclude from traversal, in addition to the default exclusions. | ||
# e.g. '' | ||
|
||
env: | ||
API_DIRECTORIES: 'src/main/resources/openapi' | ||
API_EXCLUDES: '' | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'src/main/resources/openapi/**' | ||
pull_request: | ||
paths: | ||
- 'src/main/resources/openapi/**' | ||
|
||
jobs: | ||
api-schema-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Prepare folio-tools | ||
run: | | ||
git clone https://github.com/folio-org/folio-tools | ||
cd folio-tools/api-schema-lint \ | ||
&& yarn install \ | ||
&& pip3 install -r requirements.txt | ||
- name: Do api-schema-lint | ||
run: | | ||
python3 folio-tools/api-schema-lint/api_schema_lint.py \ | ||
--loglevel info \ | ||
--directories ${{ env.API_DIRECTORIES }} \ | ||
--excludes ${{ env.API_EXCLUDES }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.idea/ | ||
target/ | ||
.vscode/ | ||
*.code-workspace | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Contribution guidelines | ||
|
||
Guidelines for Contributing Code: | ||
[dev.folio.org/guidelines/contributing](https://dev.folio.org/guidelines/contributing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM folioci/alpine-jre-openjdk17:latest | ||
|
||
ENV VERTICLE_FILE mod-batch-print-fat.jar | ||
|
||
# Set the location of the verticles | ||
ENV VERTICLE_HOME /usr/verticles | ||
|
||
# Copy your fat jar to the container | ||
COPY target/${VERTICLE_FILE} ${VERTICLE_HOME}/${VERTICLE_FILE} | ||
|
||
# Expose this port locally in the container. | ||
EXPOSE 8081 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
buildMvn { | ||
publishModDescriptor = true | ||
mvnDeploy = true | ||
buildNode = 'jenkins-agent-java17' | ||
|
||
doDocker = { | ||
buildJavaDocker { | ||
publishMaster = true | ||
healthChk = true | ||
healthChkCmd = 'wget --no-verbose --tries=1 --spider http://localhost:8081/admin/health || exit 1' | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Module acceptance criteria for `mod-batch-print` | ||
|
||
## How to use this form | ||
When performing a technical evaluation of a module, create a copy of this document and use the conventions below to indicate the status of each criterion. The evaluation results should be placed in the [module_evaluations](https://github.com/folio-org/tech-council/tree/master/module_evaluations) directory and should conform to the following naming convention: `{JIRA Key}_YYYY-MM-DD.MD`, e.g. `TCR-1_2021-11-17.MD`. The date here is used to differentiate between initial and potential re-evaluation(s). It should be the date when the evaluation results file was created. | ||
|
||
* [ ] ACCEPTABLE | ||
* [ ] ~INAPPLICABLE~ | ||
* [ ] UNACCEPTABLE | ||
* comments on what was evaluated/not evaluated, why a criterion failed | ||
|
||
## [Criteria](https://github.com/folio-org/tech-council/blob/7b10294a5c1c10c7e1a7c5b9f99f04bf07630f06/MODULE_ACCEPTANCE_CRITERIA.MD) | ||
|
||
## Shared/Common | ||
* [ ] Uses Apache 2.0 license | ||
* [ ] Module build MUST produce a valid module descriptor | ||
* [ ] Module descriptor MUST include interface requirements for all consumed APIs | ||
* [ ] Third party dependencies use an Apache 2.0 compatible license | ||
* [ ] Installation documentation is included | ||
* -_note: read more at https://github.com/folio-org/mod-search/blob/master/README.md_ | ||
* [ ] Personal data form is completed, accurate, and provided as `PERSONAL_DATA_DISCLOSURE.md` file | ||
* [ ] Sensitive and environment-specific information is not checked into git repository | ||
* [ ] Module is written in a language and framework from the [officially approved technologies](https://wiki.folio.org/display/TC/Officially+Supported+Technologies) page | ||
* [ ] Module only uses FOLIO interfaces already provided by previously accepted modules _e.g. a UI module cannot be accepted that relies on an interface only provided by a back end module that hasn't been accepted yet_ | ||
* [ ] Module gracefully handles the absence of third party systems or related configuration | ||
* [ ] Sonarqube hasn't identified any security issues, major code smells or excessive (>3%) duplication | ||
* [ ] Uses [officially supported](https://wiki.folio.org/display/TC/Officially+Supported+Technologies) build tools | ||
* [ ] Unit tests have 80% coverage or greater, and are based on [officially approved technologies](https://wiki.folio.org/display/TC/Officially+Supported+Technologies) | ||
|
||
## Backend | ||
* [ ] Module's repository includes a compliant Module Descriptor | ||
* -_note: read more at https://github.com/folio-org/okapi/blob/master/okapi-core/src/main/raml/ModuleDescriptor.json_ | ||
* [ ] Environment vars are documented in the ModuleDescriptor | ||
* -_note: read more at [https://wiki.folio.org/pages/viewpage.action?pageId=65110683](https://wiki.folio.org/pages/viewpage.action?pageId=65110683)_ | ||
* [ ] If a module provides interfaces intended to be consumed by other FOLIO Modules, they must be defined in the Module Descriptor "provides" section | ||
* [ ] All API endpoints are documented in RAML or OpenAPI | ||
* [ ] All API endpoints protected with appropriate permissions as per the following guidelines and recommendations, e.g. avoid using `*.all` permissions, all necessary module permissions are assigned, etc. | ||
* -_note: read more at https://dev.folio.org/guidelines/naming-conventions/ and https://wiki.folio.org/display/DD/Permission+Set+Guidelines_ | ||
* [ ] Module provides reference data (if applicable), e.g. if there is a controlled vocabulary where the module requires at least one value | ||
* [ ] If provided, integration (API) tests must be written in an [officially approved technology](https://wiki.folio.org/display/TC/Officially+Supported+Technologies) | ||
* -_note: while it's strongly recommended that modules implement integration tests, it's not a requirement_ | ||
* -_note: these tests are defined in https://github.com/folio-org/folio-integration-tests_ | ||
* [ ] Data is segregated by tenant at the storage layer | ||
* [ ] The module doesn't access data in DB schemas other than its own and public | ||
* [ ] The module responds with a tenant's content based on x-okapi-tenant header | ||
* [ ] Standard GET `/admin/health` endpoint returning a 200 response | ||
* -_note: read more at https://wiki.folio.org/display/DD/Back+End+Module+Health+Check+Protocol_ | ||
* [ ] High Availability (HA) compliant | ||
* Possible red flags: | ||
* Connection affinity / sticky sessions / etc. are used | ||
* Local container storage is used | ||
* Services are stateful | ||
* [ ] Module only uses infrastructure / platform technologies on the [officially approved technologies](https://wiki.folio.org/display/TC/Officially+Supported+Technologies) list. | ||
* _e.g. PostgreSQL, ElasticSearch, etc._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## 1.0.0 ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## Overview | ||
The purpose of this form is to disclose the types of personal data stored by each module. This information enables those hosting FOLIO to better manage and comply with various privacy laws and restrictions, e.g. GDPR. | ||
|
||
It's important to note that personal data is not limited to that which can be used to identify a person on it's own (e.g. Social security number), but also data used in conjunction with other data to identify a person (e.g. date of birth + city + gender). | ||
|
||
For the purposes of this form, "store" includes the following: | ||
* Persisting to storage - Either internal (e.g. Postgres) or external (e.g. S3, etc.) to FOLIO | ||
* Caching - In-memory, etc. | ||
* Logging | ||
* Sending to an external piece of infrastructure such as a queue (e.g. Kafka), search engine (e.g. Elasticsearch), distributed table, etc. | ||
|
||
## Personal Data Stored by This Module | ||
- [ ] This module does not store any personal data. | ||
- [ ] This module provides [custom fields](https://github.com/folio-org/folio-custom-fields). | ||
- [x] This module stores fields with free-form text (tags, notes, descriptions, etc.) | ||
- [ ] This module caches personal data | ||
--- | ||
- [x] First name | ||
- [x] Last name | ||
- [x] Middle name | ||
- [ ] Pseudonym / Alias / Nickname / Username / User ID | ||
- [ ] Gender | ||
- [ ] Date of birth | ||
- [ ] Place of birth | ||
- [ ] Racial or ethnic origin | ||
- [x] Address | ||
- [ ] Location information | ||
- [ ] Phone numbers | ||
- [ ] Passport number / National identification numbers | ||
- [ ] Driver’s license number | ||
- [ ] Social security number | ||
- [ ] Email address | ||
- [ ] Web cookies | ||
- [ ] IP address | ||
- [ ] Geolocation data | ||
- [ ] Financial information | ||
- [ ] Logic or algorithms used to build a user/profile | ||
- [ ] User search queries | ||
<!--- - [ ] Other personal data - Please list as needed --> | ||
<!--- - [ ] Other personal data - Please list as needed --> | ||
|
||
**NOTE** This is not intended to be a comprehensive list, but instead provide a starting point for module developers/maintainers to use. | ||
|
||
## Privacy Laws, Regulations, and Policies | ||
The following laws and policies were considered when creating the list of personal data fields above. | ||
* [General Data Protection Regulation (GDPR)](https://gdpr.eu/) | ||
* [California Consumer Privacy Act (CCPA)](https://oag.ca.gov/privacy/ccpa) | ||
* [U.S. Department of Labor: Guidance on the Protection of Personal Identifiable Information](https://www.dol.gov/general/ppii) | ||
* Cybersecurity Law of the People's Republic of China | ||
* https://www.newamerica.org/cybersecurity-initiative/digichina/blog/translation-cybersecurity-law-peoples-republic-china/ | ||
* http://en.east-concord.com/zygd/Article/20203/ArticleContent_1690.html?utm_source=Mondaq&utm_medium=syndication&utm_campaign=LinkedIn-integration | ||
* [Personal Data Protection Bill, 2019 (India)](https://www.prsindia.org/billtrack/personal-data-protection-bill-2019) | ||
* [Data protection act 2018 (UK)](https://www.legislation.gov.uk/ukpga/2018/12/section/3/enacted) | ||
|
||
--- | ||
|
||
v1.0 |
Oops, something went wrong.