From 3988ad3851dff1a958b06e7a565ce3ae1344d166 Mon Sep 17 00:00:00 2001 From: Shanmuga Date: Mon, 13 Jul 2020 13:53:46 +0200 Subject: [PATCH 1/7] Added support for additional jars --- Dockerfile | 5 +++-- lib/README.md | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 lib/README.md diff --git a/Dockerfile b/Dockerfile index a4fc3dc..752ed57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM openjdk:8-jre-alpine -ADD target/prometheus-jdbc-exporter-jar-with-dependencies.jar target/ +COPY target/prometheus-jdbc-exporter-jar-with-dependencies.jar /target/ +COPY lib/README.md /lib/README.md EXPOSE 5555 -CMD java -Djava.security.egd=file:///dev/urandom -cp "target/*" no.sysco.middleware.metrics.prometheus.jdbc.WebServer 0.0.0.0:5555 ./config.yml +CMD java -Djava.security.egd=file:///dev/urandom -cp "/target/*:/lib/*" no.sysco.middleware.metrics.prometheus.jdbc.WebServer 0.0.0.0:5555 ./config.yml diff --git a/lib/README.md b/lib/README.md new file mode 100644 index 0000000..3899473 --- /dev/null +++ b/lib/README.md @@ -0,0 +1,3 @@ +Place any addtional jar here. These will be copied into docker image and will be added to CLASSPATH. + +NOTE: It is better to use add dependencies to [pom.xml](../pom.xml). This directory should only be used when the library jars are not available as part in maven repositories. From b2ac6835ff5778b0eb4760805558fab6403b2cdc Mon Sep 17 00:00:00 2001 From: Shanmuga Date: Mon, 13 Jul 2020 13:54:07 +0200 Subject: [PATCH 2/7] updated dependency --- pom.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 7002907..66ce5ce 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ no.sysco.middleware.metrics prometheus-jdbc-exporter - 1.2-SNAPSHOT + 1.3-SNAPSHOT jar prometheus-jdbc-exporter @@ -32,27 +32,27 @@ io.prometheus simpleclient - 0.0.23 + 0.9.0 org.yaml snakeyaml - 1.18 + 1.26 io.prometheus simpleclient_servlet - 0.0.21 + 0.9.0 org.eclipse.jetty jetty-servlet - 8.1.7.v20120910 + 9.4.30.v20200611 junit junit - 4.12 + 4.13 @@ -62,7 +62,7 @@ maven-compiler-plugin - 3.6.1 + 3.8.1 1.8 1.8 @@ -76,7 +76,7 @@ maven-assembly-plugin - 3.0.0 + 3.3.0 ${project.build.finalName} @@ -103,7 +103,7 @@ com.spotify dockerfile-maven-plugin - 1.3.4 + 1.4.13 default From 27dcecb96d93502c0905b1a9c9aa9eca1f41495b Mon Sep 17 00:00:00 2001 From: Shanmuga Date: Mon, 13 Jul 2020 16:45:15 +0200 Subject: [PATCH 3/7] fixed dir conflict --- Dockerfile | 4 ++-- {lib => jar_lib}/README.md | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename {lib => jar_lib}/README.md (100%) diff --git a/Dockerfile b/Dockerfile index 752ed57..ce90fdf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM openjdk:8-jre-alpine COPY target/prometheus-jdbc-exporter-jar-with-dependencies.jar /target/ -COPY lib/README.md /lib/README.md +COPY jar_lib/README.md /jar_lib/README.md EXPOSE 5555 -CMD java -Djava.security.egd=file:///dev/urandom -cp "/target/*:/lib/*" no.sysco.middleware.metrics.prometheus.jdbc.WebServer 0.0.0.0:5555 ./config.yml +CMD java -Djava.security.egd=file:///dev/urandom -cp "/target/*:/jar_lib/*" no.sysco.middleware.metrics.prometheus.jdbc.WebServer 0.0.0.0:5555 ./config.yml diff --git a/lib/README.md b/jar_lib/README.md similarity index 100% rename from lib/README.md rename to jar_lib/README.md From 76beb95ec5c3d4efa96650c749cc4b19a157d55d Mon Sep 17 00:00:00 2001 From: Ilya Semenov Date: Tue, 3 Nov 2020 14:42:01 +0100 Subject: [PATCH 4/7] DINFRA-513: SF JDBC jar added, jdbc_ metric prefix removed --- .gitignore | 3 ++- pom.xml | 5 +++++ .../sysco/middleware/metrics/prometheus/jdbc/JdbcConfig.java | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ff3332b..a1d566d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ ojdbc8.jar pom.xml.releaseBackup -release.properties \ No newline at end of file +release.properties +target/* diff --git a/pom.xml b/pom.xml index 66ce5ce..104a74e 100644 --- a/pom.xml +++ b/pom.xml @@ -54,6 +54,11 @@ junit 4.13 + + net.snowflake + snowflake-jdbc + 3.12.13 + diff --git a/src/main/java/no/sysco/middleware/metrics/prometheus/jdbc/JdbcConfig.java b/src/main/java/no/sysco/middleware/metrics/prometheus/jdbc/JdbcConfig.java index da65dcd..a9f7d02 100644 --- a/src/main/java/no/sysco/middleware/metrics/prometheus/jdbc/JdbcConfig.java +++ b/src/main/java/no/sysco/middleware/metrics/prometheus/jdbc/JdbcConfig.java @@ -279,7 +279,7 @@ private List getSamples(JdbcConfig.Query query, throws SQLException { List samples = new ArrayList<>(); - final String queryName = String.format("jdbc_%s", query.name); + final String queryName = String.format("%s", query.name); while (rs.next()) { List labelValues = query.labels From b1a0bda4ea36693851b84660f27571532cc6e154 Mon Sep 17 00:00:00 2001 From: Ilya Semenov Date: Wed, 4 Nov 2020 20:06:47 +0100 Subject: [PATCH 5/7] DINFRA-513: test release --- test | 1 + 1 file changed, 1 insertion(+) create mode 100644 test diff --git a/test b/test new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/test @@ -0,0 +1 @@ +test From 30fb4c411269fe174cfb7b71ad76900cd51538e7 Mon Sep 17 00:00:00 2001 From: HelloFresh Github Actions Bot Date: Mon, 17 Jul 2023 12:59:11 +0000 Subject: [PATCH 6/7] Update HelloFresh Organization Required Workflows [ci skip] --- .../hf_validate-tribe-squad-labels.yaml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/hf_validate-tribe-squad-labels.yaml diff --git a/.github/workflows/hf_validate-tribe-squad-labels.yaml b/.github/workflows/hf_validate-tribe-squad-labels.yaml new file mode 100644 index 0000000..a3191bb --- /dev/null +++ b/.github/workflows/hf_validate-tribe-squad-labels.yaml @@ -0,0 +1,32 @@ +# This workflow is centrally managed in +# https://github.com/hellofresh/github-automation/blob/master/modules/repository/required-workflows/validate-tribe-squad-labels.yaml +--- +name: "PR: Validate Tribe and Squad Labels" + +on: + pull_request: + types: + # Default triggers https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request + - opened + - reopened + - synchronize + # label changes should trigger the validation, too + - labeled + - unlabeled + + branches: + - master + +jobs: + validate: + name: Validate + runs-on: [ self-hosted, default ] + timeout-minutes: 2 + permissions: + # Allow action to comment within the PR + pull-requests: write + steps: + - name: Validate Labels + uses: docker://489198589229.dkr.ecr.eu-west-1.amazonaws.com/action-validate-comply-labels:latest + env: + GITHUB_TOKEN: ${{ github.token }} From 1f329a41dde807f9bd802f4a9baf09352346004c Mon Sep 17 00:00:00 2001 From: "gh-automation-app[bot]" <109592277+gh-automation-app[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:31:44 +0000 Subject: [PATCH 7/7] Update HelloFresh Organization Required Workflows [ci skip] --- .../hf_validate-tribe-squad-labels.yaml | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/hf_validate-tribe-squad-labels.yaml diff --git a/.github/workflows/hf_validate-tribe-squad-labels.yaml b/.github/workflows/hf_validate-tribe-squad-labels.yaml deleted file mode 100644 index a3191bb..0000000 --- a/.github/workflows/hf_validate-tribe-squad-labels.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow is centrally managed in -# https://github.com/hellofresh/github-automation/blob/master/modules/repository/required-workflows/validate-tribe-squad-labels.yaml ---- -name: "PR: Validate Tribe and Squad Labels" - -on: - pull_request: - types: - # Default triggers https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request - - opened - - reopened - - synchronize - # label changes should trigger the validation, too - - labeled - - unlabeled - - branches: - - master - -jobs: - validate: - name: Validate - runs-on: [ self-hosted, default ] - timeout-minutes: 2 - permissions: - # Allow action to comment within the PR - pull-requests: write - steps: - - name: Validate Labels - uses: docker://489198589229.dkr.ecr.eu-west-1.amazonaws.com/action-validate-comply-labels:latest - env: - GITHUB_TOKEN: ${{ github.token }}