diff options
author | Edan Binshtok <eb578m@intl.att.com> | 2017-10-18 07:56:58 +0300 |
---|---|---|
committer | Edan Binshtok <eb578m@intl.att.com> | 2017-10-18 07:56:58 +0300 |
commit | 433a8256e31f755f5e236491bbe39d3db24d6d6d (patch) | |
tree | 45f483eab1ea1654ee21a3b51c5b8bf1a8ebaffa /iceci | |
parent | f8907f0c4fc0ba4bb97a1d636a50c5b40c2642f2 (diff) |
Align CI test test and JJB
Add vendor agnostic CI test to align
Add Tox and maven docker
Issue Id: VVP-15
Change-Id: I69f0c1036e6f72b62bddc822544c55200af7b37d
Signed-off-by: Edan Binshtok <eb578m@intl.att.com>
Diffstat (limited to 'iceci')
-rw-r--r-- | iceci/mail.py | 12 | ||||
-rw-r--r-- | iceci/views.py | 5 |
2 files changed, 10 insertions, 7 deletions
diff --git a/iceci/mail.py b/iceci/mail.py index 9f23b90..80660b5 100644 --- a/iceci/mail.py +++ b/iceci/mail.py @@ -50,7 +50,7 @@ from django.conf import settings from django.core.mail import send_mail from django.utils import timezone -from services.constants import Constants +from services.constants import Constants, ServiceProvider from services.logging_service import LoggingServiceFactory @@ -59,15 +59,17 @@ admin_mail_from = settings.ICE_CONTACT_FROM_ADDRESS param = "1" logger = LoggingServiceFactory.get_logger() + def sendMail(param,email, data, mail_body, mail_subject, mail_from=admin_mail_from): logger.debug("about to send mail to " + email) - try: -# lastBuild = param + try: html_msg = mail_body.substitute(data) mail_subject = mail_subject.substitute(data) - #send mail with template - send_mail(mail_subject, '', Constants.FEGeneral.ProgramName.name +"-CI Report Test Team <" + mail_from + ">",settings.ICE_CONTACT_EMAILS , fail_silently=False, html_message=html_msg) + send_mail(mail_subject, '', ServiceProvider.PROGRAM_NAME + + "-CI Report Test Team <" + mail_from + ">", + settings.ICE_CONTACT_EMAILS , fail_silently=False, + html_message=html_msg) logger.debug("Looks like email delivery to "+email+" has succeeded") except Exception: traceback.print_exc() diff --git a/iceci/views.py b/iceci/views.py index 7e0505d..6a5a9b8 100644 --- a/iceci/views.py +++ b/iceci/views.py @@ -47,7 +47,7 @@ from rest_framework.renderers import JSONRenderer from iceci import mail from iceci.mail import testsResults_mail_body -from services.constants import Constants +from services.constants import Constants, ServiceProvider from services.logging_service import LoggingServiceFactory from .models import TestResults @@ -60,7 +60,8 @@ LAST_BUILD_REPORT_NUM = None logger = LoggingServiceFactory.get_logger() def index(request): - return HttpResponse("Hello, world. You're at the "+Constants.FEGeneral.ProgramName.name+" ci index.") + return HttpResponse("Hello, world. You're at the " + + ServiceProvider.PROGRAM_NAME + " ci index.") @csrf_exempt def testResult_list(request): # List all tests, or create a new test. |