mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 11:06:49 +00:00
Merge pull request #2543 from tawoe/develop
auto-update container image if baseimage is updated
This commit is contained in:
commit
0a3fec4de2
5
.github/Dockerfile_PreBuild
vendored
5
.github/Dockerfile_PreBuild
vendored
@ -1,5 +1,10 @@
|
||||
FROM jetty:9.4-jdk11-alpine
|
||||
|
||||
ENV JMX_EXPORTER_VERSION=1.2.0
|
||||
|
||||
# To enable add "-javaagent:$JETTY_BASE/jmx-exporter.jar=8090:$JETTY_BASE/prometheus_config.yml" to the JAVA_OPTIONS
|
||||
RUN wget https://github.com/prometheus/jmx_exporter/releases/download/$JMX_EXPORTER_VERSION/jmx_prometheus_javaagent-$JMX_EXPORTER_VERSION.jar -o /var/lib/jetty/jmx-exporter.jar
|
||||
COPY .github/jmx_exporter.config /var/lib/jetty/prometheus_config.yml
|
||||
# Copy OBP source code
|
||||
# Copy build artifact (.war file) into jetty from 'maven' stage.
|
||||
COPY /obp-api/target/obp-api-1.*.war /var/lib/jetty/webapps/ROOT.war
|
||||
|
||||
15
.github/jmx_exporter.config
vendored
Normal file
15
.github/jmx_exporter.config
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
lowercaseOutputLabelNames: true
|
||||
lowercaseOutputName: true
|
||||
whitelistObjectNames: ["java.lang:type=OperatingSystem"]
|
||||
blacklistObjectNames: []
|
||||
rules:
|
||||
- pattern: 'java.lang<type=OperatingSystem><>(committed_virtual_memory|free_physical_memory|free_swap_space|total_physical_memory|total_swap_space)_size:'
|
||||
name: os_$1_bytes
|
||||
type: GAUGE
|
||||
attrNameSnakeCase: true
|
||||
- pattern: 'java.lang<type=OperatingSystem><>((?!process_cpu_time)\w+):'
|
||||
name: os_$1
|
||||
type: GAUGE
|
||||
attrNameSnakeCase: true
|
||||
- pattern: ".*"
|
||||
35
.github/workflows/auto_update_base_image.yml
vendored
Normal file
35
.github/workflows/auto_update_base_image.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: Regular base image update check
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
## Sets environment variable
|
||||
DOCKER_HUB_ORGANIZATION: ${{ vars.DOCKER_HUB_ORGANIZATION }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Docker Image Update Checker
|
||||
id: baseupdatecheck
|
||||
uses: lucacome/docker-image-update-checker@v2.0.0
|
||||
with:
|
||||
base-image: jetty:9.4-jdk11-alpine
|
||||
image: ${{ env.DOCKER_HUB_ORGANIZATION }}/obp-api:latest
|
||||
|
||||
- name: Trigger build_container_develop_branch workflow
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
workflow_id: 'build_container_develop_branch.yml',
|
||||
ref: 'refs/heads/develop'
|
||||
});
|
||||
if: steps.baseupdatecheck.outputs.needs-updating == 'true'
|
||||
@ -3,6 +3,7 @@ name: Build and publish container develop
|
||||
# read-write repo token
|
||||
# access to secrets
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
@ -183,9 +183,9 @@ jwt.use.ssl=false
|
||||
|
||||
|
||||
## Enable writing API metrics (which APIs are called) to RDBMS
|
||||
write_metrics=true
|
||||
write_metrics=false
|
||||
## Enable writing connector metrics (which methods are called)to RDBMS
|
||||
write_connector_metrics=true
|
||||
write_connector_metrics=false
|
||||
|
||||
## ElasticSearch
|
||||
#allow_elasticsearch=true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user