Skip to content

Commit

Permalink
Merge pull request #31 from kubesphere/fix-maven-repo-link
Browse files Browse the repository at this point in the history
Fix the server http://central.maven.org is down error
  • Loading branch information
ks-ci-bot authored May 20, 2021
2 parents 1ddfcad + cc5c688 commit 25b5dc1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
old
.idea
java/images # generated by fish-pepper
2 changes: 1 addition & 1 deletion java/blocks/jmxexporter/install.dck
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var globalVersions = fp.version || {};
var jmxExporterVersion = fp.blockOpts.version || globalVersions.jmxexporter || "0.10";
var jmxExporterArtifact = fp.blockOpts.jmxExporterArtifact || "jmx_prometheus_javaagent";
var mavenRepo = fp.blockOpts.mavenRepo || "http://central.maven.org/maven2";
var mavenRepo = fp.blockOpts.mavenRepo || "https://repo1.maven.org/maven2";
var userGroupMode = fp.blockOpts.userGroupMode;
}}# Prometheus JMX exporter agent
RUN mkdir -p /opt/prometheus/etc \
Expand Down
19 changes: 19 additions & 0 deletions java/blocks/jolokia/install.dck
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{
var destPath = fp.blockOpts.dest || "/bin/jolokia-options";
var globalVersions = fp.version || {};
var jolokiaVersion = fp.blockOpts.version || globalVersions.jolokia || "1.5.0";
var jolokiaArtifact = jolokiaVersion.match(/^2.*$/) ? "jolokia-agent-jvm" : "jolokia-jvm";
var mavenRepo = fp.blockOpts.mavenRepo || "https://repo1.maven.org/maven2";
var userGroupMode = fp.blockOpts.userGroupMode;
}}# Jolokia agent
RUN mkdir -p /opt/jolokia/etc \
&& curl {{= mavenRepo }}/org/jolokia/{{= jolokiaArtifact }}/{{= jolokiaVersion }}/{{= jolokiaArtifact }}-{{= jolokiaVersion }}-agent.jar \
-o /opt/jolokia/jolokia.jar
ADD jolokia-opts {{= destPath }}
RUN chmod 444 /opt/jolokia/jolokia.jar \
&& chmod 755 {{= destPath}} \{{? userGroupMode }}
&& chmod 775 /opt/jolokia/etc \
&& chgrp {{= userGroupMode }} /opt/jolokia/etc{{??}}
&& chmod 755 /opt/jolokia/etc{{?}}

EXPOSE 8778

0 comments on commit 25b5dc1

Please sign in to comment.