Skip to content

Commit bf2eaa5

Browse files
priteaumarkgoddard
authored andcommitted
Build jiralert from stackhpc fork
Change-Id: I2a28befb6c4e3baf30e9929ae7ea224945ec7210 (cherry picked from commit a13b42f) (cherry picked from commit a629c55) (cherry picked from commit d2c73c7)
1 parent 6d0a606 commit bf2eaa5

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

docker/prometheus/prometheus-jiralert/Dockerfile.j2

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
99

1010
{% if base_package_type == 'rpm' %}
1111
{% set prometheus_jiralert_packages = [
12+
'git',
1213
'go',
14+
'make',
1315
] %}
1416
{% elif base_package_type == 'deb' %}
1517
{% set prometheus_jiralert_packages = [
@@ -20,17 +22,23 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
2022
{{ macros.install_packages(prometheus_jiralert_packages | customizable("packages")) }}
2123

2224
{% block prometheus_jiralert_version %}
23-
ARG prometheus_jiralert_version=1.0
24-
ARG prometheus_jiralert_url=https://github.com/prometheus-community/jiralert/releases/download/${prometheus_jiralert_version}/jiralert-${prometheus_jiralert_version}.linux-{{debian_arch}}.tar.gz
25+
ARG prometheus_jiralert_version=master
26+
ARG prometheus_jiralert_url=https://github.com/stackhpc/jiralert/archive/refs/heads/${prometheus_jiralert_version}.tar.gz
2527
{% endblock %}
2628

2729
{% block prometheus_jiralert_install %}
28-
ENV GOPATH=/tmp
29-
RUN curl -o /tmp/jiralert.tar.gz ${prometheus_jiralert_url} \
30+
ENV GOPATH=/build
31+
RUN mkdir /build \
32+
&& cd /build \
33+
&& curl -o jiralert.tar.gz ${prometheus_jiralert_url} \
34+
&& tar xvf jiralert.tar.gz \
35+
&& cd jiralert-${prometheus_jiralert_version} \
36+
&& make build \
3037
&& mkdir /opt/jiralert \
31-
&& tar --strip 1 -xvf /tmp/jiralert.tar.gz -C /opt/jiralert \
32-
&& rm -f /tmp/jiralert.tar.gz \
33-
&& mkdir -p /etc/jiralert
38+
&& install -m 0755 jiralert /opt/jiralert/ \
39+
&& install -m 0644 LICENSE /opt/jiralert/ \
40+
&& install -m 0644 README.md /opt/jiralert/ \
41+
&& rm -rf /build
3442
{% endblock %}
3543

3644
{% block prometheus_jiralert_footer %}{% endblock %}

0 commit comments

Comments
 (0)