From 4435f663606825011a8e5558855689b0c86af2f0 Mon Sep 17 00:00:00 2001
From: lrossett <lrossett@redhat.com>
Date: Jul 01 2021 20:46:00 +0000
Subject: ci-resultsdb-listener to resultsdb-listener


---

diff --git a/images/ci-resultsdb-listener/Dockerfile b/images/ci-resultsdb-listener/Dockerfile
deleted file mode 100644
index 277be11..0000000
--- a/images/ci-resultsdb-listener/Dockerfile
+++ /dev/null
@@ -1,32 +0,0 @@
-FROM fedora:34
-
-ARG VER=1.2
-
-LABEL \
-  name="ResultsDB CI Listener Service" \
-  vendor="Fedora Kube SIG developers" \
-  license="MIT" \
-  description="" \
-  usage="https://pagure.io/ci-resultsdb-listener/tree/master"
-
-RUN dnf -y install wget unzip fedora-messaging python3-pip && \
-dnf clean all
-
-RUN wget https://pagure.io/ci-resultsdb-listener/archive/${VER}/ci-resultsdb-listener-${VER}.zip && \
-unzip ci-resultsdb-listener-${VER}.zip && \
-cp ci-resultsdb-listener-${VER}/conf/config.toml.prod-example /etc/fedora-messaging/config.toml && \
-(cd ci-resultsdb-listener-${VER}; python3 setup.py install;) && \
-pip3 install resultsdb_api && \
-rm -rf ci-resultsdb-listener-${VER} ci-resultsdb-listener-${VER}.zip
-
-RUN mkdir -p /etc/ci-resultsdb-listener
-
-COPY files/listener.cfg /etc/ci-resultsdb-listener/
-COPY files/entrypoint /entrypoint
-
-RUN chmod 644 /etc/ci-resultsdb-listener/listener.cfg && \
-chmod 655 /entrypoint
-
-ENTRYPOINT ["/entrypoint"]
-
-USER 1001:0
\ No newline at end of file
diff --git a/images/ci-resultsdb-listener/Makefile b/images/ci-resultsdb-listener/Makefile
deleted file mode 100644
index 40c5535..0000000
--- a/images/ci-resultsdb-listener/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-SHELL := /bin/bash
-REG := quay.io
-NAME := fedora/ci-resultsdb-listener
-TAG := latest
-IMAGE := ${REG}/${NAME}:${TAG}
-
-.DEFAULT_GOAL := image
-
-image/build:
-	@docker build -t ${IMAGE} .
-
-image/push:
-	@docker push ${IMAGE}
-
-image/debug: image/build
-	@docker run -it --entrypoint /bin/bash ${IMAGE}
-
-image: image/build image/push
-
-.PHONY: image/build image/push image/debug image
\ No newline at end of file
diff --git a/images/ci-resultsdb-listener/files/entrypoint b/images/ci-resultsdb-listener/files/entrypoint
deleted file mode 100755
index ad72cac..0000000
--- a/images/ci-resultsdb-listener/files/entrypoint
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-if [[ -z "${RESULTSDB_CONSUMER_CONFIG+x}" ]]; then
-  RESULTSDB_CONSUMER_CONFIG="/etc/fedora-messaging/config.toml"
-fi
-
-if [[ -z "${RESULTSDB_CONSUMER_CALLBACK+x}" ]]; then
-  RESULTSDB_CONSUMER_CALLBACK="resultsdb_listener.consumer:Consumer"
-fi
-
-fedora-messaging \
---conf $RESULTSDB_CONSUMER_CONFIG \
-consume \
---callback=$RESULTSDB_CONSUMER_CALLBACK
\ No newline at end of file
diff --git a/images/ci-resultsdb-listener/files/listener.cfg b/images/ci-resultsdb-listener/files/listener.cfg
deleted file mode 100644
index 66dcc8e..0000000
--- a/images/ci-resultsdb-listener/files/listener.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-[sender]
-sender_type = StreamSender
-resultsdb_url = http://resultsdb:5001/api/v2.0/
\ No newline at end of file
diff --git a/images/resultsdb-listener/Dockerfile b/images/resultsdb-listener/Dockerfile
new file mode 100644
index 0000000..79516e8
--- /dev/null
+++ b/images/resultsdb-listener/Dockerfile
@@ -0,0 +1,32 @@
+FROM fedora:34
+
+ARG VER=1.2
+
+LABEL \
+  name="ResultsDB Listener Service" \
+  vendor="Fedora Kube SIG developers" \
+  license="MIT" \
+  description="" \
+  usage="https://pagure.io/ci-resultsdb-listener/tree/master"
+
+RUN dnf -y install wget unzip fedora-messaging python3-pip && \
+dnf clean all
+
+RUN wget https://pagure.io/ci-resultsdb-listener/archive/${VER}/ci-resultsdb-listener-${VER}.zip && \
+unzip ci-resultsdb-listener-${VER}.zip && \
+cp ci-resultsdb-listener-${VER}/conf/config.toml.prod-example /etc/fedora-messaging/config.toml && \
+(cd ci-resultsdb-listener-${VER}; python3 setup.py install;) && \
+pip3 install resultsdb_api && \
+rm -rf ci-resultsdb-listener-${VER} ci-resultsdb-listener-${VER}.zip
+
+RUN mkdir -p /etc/ci-resultsdb-listener
+
+COPY files/listener.cfg /etc/ci-resultsdb-listener/
+COPY files/entrypoint /entrypoint
+
+RUN chmod 644 /etc/ci-resultsdb-listener/listener.cfg && \
+chmod 655 /entrypoint
+
+ENTRYPOINT ["/entrypoint"]
+
+USER 1001:0
diff --git a/images/resultsdb-listener/Makefile b/images/resultsdb-listener/Makefile
new file mode 100644
index 0000000..04a058b
--- /dev/null
+++ b/images/resultsdb-listener/Makefile
@@ -0,0 +1,20 @@
+SHELL := /bin/bash
+REG := quay.io
+NAME := fedora/resultsdb-listener
+TAG := latest
+IMAGE := ${REG}/${NAME}:${TAG}
+
+.DEFAULT_GOAL := image
+
+image/build:
+	@docker build -t ${IMAGE} .
+
+image/push:
+	@docker push ${IMAGE}
+
+image/debug: image/build
+	@docker run -it --entrypoint /bin/bash ${IMAGE}
+
+image: image/build image/push
+
+.PHONY: image/build image/push image/debug image
diff --git a/images/resultsdb-listener/files/entrypoint b/images/resultsdb-listener/files/entrypoint
new file mode 100755
index 0000000..ad72cac
--- /dev/null
+++ b/images/resultsdb-listener/files/entrypoint
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+if [[ -z "${RESULTSDB_CONSUMER_CONFIG+x}" ]]; then
+  RESULTSDB_CONSUMER_CONFIG="/etc/fedora-messaging/config.toml"
+fi
+
+if [[ -z "${RESULTSDB_CONSUMER_CALLBACK+x}" ]]; then
+  RESULTSDB_CONSUMER_CALLBACK="resultsdb_listener.consumer:Consumer"
+fi
+
+fedora-messaging \
+--conf $RESULTSDB_CONSUMER_CONFIG \
+consume \
+--callback=$RESULTSDB_CONSUMER_CALLBACK
\ No newline at end of file
diff --git a/images/resultsdb-listener/files/listener.cfg b/images/resultsdb-listener/files/listener.cfg
new file mode 100644
index 0000000..66dcc8e
--- /dev/null
+++ b/images/resultsdb-listener/files/listener.cfg
@@ -0,0 +1,3 @@
+[sender]
+sender_type = StreamSender
+resultsdb_url = http://resultsdb:5001/api/v2.0/
\ No newline at end of file

