Skip to content

Commit

Permalink
Upgrade jars
Browse files Browse the repository at this point in the history
Revert Gradle to 6.8.3
  • Loading branch information
pambrose committed Jun 26, 2021
1 parent af961ad commit 0fac766
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 33 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=1.9.2
VERSION=1.10.0

default: compile

Expand Down Expand Up @@ -64,4 +64,4 @@ refresh:
./gradlew --refresh-dependencies

upgrade-wrapper:
./gradlew wrapper --gradle-version=7.1 --distribution-type=bin
./gradlew wrapper --gradle-version=6.8.3 --distribution-type=bin
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ scrape_configs:
The docker images are available via:
```bash
docker pull pambrose/prometheus-proxy:1.9.2
docker pull pambrose/prometheus-agent:1.9.2
docker pull pambrose/prometheus-proxy:1.10.0
docker pull pambrose/prometheus-agent:1.10.0
```

Start a proxy container with:
Expand All @@ -118,15 +118,15 @@ Start a proxy container with:
docker run --rm -p 8082:8082 -p 8092:8092 -p 50051:50051 -p 8080:8080 \
--env ADMIN_ENABLED=true \
--env METRICS_ENABLED=true \
pambrose/prometheus-proxy:1.9.2
pambrose/prometheus-proxy:1.10.0
```

Start an agent container with:

```bash
docker run --rm -p 8083:8083 -p 8093:8093 \
--env AGENT_CONFIG='https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf' \
pambrose/prometheus-agent:1.9.2
pambrose/prometheus-agent:1.10.0
```

Using the config
Expand All @@ -144,7 +144,7 @@ is in your current directory, run an agent container with:
docker run --rm -p 8083:8083 -p 8093:8093 \
--mount type=bind,source="$(pwd)"/prom-agent.conf,target=/app/prom-agent.conf \
--env AGENT_CONFIG=prom-agent.conf \
pambrose/prometheus-agent:1.9.2
pambrose/prometheus-agent:1.10.0
```

**Note:** The `WORKDIR` of the proxy and agent images is `/app`, so make sure to use `/app` as the base directory in the
Expand Down Expand Up @@ -283,15 +283,15 @@ docker run --rm -p 8082:8082 -p 8092:8092 -p 50440:50440 -p 8080:8080 \
--env PROXY_CONFIG=tls-no-mutual-auth.conf \
--env ADMIN_ENABLED=true \
--env METRICS_ENABLED=true \
pambrose/prometheus-proxy:1.9.2
pambrose/prometheus-proxy:1.10.0

docker run --rm -p 8083:8083 -p 8093:8093 \
--mount type=bind,source="$(pwd)"/testing/certs,target=/app/testing/certs \
--mount type=bind,source="$(pwd)"/examples/tls-no-mutual-auth.conf,target=/app/tls-no-mutual-auth.conf \
--env AGENT_CONFIG=tls-no-mutual-auth.conf \
--env PROXY_HOSTNAME=mymachine.lan:50440 \
--name docker-agent \
pambrose/prometheus-agent:1.9.2
pambrose/prometheus-agent:1.10.0
```

**Note:** The `WORKDIR` of the proxy and agent images is `/app`, so make sure to use `/app` as the base directory in the
Expand Down
2 changes: 1 addition & 1 deletion bin/docker-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
docker run --rm -p 8083:8083 -p 8093:8093 \
--env AGENT_CONFIG='https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf' \
--env PROXY_HOSTNAME=mymachine.lan \
pambrose/prometheus-agent:1.9.2
pambrose/prometheus-agent:1.10.0
2 changes: 1 addition & 1 deletion bin/docker-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

docker run --rm -p 8082:8082 -p 8092:8092 -p 50051:50051 -p 8080:8080 \
--env PROXY_CONFIG='https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf' \
pambrose/prometheus-proxy:1.9.2
pambrose/prometheus-proxy:1.10.0
40 changes: 25 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
plugins {
id 'idea'
id 'java'
id 'java-library'
id 'maven-publish'
//id 'java-library'
//id 'maven-publish'
id 'maven'
id 'org.jmailen.kotlinter' version "3.4.5"
id 'org.jetbrains.kotlin.jvm' version '1.5.20'
id 'com.google.protobuf' version '0.8.16'
id "com.github.ben-manes.versions" version '0.39.0'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'com.github.gmazzo.buildconfig' version '3.0.1'
// Turn these off until jacoco fixes their kotlin 1.5.0 SMAP issue
// id 'jacoco'
// id 'com.github.kt3k.coveralls' version '2.12.0'
}

group = 'io.prometheus'
version = '1.9.2'
version = '1.10.0'

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down Expand Up @@ -120,7 +121,7 @@ configurations.all {

//startScripts.enabled = false

task sourcesJar(type: Jar) {
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allJava
archiveClassifier.set("sources")
}
Expand All @@ -130,16 +131,25 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}

publishing {
publications {
mavenAar(MavenPublication) {
from components.java
afterEvaluate {
artifact javadocJar
artifact sourcesJar
}
}
}
//publishing {
// publications {
// mavenAar(MavenPublication) {
// from components.java
// afterEvaluate {
// artifact javadocJar
// artifact sourcesJar
// }
// }
// }
//}

//java {
// withSourcesJar()
//}

artifacts {
archives sourcesJar
//archives javadocJar
}

//jacocoTestReport {
Expand Down
2 changes: 1 addition & 1 deletion etc/compose/proxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prometheus-proxy:
autoredeploy: true
image: 'pambrose/prometheus-proxy:1.9.2'
image: 'pambrose/prometheus-proxy:1.10.0'
ports:
- '8080:8080'
- '8082:8082'
Expand Down
2 changes: 1 addition & 1 deletion etc/docker/agent.df
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ EXPOSE 8093

CMD []

ENTRYPOINT ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "/app/prometheus-agent.jar"]
ENTRYPOINT ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "/app/prometheus-agent.jar"]
8 changes: 4 additions & 4 deletions etc/docker/proxy.df
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine
MAINTAINER Paul Ambrose "pambrose@mac.com"
RUN apk add openjdk11-jre
FROM alpine
MAINTAINER Paul Ambrose "pambrose@mac.com"
RUN apk add openjdk11-jre

# Define the user to use in this instance to prevent using root that even in a container, can be a security risk.
ENV APPLICATION_USER prometheus
Expand All @@ -27,4 +27,4 @@ EXPOSE 50440

CMD []

ENTRYPOINT ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "/app/prometheus-proxy.jar"]
ENTRYPOINT ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "/app/prometheus-proxy.jar"]
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 0fac766

Please sign in to comment.