Merge branch 'master' of ssh://git.eclipse.org:29418/openk-coremodules/org.eclipse.openk-coremodules.authandauth into DEVELOP_BE
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ff3b7d9 --- /dev/null +++ b/Dockerfile
@@ -0,0 +1,7 @@ +#FROM tomcat:9.0-jdk8 +FROM tomcat:9.0-jdk8-adoptopenjdk-openj9 +MAINTAINER dimitrios.chalepakis@pta.de + +COPY deploy/conf/context.xml /usr/local/tomcat/conf/context.xml + +COPY webapps/ /usr/local/tomcat/webapps/
diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..2b2f0ed --- /dev/null +++ b/Jenkinsfile
@@ -0,0 +1,38 @@ +pipeline { + agent any + stages { + stage('Build AuthAndAuth') { + steps { + dir("AuthAndAuth") { + git branch: 'master', url: 'https://git.eclipse.org/r/openk-coremodules/org.eclipse.openk-coremodules.authandauth.git' + sh 'mvn clean package' + sh 'mkdir webapps || true' // create a webapps folder + sh 'cp target/portal.war webapps/' // move in the webapps folder-this folder will be moved in container using the Dockefile + } + } + } + stage('Build portalFE') { + steps { + dir("portalFE") { + git branch: 'master', url: 'https://git.eclipse.org/r/openk-coremodules/org.eclipse.openk-coremodules.portalFE.git' + sh 'npm install' + sh 'npm run build' + sh 'mkdir ../AuthAndAuth/webapps/portalFE || true' + sh 'cp -r dist/* ../AuthAndAuth/webapps/portalFE/' // move in AuthAndAuth/the webapps folder + } + } + } + stage('Deploy portal') { + steps { + dir("AuthAndAuth") { + sh 'docker stop portal_container || true' + sh 'docker rm portal_container || true' + sh 'docker rmi portal:MASTER || true' + sh 'docker build -f Dockerfile -t portal:MASTER --no-cache .' + sh "docker run -d --name portal_container -p 8888:8080 --restart always portal:MASTER" + sh 'rm -rf webapps || true' + } + } + } + } +}
diff --git a/deploy/conf/context.xml b/deploy/conf/context.xml index eff12ed..560cd54 100644 --- a/deploy/conf/context.xml +++ b/deploy/conf/context.xml
@@ -17,27 +17,10 @@ --> <!-- The contents of this file will be loaded for each web application --> - -<!-- jdbc:oracle:thin:@entbwora1:1521:dboetng4 --> <Context> - <!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource> - <!-- Uncomment this to disable session persistence across Tomcat restarts --> - - <!--Manager pathname=""/> - - - <Parameter name="environment" override="false" value="Development"/--> - <Parameter name="OK_PORTAL_ENVIRONMENT" override="false" value="DevLocal"/> - - <!-- Uncomment this to enable Comet connection tacking (provides events - on session expiration as well as webapp lifecycle) --> - <!-- - <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> - --> - </Context>