Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial code #1

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sections:
- title: Major changes
labels:
- "release/super-feature"
- title: Complete changelog
labels:
- "bug"
- "enhancement"
- "dependencies"
template: |
{{ range $section := .Sections }}{{ if $section.Items }}### {{ $section.GetTitle }}{{ range $item := $section.Items }}
* [#{{ $item.GetID }}]({{ $item.GetURL }}) - {{ $item.GetTitle }}{{ end }}{{ end }}
{{ end }}
14 changes: 14 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
labels:
- dependencies
- package-ecosystem: "docker"
directory: "/src/main/docker"
schedule:
interval: daily
labels:
- docker-image
15 changes: 15 additions & 0 deletions .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build Feature Branch

on:
push:
branches:
- '**'
- '!main'
- '!fix/[0-9]+.[0-9]+.x'

jobs:
branch:
uses: onecx/ci-quarkus/.github/workflows/build-branch.yml@v1
secrets: inherit
with:
native: true
11 changes: 11 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Build Pull Request

on:
pull_request:

jobs:
pr:
uses: onecx/ci-quarkus/.github/workflows/build-pr.yml@v1
secrets: inherit
with:
native: true
11 changes: 11 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Build Release
on:
push:
tags:
- '**'
jobs:
release:
uses: onecx/ci-quarkus/.github/workflows/build-release.yml@v1
secrets: inherit
with:
native: true
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- 'main'
- 'fix/[0-9]+.[0-9]+.x'

jobs:
build:
uses: onecx/ci-quarkus/.github/workflows/build.yml@v1
secrets: inherit
with:
native: true
helmEventTargetRepository: onecx/onecx-bookmark

7 changes: 7 additions & 0 deletions .github/workflows/create-fix-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Create Fix Branch
on:
workflow_dispatch:
jobs:
fix:
uses: onecx/ci-common/.github/workflows/create-fix-branch.yml@v1
secrets: inherit
9 changes: 9 additions & 0 deletions .github/workflows/create-new-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Create new build

on:
workflow_dispatch:

jobs:
build:
uses: onecx/ci-common/.github/workflows/create-new-build.yml@v1
secrets: inherit
7 changes: 7 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Create Release Version
on:
workflow_dispatch:
jobs:
release:
uses: onecx/ci-common/.github/workflows/create-release.yml@v1
secrets: inherit
10 changes: 10 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Update documentation
on:
push:
branches: [ main ]
paths:
- 'docs/**'
jobs:
release:
uses: onecx/ci-common/.github/workflows/documentation.yml@v1
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/sonar-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Sonar Pull Request

on:
workflow_run:
workflows: ["Build Pull Request"]
types:
- completed

jobs:
pr:
uses: onecx/ci-quarkus/.github/workflows/quarkus-pr-sonar.yml@v1
secrets: inherit
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
.flattened-pom.xml

# Eclipse
.project
.classpath
.settings/
bin/

# IntelliJ
.idea
*.ipr
*.iml
*.iws

# NetBeans
nb-configuration.xml

# Visual Studio Code
.vscode
.factorypath

# OSX
.DS_Store

# Vim
*.swp
*.swo

# patch
*.orig
*.rej

# Local environment
.env
*.sh

# Plugin directory
.quarkus/cli/plugins/

# Charts dependencies
Chart.lock
src/main/helm/charts
3 changes: 3 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: onecx-bookmark
title: Bookmark Management
version: latest
1 change: 1 addition & 0 deletions docs/modules/onecx-bookmark-bff/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* xref:onecx-bookmark-bff:index.adoc[Backend For Frontend]
8 changes: 8 additions & 0 deletions docs/modules/onecx-bookmark-bff/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include::onecx-bookmark-bff-attributes.adoc[opts=optional]

== onecx-bookmark-bff

include::docs.adoc[opts=optional]


include::onecx-bookmark-bff-docs.adoc[opts=optional]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

:docker-registry: https://github.com/onecx/onecx-bookmark-bff/pkgs/container/onecx-bookmark-bff
:helm-registry: https://github.com/onecx/onecx-bookmark-bff/pkgs/container/charts%2Fonecx-bookmark-bff
:properties-file: src/main/resources/application.properties
:helm-file: src/main/helm/values.yaml
108 changes: 108 additions & 0 deletions docs/modules/onecx-bookmark-bff/pages/onecx-bookmark-bff-docs.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@

include::onecx-bookmark-bff-attributes.adoc[opts=optional]

=== Default properties

.{properties-file}
[%collapsible%open]
====
[source,properties,subs=attributes+]
----
quarkus.http.auth.permission.health.paths=/q/*
quarkus.http.auth.permission.health.policy=permit
quarkus.http.auth.permission.default.paths=/*
quarkus.http.auth.permission.default.policy=authenticated
onecx.permissions.application-id=${quarkus.application.name}
org.eclipse.microprofile.rest.client.propagateHeaders=apm-principal-token
%prod.quarkus.rest-client.onecx_bookmark_svc.url=http://onecx-bookmark-svc:8080
%prod.quarkus.rest-client.onecx_product_store.url=http://onecx-product-store-svc:8080
%prod.quarkus.rest-client.onecx_bookmark_svc.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.rest-client.onecx_product_store.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.oidc-client.client-id=${quarkus.application.name}
quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi
quarkus.openapi-generator.codegen.spec.onecx_bookmark_svc_yaml.config-key=onecx_bookmark_svc
quarkus.openapi-generator.codegen.spec.onecx_bookmark_svc_yaml.base-package=gen.org.tkit.onecx.bookmark.client
quarkus.openapi-generator.codegen.spec.onecx_bookmark_svc_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_bookmark_svc_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_bookmark_svc_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;
quarkus.openapi-generator.codegen.spec.onecx_bookmark_svc_yaml.enable-security-generation=false
quarkus.openapi-generator.onecx_bookmark_svc_yaml.auth.oauth2.token-propagation=false
quarkus.openapi-generator.codegen.spec.onecx_product_store_svc_v1_yaml.config-key=onecx_product_store_svc
quarkus.openapi-generator.codegen.spec.onecx_product_store_svc_v1_yaml.base-package=gen.org.tkit.onecx.product.store.client
quarkus.openapi-generator.codegen.spec.onecx_product_store_svc_v1_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_product_store_svc_v1_yaml.type-mappings.File=byte[]
quarkus.openapi-generator.codegen.spec.onecx_product_store_svc_v1_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_product_store_svc_v1_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;
quarkus.openapi-generator.codegen.spec.onecx_product_store_svc_v1_yaml.enable-security-generation=false
quarkus.openapi-generator.onecx_product_store_svc_v1_yaml.auth.oauth2.token-propagation=false
----
====

=== Extensions

include::onecx-bookmark-bff-extensions.adoc[opts=optional]

=== Container

{docker-registry}[Docker registry]


=== Helm

{helm-registry}[Helm registry]

Default values

.{helm-file}
[source,yaml]
----
app:
name: bff
image:
repository: "onecx/onecx-bookmark-bff"
operator:
# Permission
permission:
enabled: true
spec:
permissions:
bookmark:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
delete: permission on all DELETE requests
keycloak:
client:
enabled: true
spec:
kcConfig:
defaultClientScopes: [ ocx-bm:all, ocx-pm:read ]

----

defaultClientScopes: [ ocx-bm:all, ocx-pm:read ]

----

pm:read ]

----

ission:
enabled: true
spec:
permissions:
bookmark:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
delete: permission on all DELETE requests
product:
read: permission on all GET requests and POST search
keycloak:
client:
enabled: true
spec:
kcConfig:
defaultClientScopes: [ ocx-hp:all, ocx-ps:read, ocx-pm:read ]

----

Loading
Loading