prometheus-libvirt-exporter: fix build with newer Go
I have no idea how Go works. This change make build happen.
Change-Id: I09ea136c7354143f45f856d5e8d8ed1192879622
(cherry picked from commit 9630032fd6
)
This commit is contained in:
parent
782d02dcb4
commit
52375aeea7
|
@ -33,8 +33,10 @@ ARG prometheus_libvirt_exporter_path=github.com/AlexZzz/libvirt-exporter
|
|||
{% block prometheus_libvirt_exporter_install %}
|
||||
ENV GOPATH=/build
|
||||
RUN go mod init libvirt-exporter \
|
||||
&& cd ${GOPATH} \
|
||||
&& go get -v ${prometheus_libvirt_exporter_path}@${prometheus_libvirt_exporter_version} \
|
||||
&& mv /build/bin/libvirt-exporter /opt \
|
||||
&& go build ${prometheus_libvirt_exporter_path} \
|
||||
&& mv /build/libvirt-exporter /opt \
|
||||
&& rm -rf /build
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue