From 0d10a022202f730cc033f93f1c9cf6bbbf2c1e03 Mon Sep 17 00:00:00 2001 From: Yevhenii Pokhvalii <68227075+YevheniiPokhvalii@users.noreply.github.com> Date: Fri, 5 Mar 2021 15:58:08 +0200 Subject: [PATCH] Create maven-publish.yml --- .github/workflows/maven-publish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 000000000..e36996108 --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,24 @@ +FROM tutum/tomcat + +RUN rm -rf /tomcat/webapps/* + +#install maven and git to build project +RUN apt-get update && apt-get install -y wget git-core maven + +RUN mkdir /opt/aspectj && cd /opt/aspectj &&\ + wget -O aspectjweaver-1.8.2.jar http://search.maven.org/remotecontent?filepath=org/aspectj/aspectjweaver/1.8.2/aspectjweaver-1.8.2.jar + +ADD ./setenv.sh /tomcat/bin/setenv.sh + +# Pull petclinic +RUN git clone https://github.com/stagemonitor/spring-petclinic.git + +# Build petclinic +WORKDIR /spring-petclinic +RUN rm src/main/resources/stagemonitor.properties + +ADD ./stagemonitor.properties /spring-petclinic/src/main/resources/stagemonitor.properties + +RUN mvn package &&\ + mv /spring-petclinic/target/petclinic.war /tomcat/webapps/petclinic.war &&\ + rm -rf /spring-petclinic