@@ -31,8 +31,8 @@ SCANNER_DATE := `date +%Y-%m-%d`
3131SCANNER_DATE_YEST := ` TZ=GMT+24 +%Y:%m:%d `
3232SCANNER_VERSION := v8
3333SCANNER_LOCALIP := $(shell ifconfig | grep -Eo 'inet (addr:) ?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | awk '{print $1}' | head -n 1)
34- SCANNER_IMAGES_TO_SCAN := splunk-debian-9 splunk-debian-10 splunk-centos-7 splunk-redhat-8 uf-debian-9 uf-debian-10 uf-centos-7 uf-redhat-8
35- CONTAINERS_TO_SAVE := splunk-debian-9 splunk-debian-10 splunk-centos-7 splunk-redhat-8 uf-debian-9 uf-debian-10 uf-centos-7 uf-redhat-8
34+ SCANNER_IMAGES_TO_SCAN := splunk-debian-9 splunk-debian-10 splunk-centos-7 splunk-redhat-8 uf-debian-9 uf-debian-10 uf-centos-7 uf-redhat-8 splunk-py23-debian-9 splunk-py23-debian-10 splunk-py23-centos-7 splunk-py23-redhat-8 uf-py23-debian-9 uf-py23-debian-10 uf-py23-centos-7 uf-py23-redhat-8
35+ CONTAINERS_TO_SAVE := splunk-debian-9 splunk-debian-10 splunk-centos-7 splunk-redhat-8 uf-debian-9 uf-debian-10 uf-centos-7 uf-redhat-8 splunk-py23-debian-9 splunk-py23-debian-10 splunk-py23-centos-7 splunk-py23-redhat-8 uf-py23-debian-9 uf-py23-debian-10 uf-py23-centos-7 uf-py23-redhat-8
3636ifeq ($(shell uname) , Linux)
3737 SCANNER_FILE = clair-scanner_linux_amd64
3838else ifeq ($(shell uname), Darwin)
4444
4545.PHONY : tests interactive_tutorials
4646
47- all : splunk uf
47+ all : splunk uf splunk-py23 uf-py23
4848
4949ansible :
5050 @if [ -d " splunk-ansible" ]; then \
@@ -225,6 +225,61 @@ uf-windows-2016: base-windows-2016 ansible
225225 --build-arg SPLUNK_BUILD_URL=${UF_WIN_BUILD_URL} \
226226 -t uf-windows-2016:${IMAGE_VERSION} .
227227
228+
229+ # #### Python 3 support #####
230+ splunk-py23 : splunk-py23-debian-9 splunk-py23-debian-10 splunk-py23-centos-7 splunk-py23-redhat-8
231+
232+ splunk-py23-debian-9 : splunk-debian-9
233+ docker build ${DOCKER_BUILD_FLAGS} \
234+ -f py23-image/debian-9/Dockerfile \
235+ --build-arg SPLUNK_PRODUCT=splunk \
236+ -t splunk-py23-debian-9:${IMAGE_VERSION} .
237+
238+ splunk-py23-debian-10 : splunk-debian-10
239+ docker build ${DOCKER_BUILD_FLAGS} \
240+ -f py23-image/debian-10/Dockerfile \
241+ --build-arg SPLUNK_PRODUCT=splunk \
242+ -t splunk-py23-debian-10:${IMAGE_VERSION} .
243+
244+ splunk-py23-centos-7 : splunk-centos-7
245+ docker build ${DOCKER_BUILD_FLAGS} \
246+ -f py23-image/centos-7/Dockerfile \
247+ --build-arg SPLUNK_PRODUCT=splunk \
248+ -t splunk-py23-centos-7:${IMAGE_VERSION} .
249+
250+ splunk-py23-redhat-8 : splunk-redhat-8
251+ docker build ${DOCKER_BUILD_FLAGS} \
252+ -f py23-image/redhat-8/Dockerfile \
253+ --build-arg SPLUNK_PRODUCT=splunk \
254+ -t splunk-py23-redhat-8:${IMAGE_VERSION} .
255+
256+ uf-py23 : uf-py23-debian-9 uf-py23-debian-10 uf-py23-centos-7 uf-py23-redhat-8
257+
258+ uf-py23-debian-9 : uf-debian-9
259+ docker build ${DOCKER_BUILD_FLAGS} \
260+ -f py23-image/debian-9/Dockerfile \
261+ --build-arg SPLUNK_PRODUCT=uf \
262+ -t uf-py23-debian-9:${IMAGE_VERSION} .
263+
264+ uf-py23-debian-10 : uf-debian-10
265+ docker build ${DOCKER_BUILD_FLAGS} \
266+ -f py23-image/debian-10/Dockerfile \
267+ --build-arg SPLUNK_PRODUCT=uf \
268+ -t uf-py23-debian-10:${IMAGE_VERSION} .
269+
270+ uf-py23-centos-7 : uf-centos-7
271+ docker build ${DOCKER_BUILD_FLAGS} \
272+ -f py23-image/centos-7/Dockerfile \
273+ --build-arg SPLUNK_PRODUCT=uf \
274+ -t uf-py23-centos-7:${IMAGE_VERSION} .
275+
276+ uf-py23-redhat-8 : uf-redhat-8
277+ docker build ${DOCKER_BUILD_FLAGS} \
278+ -f py23-image/redhat-8/Dockerfile \
279+ --build-arg SPLUNK_PRODUCT=uf \
280+ -t uf-py23-redhat-8:${IMAGE_VERSION} .
281+
282+
228283# #### Tests #####
229284sample-compose-up : sample-compose-down
230285 docker-compose -f test_scenarios/${SPLUNK_COMPOSE} up -d
@@ -279,28 +334,28 @@ test_splunk_python3_all: test_splunk_centos7_python3 test_splunk_redhat8_python3
279334test_uf_python3_all : test_uf_centos7_python3 test_uf_redhat8_python3 test_uf_debian9_python3 test_uf_debian10_python3
280335
281336test_splunk_centos7_python3 :
282- $(call test_python3_installation, splunk-centos-7)
337+ $(call test_python3_installation, splunk-py23- centos-7)
283338
284339test_splunk_redhat8_python3 :
285- $(call test_python3_installation, splunk-redhat-8)
340+ $(call test_python3_installation, splunk-py23- redhat-8)
286341
287342test_splunk_debian9_python3 :
288- $(call test_python3_installation, splunk-debian-9)
343+ $(call test_python3_installation, splunk-py23- debian-9)
289344
290345test_splunk_debian10_python3 :
291- $(call test_python3_installation, splunk-debian-10)
346+ $(call test_python3_installation, splunk-py23- debian-10)
292347
293348test_uf_centos7_python3 :
294- $(call test_python3_installation, uf-centos-7)
349+ $(call test_python3_installation, uf-py23- centos-7)
295350
296351test_uf_redhat8_python3 :
297- $(call test_python3_installation, uf-redhat-8)
352+ $(call test_python3_installation, uf-py23- redhat-8)
298353
299354test_uf_debian9_python3 :
300- $(call test_python3_installation, uf-debian-9)
355+ $(call test_python3_installation, uf-py23- debian-9)
301356
302357test_uf_debian10_python3 :
303- $(call test_python3_installation, uf-debian-10)
358+ $(call test_python3_installation, uf-py23- debian-10)
304359
305360define test_python3_installation
306361docker run -d --rm --name $1 -it $1 bash
@@ -315,28 +370,28 @@ test_splunk_python2_all: test_splunk_centos7_python2 test_splunk_redhat8_python2
315370test_uf_python2_all : test_uf_centos7_python2 test_uf_redhat8_python2 test_uf_debian9_python2 test_uf_debian10_python2
316371
317372test_splunk_centos7_python2 :
318- $(call test_python2_installation, splunk-centos-7)
373+ $(call test_python2_installation, splunk-py23- centos-7)
319374
320375test_splunk_redhat8_python2 :
321- $(call test_python2_installation, splunk-redhat-8)
376+ $(call test_python2_installation, splunk-py23- redhat-8)
322377
323378test_splunk_debian9_python2 :
324- $(call test_python2_installation, splunk-debian-9)
379+ $(call test_python2_installation, splunk-py23- debian-9)
325380
326381test_splunk_debian10_python2 :
327- $(call test_python2_installation, splunk-debian-10)
382+ $(call test_python2_installation, splunk-py23- debian-10)
328383
329384test_uf_centos7_python2 :
330- $(call test_python2_installation, uf-centos-7)
385+ $(call test_python2_installation, uf-py23- centos-7)
331386
332387test_uf_redhat8_python2 :
333- $(call test_python2_installation, uf-redhat-8)
388+ $(call test_python2_installation, uf-py23- redhat-8)
334389
335390test_uf_debian9_python2 :
336- $(call test_python2_installation, uf-debian-9)
391+ $(call test_python2_installation, uf-py23- debian-9)
337392
338393test_uf_debian10_python2 :
339- $(call test_python2_installation, uf-debian-10)
394+ $(call test_python2_installation, uf-py23- debian-10)
340395
341396# python2 version print to stderr, hence the 2>&1
342397define test_python2_installation
0 commit comments