Skip to content

Commit

Permalink
Fix: update docker image (STAMP-project#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
henry-lp authored and danglotb committed Sep 25, 2019
1 parent 61b6c4a commit 4dbbccb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions kubernetes-support/Dpipeline-dockerimage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
FROM maven:3.6.1-jdk-8

# Download the jar file from dspot releases
#ADD https://github.com/STAMP-project/dspot/releases/download/dspot-2.2.0/dspot-2.2.0-jar-with-dependencies.jar /root/ # Uncomment when 2.2.0 is released
ADD https://github.com/STAMP-project/dspot/releases/download/dspot-2.2.0/dspot-2.2.0-jar-with-dependencies.jar /root/dspot.jar

# Add customisable Maven settings file.
# It can be used, for instance, to pass corporate proxy settings,
# otherwise download dependencies from Maven repositories will fail
COPY settings.xml /root/.m2/

#Remove when 2.2.0 is released
COPY dspot-2.1.2-jar-with-dependencies.jar /root/

COPY Dpipeline_worker.py /root/

RUN apt-get update
Expand Down
8 changes: 4 additions & 4 deletions kubernetes-support/Dpipeline-dockerimage/Dpipeline_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
def email_result (message,subject,to_email,files=[]):
# Construct basic mail content
msg = MIMEMultipart()
msg['From'] = os.getenv("GMAIL_ADDRESS") or "stampdspotresult@gmail.com"
msg['From'] = os.getenv("GMAIL_ADDRESS") or "foo@gmail.com"
msg['To'] = to_email
msg['Subject'] = subject
msg.attach(MIMEText(message, 'plain'))
Expand All @@ -112,7 +112,7 @@ def email_result (message,subject,to_email,files=[]):
server = smtplib.SMTP('smtp.gmail.com: 587')
server.starttls()
# Login Credentials for sending the mail
server.login(msg['From'], os.getenv("GMAIL_PASSWORD") or "abcde12345@")
server.login(msg['From'], os.getenv("GMAIL_PASSWORD") or "unknown")
# send the message via the server.
server.sendmail(msg['From'], msg['To'], msg.as_string())
server.quit()
Expand Down Expand Up @@ -253,7 +253,7 @@ def run_Dspot_preconfig(reposlug,repobranch,selector):
if not (os.path.isfile("clonedrepo/dspot.properties")):
return False
logging.warn("PROJECT DOES SUPPORT DSPOT")
res = exec_get_output('java -jar ../dspot-2.1.2-jar-with-dependencies.jar -p dspot.properties ' + basic_opts + RUN_OPTIONS_JAR ,True,False,"./clonedrepo/")
res = exec_get_output('java -jar ../dspot.jar -p dspot.properties ' + basic_opts + RUN_OPTIONS_JAR ,True,False,"./clonedrepo/")
error_message = ""
if res[1] == True:
error_message = "Process was TIMEOUT, RUN EXCEEDED " + str(RUN_TIMEOUT) + " minutes, currently we don't support heavy projects \n \n --STAMP/Dspot"
Expand Down Expand Up @@ -348,7 +348,7 @@ def run_Dspot_autoconfig(reposlug,repobranch,selector):
configure(module_name, module_path,
root_name, project_path, outputdir,JAVA_VERSION)
logging.warn('Running Dspot')
res = exec_get_output('java -jar dspot-2.1.2-jar-with-dependencies.jar -p project.properties ' + basic_opts + RUN_OPTIONS_JAR,True)
res = exec_get_output('java -jar dspot.jar -p project.properties ' + basic_opts + RUN_OPTIONS_JAR,True)

error_message = ""
if res[1] == True:
Expand Down

0 comments on commit 4dbbccb

Please sign in to comment.