Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Romanow committed Jun 10, 2024
1 parent c681bd7 commit b10dff4
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 17 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
uses: pre-commit/[email protected]

- name: Build project
uses: eskatos/gradle-command-action@v2
uses: eskatos/gradle-command-action@v3
with:
arguments: clean build

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jar
path: "*-service/build/libs/*.jar"
Expand All @@ -37,7 +37,7 @@ jobs:

- uses: docker/setup-buildx-action@v2

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: jar
path: .
Expand All @@ -51,6 +51,8 @@ jobs:
timeout-minutes: 10
run: |
docker compose up -d --wait
env:
OAUTH2_SECURITY_ENABLED: true

- name: Print logs
if: ${{ failure() && steps.run-containers.outcome != 'success' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ class SecurityConfiguration {
.build()
}

@Bean
@Order(THIRD)
@ConditionalOnProperty("oauth2.security.enabled", havingValue = "false")
fun disabledSecurityFilterChain(http: HttpSecurity): SecurityFilterChain {
return http
.authorizeHttpRequests {
it.anyRequest().permitAll()
}
.csrf { it.disable() }
.cors { it.disable() }
.build()
}

@Bean
@Order(THIRD)
@ConditionalOnProperty("oauth2.security.enabled", havingValue = "true", matchIfMissing = true)
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.moniroting.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
prometheus:
image: prom/prometheus:v2.41.0
image: prom/prometheus:v2.52.0
container_name: prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:

store-service:
build: ./store-service
image: ${REPOSITORY_NAME}/store-service:v3.0
image: ${REPOSITORY_NAME}/store-service:v3.1
container_name: store
environment:
SPRING_PROFILES_ACTIVE: docker
Expand All @@ -37,7 +37,7 @@ services:

order-service:
build: ./order-service
image: ${REPOSITORY_NAME}/order-service:v3.0
image: ${REPOSITORY_NAME}/order-service:v3.1
container_name: orders
environment:
SPRING_PROFILES_ACTIVE: docker
Expand All @@ -54,7 +54,7 @@ services:

warehouse-service:
build: ./warehouse-service
image: ${REPOSITORY_NAME}/warehouse-service:v3.0
image: ${REPOSITORY_NAME}/warehouse-service:v3.1
container_name: warehouse
environment:
SPRING_PROFILES_ACTIVE: docker
Expand All @@ -71,7 +71,7 @@ services:

warranty-service:
build: ./warranty-service
image: ${REPOSITORY_NAME}/warranty-service:v3.0
image: ${REPOSITORY_NAME}/warranty-service:v3.1
container_name: warranty
environment:
SPRING_PROFILES_ACTIVE: docker
Expand Down
16 changes: 12 additions & 4 deletions docker/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ scrape_configs:
metrics_path: "/manage/prometheus"
static_configs:
- targets:
- store:8480
- orders:8380
- warehouse:8280
- warranty:8180
- "store:8480"
- "orders:8380"
- "warehouse:8280"
- "warranty:8180"

- job_name: cadvisor
static_configs:
- targets: [ "cadvisor:8080" ]

- job_name: node-exporter
static_configs:
- targets: [ "node-exporter:9100" ]
2 changes: 1 addition & 1 deletion k8s/services/orders-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: romanowalex/order-service
tag: v3.0
tag: v3.1

database:
name: orders
Expand Down
2 changes: 1 addition & 1 deletion k8s/services/store-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: romanowalex/store-service
tag: v3.0
tag: v3.1

ports:
internal: 8480
2 changes: 1 addition & 1 deletion k8s/services/warehouse-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: romanowalex/warehouse-service
tag: v3.0
tag: v3.1

database:
name: warehouse
Expand Down
2 changes: 1 addition & 1 deletion k8s/services/warranty-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: romanowalex/warranty-service
tag: v3.0
tag: v3.1

database:
name: warranty
Expand Down
2 changes: 1 addition & 1 deletion scripts/load-images.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

version=${1:-v3.0}
version=${1:-v3.1}

images=(
"romanowalex/store-service:$version"
Expand Down

0 comments on commit b10dff4

Please sign in to comment.