Repository: ode-console Updated Branches: refs/heads/master 36e187ad8 -> a3c567d26
Added a pom file for build on CI using docker Project: http://git-wip-us.apache.org/repos/asf/ode-console/repo Commit: http://git-wip-us.apache.org/repos/asf/ode-console/commit/a3c567d2 Tree: http://git-wip-us.apache.org/repos/asf/ode-console/tree/a3c567d2 Diff: http://git-wip-us.apache.org/repos/asf/ode-console/diff/a3c567d2 Branch: refs/heads/master Commit: a3c567d26f5689799fae16a5af1e15bb1acc1d52 Parents: 36e187a Author: sathwik <[email protected]> Authored: Tue Sep 27 17:26:33 2016 +0530 Committer: sathwik <[email protected]> Committed: Tue Sep 27 17:26:33 2016 +0530 ---------------------------------------------------------------------- .gitignore | 1 + ci-build.sh | 31 ++++++++--- pom.xml | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/index.html | 2 +- 4 files changed, 181 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ode-console/blob/a3c567d2/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 234d64a..d9bf47f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ bower_components/ .sass-cache/ .tmp/ dist/ +target/ http://git-wip-us.apache.org/repos/asf/ode-console/blob/a3c567d2/ci-build.sh ---------------------------------------------------------------------- diff --git a/ci-build.sh b/ci-build.sh index af35db9..0eb68b2 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -18,21 +18,38 @@ docker pull sathwik/docker-maven-gulp:latest export JAVA_OPTS="-Xmx1024M -XX:MaxPermSize=512M" -GULP_ARGS="$@" +MVN_ARGS="$@" CONTAINER_USERNAME="dummy" CONTAINER_GROUPNAME="dummy" HOMEDIR="/home/$CONTAINER_USERNAME" GROUP_ID=$(id -g) USER_ID=$( id -u) -CREATE_USER_COMMAND="groupadd -f -g $GROUP_ID $CONTAINER_GROUPNAME && useradd -u $USER_ID -g $CONTAINER_GROUPNAME $CONTAINER_USERNAME && mkdir --parent $HOMEDIR && chown -R $CONTAINER_USERNAME:$CONTAINER_GROUPNAME $HOMEDIR" +CREATE_USER_COMMAND="groupadd -f -g $GROUP_ID $CONTAINER_GROUPNAME \ + && useradd -u $USER_ID -g $CONTAINER_GROUPNAME $CONTAINER_USERNAME \ + && mkdir --parent $HOMEDIR \ + && chown -R $CONTAINER_USERNAME:$CONTAINER_GROUPNAME $HOMEDIR" SU_USER="su $CONTAINER_USERNAME -c " NPM_COMMAND="$SU_USER 'npm install'" - -GULP_COMMAND="$SU_USER 'gulp $GULP_ARGS'" -FINAL_COMMAND="$CREATE_USER_COMMAND && $NPM_COMMAND && $GULP_COMMAND" - -docker run --rm -e JAVA_OPTS -v `pwd`:/workspace -v $HOME/.m2:/home/dummy/.m2 -v /tmp:/tmp --entrypoint bash sathwik/maven_gulp:3.9_4.5 -c "$FINAL_COMMAND" +# A hack for frontend_maven_plugin to run gulp build task command +FRONTEND_RM_COMMAND="$SU_USER 'rm -rf /workspace/node'" +FRONTEND_MK_COMMAND="$SU_USER 'mkdir /workspace/node && ln -s /opt/node/bin/node /workspace/node/node'" + +MVN_COMMAND="$SU_USER 'mvn $MVN_ARGS'" + +FINAL_COMMAND="$CREATE_USER_COMMAND \ + && $NPM_COMMAND \ + && $FRONTEND_RM_COMMAND \ + && $FRONTEND_MK_COMMAND \ + && $MVN_COMMAND \ + && $FRONTEND_RM_COMMAND" + +docker run --rm \ + -e JAVA_OPTS \ + -v `pwd`:/workspace \ + -v $HOME/.m2:/home/dummy/.m2 \ + -v /tmp:/tmp \ + --entrypoint bash sathwik/docker-maven-gulp:latest -c "$FINAL_COMMAND" http://git-wip-us.apache.org/repos/asf/ode-console/blob/a3c567d2/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..4cc1187 --- /dev/null +++ b/pom.xml @@ -0,0 +1,155 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache</groupId> + <artifactId>apache</artifactId> + <version>18</version> + </parent> + + <packaging>jar</packaging> + <groupId>org.apache.ode</groupId> + <artifactId>ode-console</artifactId> + <version>0.1.0-SNAPSHOT</version> + <name>ODE Web Console</name> + <description>ODE Process Management Admin Console</description> + <url>ode.apache.org</url> + + <scm> + <connection>scm:git:https://git-wip-us.apache.org/repos/asf/ode-console.git</connection> + <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/ode-console.git</developerConnection> + </scm> + + <issueManagement> + <system>jira</system> + <url>https://issues.apache.org/jira/browse/ODE</url> + </issueManagement> + + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + + <properties> + <node.version>v6.6.0</node.version> + <npm.version>3.10.3</npm.version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <frontend-maven-plugin.version>0.0.29</frontend-maven-plugin.version> + <maven-antrun-plugin.version>1.8</maven-antrun-plugin.version> + <maven-release-plugin.version>2.5.3</maven-release-plugin.version> + <destDir>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${project.version}</destDir> + </properties> + + <build> + <plugins> + <plugin> + <groupId>com.github.eirslett</groupId> + <artifactId>frontend-maven-plugin</artifactId> + <version>${frontend-maven-plugin.version}</version> + + <!--<configuration> + <installDirectory>target</installDirectory> + </configuration>--> + + <executions> + <!--<execution> + <id>install Node and npm</id> + <goals> + <goal>install-node-and-npm</goal> + </goals> + <configuration> + <nodeVersion>${node.version}</nodeVersion> + <npmVersion>${npm.version}</npmVersion> + </configuration> + </execution> + <execution> + <id>npm install</id> + <goals> + <goal>npm</goal> + </goals> + <configuration> + <arguments>install</arguments> + </configuration> + </execution> + <execution> + <id>npm install bower</id> + <goals> + <goal>npm</goal> + </goals> + <configuration> + <arguments>install bower</arguments> + </configuration> + </execution> + <execution> + <id>bower install</id> + <goals> + <goal>bower</goal> + </goals> + <configuration> + <arguments>install</arguments> + </configuration> + </execution>--> + <execution> + <id>gulp build</id> + <goals> + <goal>gulp</goal> + </goals> + <configuration> + <arguments>build</arguments> + </configuration> + </execution> + + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>${maven-antrun-plugin.version}</version> + <executions> + <execution> + <phase>process-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <copy todir="${destDir}"> + <fileset dir="dist/"/> + </copy> + <copy todir="${destDir}" file="src/index.html"/> + </target> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-release-plugin</artifactId> + <version>${maven-release-plugin.version}</version> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode-console/blob/a3c567d2/src/index.html ---------------------------------------------------------------------- diff --git a/src/index.html b/src/index.html index 5e17e9b..9d16a0b 100644 --- a/src/index.html +++ b/src/index.html @@ -67,7 +67,6 @@ <script src="app/st-select.directive.js"></script> <script src="vendor/jquery.xpath.js"></script> <script src="vendor/vkbeautify.js"></script> - <script src="components/navbar/navbar.controller.js"></script> <script src="app/dashboard/dashboard.controller.js"></script> <script src="app/instance/instance.controller.js"></script> <script src="app/instance/instance.service.js"></script> @@ -77,6 +76,7 @@ <script src="app/process/process.service.js"></script> <script src="app/process/processactions.controller.js"></script> <script src="app/process/processlist.controller.js"></script> + <script src="components/navbar/navbar.controller.js"></script> <!-- endinject --> <!-- inject:partials -->
