-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/download_data
# Conflicts: # src/main/java/eu/europa/ec/dgc/businessrule/DgcBusinessRuleServiceApplication.java # src/main/java/eu/europa/ec/dgc/businessrule/config/DgcConfigProperties.java # src/main/java/eu/europa/ec/dgc/businessrule/config/ErrorHandler.java # src/main/java/eu/europa/ec/dgc/businessrule/config/OpenApiConfig.java # src/main/java/eu/europa/ec/dgc/businessrule/config/SchedulerConfig.java # src/main/java/eu/europa/ec/dgc/businessrule/config/ShedLockConfig.java # src/main/java/eu/europa/ec/dgc/businessrule/entity/BusinessRuleEntity.java # src/main/java/eu/europa/ec/dgc/businessrule/entity/CountryListEntity.java # src/main/java/eu/europa/ec/dgc/businessrule/entity/ShedlockEntity.java # src/main/java/eu/europa/ec/dgc/businessrule/entity/ValueSetEntity.java # src/main/java/eu/europa/ec/dgc/businessrule/exception/DgcaBusinessRulesResponseException.java # src/main/java/eu/europa/ec/dgc/businessrule/repository/BusinessRuleRepository.java # src/main/java/eu/europa/ec/dgc/businessrule/repository/CountryListRepository.java # src/main/java/eu/europa/ec/dgc/businessrule/repository/ValueSetRepository.java # src/main/java/eu/europa/ec/dgc/businessrule/restapi/controller/BusinessRuleController.java # src/main/java/eu/europa/ec/dgc/businessrule/restapi/controller/CountryListController.java # src/main/java/eu/europa/ec/dgc/businessrule/restapi/controller/ValueSetController.java # src/main/java/eu/europa/ec/dgc/businessrule/restapi/dto/BusinessRuleListItemDto.java # src/main/java/eu/europa/ec/dgc/businessrule/restapi/dto/ProblemReportDto.java # src/main/java/eu/europa/ec/dgc/businessrule/restapi/dto/ValueSetListItemDto.java # src/main/java/eu/europa/ec/dgc/businessrule/service/BusinessRuleService.java # src/main/java/eu/europa/ec/dgc/businessrule/service/CountryListService.java # src/main/java/eu/europa/ec/dgc/businessrule/service/ValueSetService.java # src/main/java/eu/europa/ec/dgc/businessrule/utils/BusinessRulesUtils.java # src/main/resources/application.yml # src/main/resources/db/changelog/init_tables.xml # src/test/java/eu/europa/ec/dgc/businessrule/OpenApiTest.java # src/test/java/eu/europa/ec/dgc/businessrule/restapi/controller/CountryListControllerIntegrationTest.java # templates/file-header.txt
- Loading branch information
Showing
17 changed files
with
563 additions
and
7 deletions.
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,43 @@ | ||
--- | ||
name: "\U0001F6A8 Bug" | ||
about: Did you come across a bug or unexpected behaviour differing from the docs? | ||
labels: bug | ||
--- | ||
|
||
<!-- | ||
Thanks for reporting a bug! | ||
Before opening a new issue, please make sure that we do not have any duplicates already open. | ||
You can ensure this by searching the issue list for this repository. | ||
If there is a duplicate, please close your issue and add a comment to the existing issue instead. | ||
--> | ||
|
||
## Describe the bug | ||
|
||
<!-- Describe your issue, but please be descriptive! Thanks again --> | ||
|
||
## Expected behaviour | ||
|
||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
## Steps to reproduce the issue | ||
|
||
<!-- include screenshots, logs, code or other info to help explain your problem --> | ||
|
||
<!-- | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
--> | ||
|
||
## Technical details | ||
|
||
- Host Machine OS (Windows/Linux/Mac): | ||
|
||
## Possible Fix | ||
|
||
<!-- Not obligatory, but suggest a fix or reason for the bug --> | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context about the problem here. --> |
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,31 @@ | ||
--- | ||
name: "\U0001F381 Feature Request" | ||
about: Do you have an idea for a new feature? | ||
labels: feature request | ||
--- | ||
|
||
<!-- | ||
Thanks for requesting a feature! | ||
Before opening a new issue, please make sure that we do not have any duplicates already open. | ||
You can ensure this by searching the issue list for this repository. | ||
If there is a duplicate, please close your issue and add a comment to the existing issue instead. | ||
--> | ||
|
||
## Feature description | ||
|
||
<!-- | ||
Provide a detailed description of the feature or improvement you are proposing. | ||
What specific solution would you like? What is the expected behaviour? | ||
Add any other context, screenshots, or code snippets about the feature request here as well. | ||
--> | ||
|
||
## Problem and motivation | ||
|
||
<!-- | ||
Why is this change important to you? What is the problem this feature would solve? | ||
How would you use it? How can it benefit other users? | ||
--> | ||
|
||
## Is this something you're interested in working on | ||
|
||
<!-- Yes or No --> |
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,30 @@ | ||
--- | ||
name: "\u23F1\uFE0F Enhancement" | ||
about: Do you have an idea for an enhancement? | ||
labels: enhancement | ||
--- | ||
|
||
<!-- | ||
Thanks for proposing an enhancement! | ||
Before opening a new issue, please make sure that we do not have any duplicates already open. | ||
You can ensure this by searching the issue list for this repository. | ||
If there is a duplicate, please close your issue and add a comment to the existing issue instead. | ||
--> | ||
|
||
## Current Implementation | ||
|
||
<!-- Describe or point to the current implementation that you would like to see improved --> | ||
|
||
## Suggested Enhancement | ||
|
||
<!-- | ||
Outline the idea of your enhancement, by e.g., describing the algorithm you propose. | ||
You can also create a Pull Request to outline your idea | ||
--> | ||
|
||
## Expected Benefits | ||
|
||
<!-- | ||
Summarize how your enhancement could aid the implementation (performance, readability, memory consumption, battery consumption, etc.). | ||
Please also back up with measurements or give detailed explanations for reduced runtime, memory consumption, 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,20 @@ | ||
--- | ||
name: "\U00002753 Question" | ||
about: If you have questions about pieces of the code or documentation for this component, please post them here. | ||
labels: question | ||
--- | ||
|
||
<!-- | ||
Thanks for submitting your question! | ||
Before opening a new issue, please make sure that we do not have any duplicates already open. | ||
You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead. | ||
Also, please, have a look at our FAQs and existing questions before opening a new question. | ||
--> | ||
|
||
## Your Question | ||
|
||
<!-- Include details about your question. --> | ||
|
||
* Source File: | ||
* Line(s): | ||
* Question: |
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,40 @@ | ||
name: ci-dependency-check | ||
on: | ||
schedule: | ||
- cron: '0 1 * * 0' # Each Sunday at 01:00 UTC | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | ||
- name: version | ||
run: |- | ||
APP_SHA=$(git rev-parse --short ${GITHUB_SHA}) | ||
APP_LATEST_REV=$(git rev-list --tags --max-count=1) | ||
APP_LATEST_TAG=$(git describe --tags ${APP_LATEST_REV} 2> /dev/null || echo 0.0.0) | ||
echo "APP_VERSION=${APP_LATEST_TAG}-${APP_SHA}" >> ${GITHUB_ENV} | ||
- name: mvn | ||
run: |- | ||
mvn dependency-check:check \ | ||
--batch-mode \ | ||
--file ./pom.xml \ | ||
--settings ./settings.xml \ | ||
--define app.packages.username="${APP_PACKAGES_USERNAME}" \ | ||
--define app.packages.password="${APP_PACKAGES_PASSWORD}" \ | ||
env: | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
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,37 @@ | ||
name: ci-deploy | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
required: true | ||
description: Version to deploy | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-20.04 | ||
environment: dev | ||
env: | ||
APP_VERSION: ${{ github.event.inputs.version }} | ||
steps: | ||
- name: cf setup | ||
run: |- | ||
curl -sL "https://packages.cloudfoundry.org/stable?release=${CF_RELEASE}&version=${CF_VERSION}" | \ | ||
sudo tar -zx -C /usr/local/bin | ||
env: | ||
CF_VERSION: 7.2.0 | ||
CF_RELEASE: linux64-binary | ||
- name: cf push | ||
run: |- | ||
cf api ${CF_API} | ||
cf auth | ||
cf target -o ${CF_ORG} -s ${CF_SPACE} | ||
cf push ${APP_NAME} --docker-image ${APP_IMAGE}:${APP_VERSION} --docker-username ${CF_DOCKER_USERNAME} | ||
env: | ||
APP_NAME: dgca-businessrule-service | ||
APP_IMAGE: docker.pkg.github.com/${{ github.repository }}/dgca-businessrule-service | ||
CF_API: ${{ secrets.CF_API }} | ||
CF_ORG: ${{ secrets.CF_ORG }} | ||
CF_SPACE: ${{ secrets.CF_SPACE }} | ||
CF_USERNAME: ${{ secrets.CF_USERNAME }} | ||
CF_PASSWORD: ${{ secrets.CF_PASSWORD }} | ||
CF_DOCKER_USERNAME: ${{ secrets.CF_DOCKER_USERNAME }} | ||
CF_DOCKER_PASSWORD: ${{ secrets.CF_DOCKER_PASSWORD }} |
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,56 @@ | ||
name: ci-main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | ||
- name: version | ||
run: |- | ||
APP_SHA=$(git rev-parse --short ${GITHUB_SHA}) | ||
APP_LATEST_REV=$(git rev-list --tags --max-count=1) | ||
APP_LATEST_TAG=$(git describe --tags ${APP_LATEST_REV} 2> /dev/null || echo 0.0.0) | ||
echo "APP_VERSION=${APP_LATEST_TAG}-${APP_SHA}" >> ${GITHUB_ENV} | ||
- name: mvn | ||
run: |- | ||
mvn versions:set \ | ||
--batch-mode \ | ||
--file ./pom.xml \ | ||
--settings ./settings.xml \ | ||
--define newVersion="${APP_VERSION}" | ||
mvn clean verify \ | ||
--batch-mode \ | ||
--file ./pom.xml \ | ||
--settings ./settings.xml \ | ||
--define app.packages.username="${APP_PACKAGES_USERNAME}" \ | ||
--define app.packages.password="${APP_PACKAGES_PASSWORD}" | ||
env: | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
- name: docker | ||
run: |- | ||
echo "${APP_PACKAGES_PASSWORD}" | docker login "${APP_PACKAGES_URL}" \ | ||
--username "${APP_PACKAGES_USERNAME}" \ | ||
--password-stdin | ||
docker build . \ | ||
--file ./Dockerfile \ | ||
--tag "${APP_PACKAGES_URL}:${APP_VERSION}" | ||
docker push "${APP_PACKAGES_URL}:${APP_VERSION}" | ||
env: | ||
APP_PACKAGES_URL: docker.pkg.github.com/${{ github.repository }}/dgca-businessrule-service | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
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,67 @@ | ||
name: ci-openapi | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: | ||
- created | ||
jobs: | ||
release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | ||
- name: version | ||
run: >- | ||
APP_SHA=$(git rev-parse --short ${GITHUB_SHA}); | ||
APP_TAG=${GITHUB_REF/refs\/tags\/} | ||
APP_VERSION=${APP_TAG}; | ||
echo "APP_SHA=${APP_SHA}" >> ${GITHUB_ENV}; | ||
echo "APP_TAG=${APP_TAG}" >> ${GITHUB_ENV}; | ||
echo "APP_VERSION=${APP_VERSION}" >> ${GITHUB_ENV}; | ||
- name: mvn | ||
run: >- | ||
mvn versions:set | ||
--batch-mode | ||
--file ./pom.xml | ||
--settings ./settings.xml | ||
--define newVersion="${APP_VERSION}"; | ||
mvn clean verify | ||
--batch-mode | ||
--file ./pom.xml | ||
--settings ./settings.xml | ||
--define app.packages.username="${APP_PACKAGES_USERNAME}" | ||
--define app.packages.password="${APP_PACKAGES_PASSWORD}"; | ||
env: | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: openapi.json | ||
path: target/openapi.json | ||
- name: Checkout OpenApi Doc Branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: openapi-doc | ||
- name: Delete existing openapi.json | ||
run: rm -f openapi.json | ||
- name: Download openapi.json | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: openapi.json | ||
- name: Commit and Push changes | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git commit -a --allow-empty -m "Update OpenAPI JSON" | ||
git push |
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,38 @@ | ||
name: ci-pull-request | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | ||
- name: mvn | ||
run: |- | ||
mvn clean package \ | ||
--batch-mode \ | ||
--file ./pom.xml \ | ||
--settings ./settings.xml \ | ||
--define app.packages.username="${APP_PACKAGES_USERNAME}" \ | ||
--define app.packages.password="${APP_PACKAGES_PASSWORD}" | ||
env: | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
- name: docker | ||
run: |- | ||
docker build . \ | ||
--file ./Dockerfile |
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,19 @@ | ||
name: ci-release-notes | ||
on: | ||
release: | ||
types: | ||
- created | ||
jobs: | ||
release-notes: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
APP_VERSION: ${{ github.event.release.tag_name }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: release-notes | ||
run: npx github-release-notes release --override --tags ${APP_VERSION} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GREN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.