forked from openstack/kolla
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This uses the binary release from GitHub. Change-Id: Id7df96e7d5b646d4b42e06945bafdbce828b902b Co-Authored-By: Pierre Riteau <[email protected]> (cherry picked from commit 034419e) (cherry picked from commit 49dd6d3)
- Loading branch information
1 parent
2a9ccf0
commit 4ffed74
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM {{ namespace }}/{{ infra_image_prefix }}prometheus-base:{{ tag }} | ||
{% block labels %} | ||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" | ||
{% endblock %} | ||
|
||
{% import "macros.j2" as macros with context %} | ||
|
||
{% block prometheus_jiralert_header %}{% endblock %} | ||
|
||
{% if base_package_type == 'rpm' %} | ||
{% set prometheus_jiralert_packages = [ | ||
'go', | ||
] %} | ||
{% elif base_package_type == 'deb' %} | ||
{% set prometheus_jiralert_packages = [ | ||
'golang-go', | ||
] %} | ||
{% endif %} | ||
|
||
{{ macros.install_packages(prometheus_jiralert_packages | customizable("packages")) }} | ||
|
||
{% block prometheus_jiralert_version %} | ||
ARG prometheus_jiralert_version=1.0 | ||
ARG prometheus_jiralert_url=https://github.com/prometheus-community/jiralert/releases/download/${prometheus_jiralert_version}/jiralert-${prometheus_jiralert_version}.linux-{{debian_arch}}.tar.gz | ||
{% endblock %} | ||
|
||
{% block prometheus_jiralert_install %} | ||
ENV GOPATH=/tmp | ||
RUN curl -o /tmp/jiralert.tar.gz ${prometheus_jiralert_url} \ | ||
&& mkdir /opt/jiralert \ | ||
&& tar --strip 1 -xvf /tmp/jiralert.tar.gz -C /opt/jiralert \ | ||
&& rm -f /tmp/jiralert.tar.gz \ | ||
&& mkdir -p /etc/jiralert | ||
{% endblock %} | ||
|
||
{% block prometheus_jiralert_footer %}{% endblock %} | ||
{% block footer %}{% endblock %} | ||
|
||
USER prometheus |