Move Aether jobs to scrape that Jenkins

Include tox, add junit/cobertura output to tests

Change-Id: Ie8a251ae11c33b24eec18d1c02db22294879dcad
diff --git a/.gitignore b/.gitignore
index 5f6566e..4d5d5cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,8 +4,9 @@
 *.pyc
 .tox
 .coverage
-venv_*
+venv-*
 *.egg-info
+*.xml
 
 # directories with ephemeral info
 products
diff --git a/Makefile b/Makefile
index 2edb1a2..504d6b3 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
 COMMON_ARGS ?= --debug
 
 # tooling binaries
-VIRTUALENV 	?= virtualenv -p python3
+VIRTUALENV 	?= python3 -m venv
 PYTHON      ?= python3
 # change to be 'python3 -m cProfile -s cumtime' to profile a script
 
@@ -15,7 +15,7 @@
 .PHONY: test lint yamllint license help build siterender buildcollector sync
 
 # Create the virtualenv with all the tools installed
-VENV_NAME = venv_sjsg
+VENV_NAME = venv-sjsg
 
 $(VENV_NAME): requirements.txt
 	$(VIRTUALENV) $@ ;\
@@ -24,14 +24,12 @@
 	echo "To enter virtualenv, run 'source $@/bin/activate'"
 
 # build targets
-
 products:
 	mkdir products
 
 site:
 	mkdir site
 
-
 build: buildcollector siterender ## Collect build info and create website
 
 buildcollector: $(VENV_NAME) products ## Collect build information from Jenkins jobs
@@ -53,7 +51,7 @@
 test: yamllint tox ## run all tests
 
 # YAML files, excluding venv and cookiecutter directories
-YAML_FILES        ?= $(shell find . -type d \( -path "./venv_sjsc" \) -prune -o -type f \( -name '*.yaml' -o -name '*.yml' \) -print )
+YAML_FILES        ?= $(shell find . -type d \( -path "./venv-sjsg" \) -prune -o -type f \( -name '*.yaml' -o -name '*.yml' \) -print )
 
 yamllint: $(VENV_NAME) ## lint YAML format using yamllint
 	source ./$</bin/activate ; set -u ;\
@@ -62,14 +60,15 @@
     -d "{extends: default, rules: {line-length: {max: 139}}}" \
     -s $(YAML_FILES)
 
-tox: ## test code with tox
-	tox
+tox: $(VENV_NAME) ## test code with tox
+	source ./$</bin/activate ; set -u ;\
+  tox
 
 license: ## Check code for licensing with REUSE
 	reuse --root . lint
 
 clean: ## Delete all temporary files
-	rm -rf products site
+	rm -rf products site *.xml *.egg-info
 
 clean-all: clean ## Delete virtualenv and all cached job information
 	rm -rf $(VENV_NAME) jobs .tox
diff --git a/requirements.txt b/requirements.txt
index d6a5fc2..613a0d9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,3 +3,4 @@
 PyYAML~=5.3.1
 jsonpath-ng~=1.5.1
 Jinja2~=2.11.2
+tox~=3.21.4
diff --git a/scrape.yaml b/scrape.yaml
index 979403a..4c05aa7 100644
--- a/scrape.yaml
+++ b/scrape.yaml
@@ -8,10 +8,28 @@
 
 jenkins_jobs:
   - group: "master"
-    jenkins_url: "https://jenkins.opencord.org"
+    jenkins_url: "https://jenkins.aetherproject.org"
     credentials: "aether"
     jobs:
-      - name: "aether-member-only-jobs/job/aether_accelleran_func_production"
+      - name: "accelleran_func_production"
+        name_override: "aether-production"
+        extract:
+          id: "id"
+          result: "result"
+          timestamp: "timestamp"
+          artifacts: "artifacts[*].fileName"
+
+---
+product_name: "Sercomm SCE42255W-BCS-A5 smallcell"
+product_link: "https://opennetworking.org/products/sercomm-sce4255w-bcs-a5/"
+onf_project: "Aether"
+
+jenkins_jobs:
+  - group: "master"
+    jenkins_url: "https://jenkins.aetherproject.org"
+    credentials: "aether"
+    jobs:
+      - name: "sercomm_func_production"
         name_override: "aether-production"
         extract:
           id: "id"
@@ -27,10 +45,10 @@
 
 jenkins_jobs:
   - group: "master"
-    jenkins_url: "https://jenkins.opencord.org"
+    jenkins_url: "https://jenkins.aetherproject.org"
     credentials: "aether"
     jobs:
-      - name: "aether-member-only-jobs/job/aether_accelleran_func_production"
+      - name: "accelleran_func_production"
         name_override: "aether-production"
         extract:
           id: "id"
diff --git a/tox.ini b/tox.ini
index 7f6dab8..ea569a1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,18 +8,18 @@
 [testenv]
 deps =
   -r requirements.txt
-  reuse
   flake8
   pylint
   coverage
+  unittest-xml-reporting
 
 commands=
-#  reuse
-  flake8 buildcollector.py siterender.py
-  pylint --py3k buildcollector.py siterender.py
+  flake8 setup.py buildcollector.py siterender.py
+  pylint --py3k setup.py buildcollector.py siterender.py
   coverage erase
-  coverage run -m unittest discover -s tests
+  coverage run -m xmlrunner discover -s tests --output-file junit-results.xml
   coverage report --omit=.tox*
+  coverage xml -o coverage.xml
 
 [flake8]
 max-line-length = 119