http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/frontend/package.json ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/package.json b/modules/web-console/frontend/package.json index a6299df..7442229 100644 --- a/modules/web-console/frontend/package.json +++ b/modules/web-console/frontend/package.json @@ -1,31 +1,25 @@ { "name": "ignite-web-console", - "version": "1.0.0", + "version": "2.6.0", "description": "Interactive Web console for configuration, executing SQL queries and monitoring of Apache Ignite Cluster", "private": true, + "main": "index.js", "scripts": { "start": "webpack-dev-server --config ./webpack/webpack.dev.babel.js", "dev": "npm start", "build": "webpack --config ./webpack/webpack.prod.babel.js", "test": "karma start ./test/karma.conf.js", "test-watch": "npm test -- --no-single-run", - "eslint": "eslint --format node_modules/eslint-friendly-formatter app/ controllers/ ignite_modules/ -- --eff-by-issue" + "eslint": "eslint --format node_modules/eslint-friendly-formatter app/ -- --eff-by-issue" }, - "author": "", - "contributors": [ - { - "name": "", - "email": "" - } - ], "license": "Apache-2.0", "keywords": [ "Apache Ignite Web console" ], "homepage": "https://ignite.apache.org/", "engines": { - "npm": "3.x.x", - "node": "6.x.x" + "npm": ">=5.0.0", + "node": ">=8.0.0 <10.0.0" }, "os": [ "darwin", @@ -57,6 +51,42 @@ "angular-ui-grid": "^4.4.3", "angular-ui-validate": "^1.2.3", "angular1-async-filter": "^1.1.0", + "brace": "0.10.0", + "browser-update": "2.1.9", + "bson-objectid": "1.1.5", + "file-saver": "1.3.3", + "font-awesome": "4.7.0", + "jquery": "3.2.1", + "json-bigint": "0.2.3", + "jsondiffpatch": "^0.2.5", + "jszip": "3.1.5", + "lodash": "4.17.10", + "natural-compare-lite": "^1.4.0", + "nvd3": "1.8.6", + "outdent": "^0.5.0", + "pako": "1.0.6", + "roboto-font": "0.1.0", + "rxjs": "5.4.2", + "socket.io-client": "1.7.3", + "tf-metatags": "2.0.0" + }, + "devDependencies": { + "@types/angular": "^1.6.32", + "@types/angular-animate": "^1.5.8", + "@types/angular-mocks": "^1.5.11", + "@types/angular-strap": "^2.3.1", + "@types/copy-webpack-plugin": "^4.4.1", + "@types/chai": "^4.1.2", + "@types/karma": "^1.7.3", + "@types/lodash": "^4.14.77", + "@types/mini-css-extract-plugin": "^0.2.0", + "@types/mocha": "^2.2.48", + "@types/sinon": "^4.0.0", + "@types/ui-grid": "0.0.38", + "@types/webpack": "^4.4.3", + "@types/webpack-merge": "^4.1.3", + "@types/socket.io-client": "1.4.32", + "angular-mocks": "^1.6.9", "babel-core": "6.26.0", "babel-eslint": "7.2.3", "babel-loader": "7.1.4", @@ -68,9 +98,6 @@ "babel-preset-stage-1": "6.24.1", "babel-runtime": "6.26.0", "bootstrap-sass": "3.3.7", - "brace": "0.10.0", - "browser-update": "2.1.9", - "bson-objectid": "1.1.5", "copy-webpack-plugin": "^4.5.1", "css-loader": "0.28.7", "eslint": "4.3.0", @@ -79,55 +106,23 @@ "eslint-plugin-babel": "4.1.1", "expose-loader": "0.7.5", "file-loader": "1.1.11", - "file-saver": "1.3.3", - "font-awesome": "4.7.0", "html-loader": "1.0.0-alpha.0", "html-webpack-plugin": "3.2.0", - "jquery": "3.2.1", - "json-bigint": "0.2.3", "json-loader": "0.5.7", - "jsondiffpatch": "^0.2.5", - "jszip": "3.1.5", - "lodash": "4.17.10", - "mini-css-extract-plugin": "^0.4.0", - "natural-compare-lite": "^1.4.0", "node-sass": "^4.8.3", - "nvd3": "1.8.6", - "outdent": "^0.5.0", - "pako": "1.0.6", "progress-bar-webpack-plugin": "1.11.0", "pug-html-loader": "1.1.0", "pug-loader": "2.4.0", "resolve-url-loader": "2.1.0", - "roboto-font": "0.1.0", - "rxjs": "5.4.2", "sass-loader": "6.0.7", - "socket.io-client": "1.7.3", "style-loader": "0.19.0", "svg-sprite-loader": "3.0.7", - "tf-metatags": "2.0.0", "uglifyjs-webpack-plugin": "1.2.4", "webpack": "4.12.0", "webpack-cli": "2.0.14", "webpack-dev-server": "3.1.4", "webpack-merge": "4.1.3", - "worker-loader": "^2.0.0" - }, - "devDependencies": { - "@types/angular": "^1.6.32", - "@types/angular-animate": "^1.5.8", - "@types/angular-mocks": "^1.5.11", - "@types/angular-strap": "^2.3.1", - "@types/chai": "^4.1.2", - "@types/lodash": "^4.14.77", - "@types/mini-css-extract-plugin": "^0.2.0", - "@types/mocha": "^2.2.48", - "@types/sinon": "^4.0.0", - "@types/ui-grid": "0.0.38", - "@types/webpack": "^4.4.1", - "@types/webpack-merge": "^4.1.3", - "@types/socket.io-client": "1.4.32", - "angular-mocks": "^1.6.9", + "worker-loader": "^2.0.0", "app-root-path": "2.0.1", "chai": "4.1.0", "chalk": "2.1.0", @@ -142,6 +137,7 @@ "karma-mocha-reporter": "2.2.3", "karma-teamcity-reporter": "1.0.0", "karma-webpack": "4.0.0-beta.0", + "mini-css-extract-plugin": "^0.4.0", "mocha": "3.4.2", "mocha-teamcity-reporter": "1.1.1", "node-fetch": "1.7.3",
http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/frontend/test/check-doc-links/Dockerfile ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/test/check-doc-links/Dockerfile b/modules/web-console/frontend/test/check-doc-links/Dockerfile index fdf0020..a9cd821 100644 --- a/modules/web-console/frontend/test/check-doc-links/Dockerfile +++ b/modules/web-console/frontend/test/check-doc-links/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # -FROM node:8.10-alpine +FROM node:8-alpine # Install frontend & backend apps. RUN mkdir -p /opt/web-console http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/frontend/test/ci/Dockerfile ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/test/ci/Dockerfile b/modules/web-console/frontend/test/ci/Dockerfile index 96ee599..2573534 100644 --- a/modules/web-console/frontend/test/ci/Dockerfile +++ b/modules/web-console/frontend/test/ci/Dockerfile @@ -17,23 +17,16 @@ FROM alpine:edge -RUN apk update && apk upgrade && \ - apk add --no-cache bash git openssh - RUN apk --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ add \ nodejs nodejs-npm chromium xwininfo xvfb dbus eudev ttf-freefont fluxbox ENV CHROME_BIN /usr/bin/chromium-browser -# Install frontend & backend apps. -RUN mkdir -p /opt/web-console +WORKDIR /opt/web-console/frontend -# Copy source. -WORKDIR /opt/web-console -COPY . ./frontend +COPY ./package*.json ./ +RUN npm install --no-optional -# Install node modules. -WORKDIR /opt/web-console/frontend -RUN npm install +COPY . . ENTRYPOINT ["npm", "test"] http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/frontend/test/karma.conf.babel.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/test/karma.conf.babel.js b/modules/web-console/frontend/test/karma.conf.babel.js index 9bf9268..dcf6cb0 100644 --- a/modules/web-console/frontend/test/karma.conf.babel.js +++ b/modules/web-console/frontend/test/karma.conf.babel.js @@ -19,7 +19,7 @@ import path from 'path'; import testCfg from '../webpack/webpack.test'; -export default (config) => { +export default (/** @type {import('karma').Config} */ config) => { config.set({ // Base path that will be used to resolve all patterns (eg. files, exclude). basePath: path.resolve('./'), @@ -32,8 +32,8 @@ export default (config) => { 'node_modules/babel-polyfill/dist/polyfill.js', 'node_modules/angular/angular.js', 'node_modules/angular-mocks/angular-mocks.js', - 'test/**/*.test.js', - 'app/**/*.spec.js' + 'app/**/*.spec.js', + 'test/**/*.test.js' ], plugins: [ @@ -47,7 +47,7 @@ export default (config) => { // Preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor. preprocessors: { - '{app,test}/**/*.js': ['webpack'] + '+(app|test)/**/*.js': ['webpack'] }, webpack: testCfg, http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/frontend/views/index.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/views/index.pug b/modules/web-console/frontend/views/index.pug index 6384592..b9ba00b 100644 --- a/modules/web-console/frontend/views/index.pug +++ b/modules/web-console/frontend/views/index.pug @@ -15,7 +15,7 @@ limitations under the License. doctype html -html(ng-app='ignite-console' id='app' ng-strict-di) +html head base(href='/') http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/frontend/webpack/webpack.common.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/webpack/webpack.common.js b/modules/web-console/frontend/webpack/webpack.common.js index e1dd1f0..b52d5e0 100644 --- a/modules/web-console/frontend/webpack/webpack.common.js +++ b/modules/web-console/frontend/webpack/webpack.common.js @@ -28,20 +28,19 @@ import ProgressBarPlugin from 'progress-bar-webpack-plugin'; import eslintFormatter from 'eslint-friendly-formatter'; -const basedir = path.resolve('./'); -const contentBase = path.resolve('public'); -const node_modules = path.resolve('node_modules'); +const basedir = path.join(__dirname, '../'); +const contentBase = path.join(basedir, 'public'); +const node_modules = path.join(basedir, 'node_modules'); +const app = path.join(basedir, 'app'); -const app = path.resolve('app'); -const IgniteModules = process.env.IGNITE_MODULES ? path.join(process.env.IGNITE_MODULES, 'frontend') : path.resolve('ignite_modules'); - -export default { +/** @type {webpack.Configuration} */ +const config = { node: { fs: 'empty' }, // Entry points. entry: { - app: path.join(app, 'app.js'), + app: path.join(basedir, 'index.js'), browserUpdate: path.join(app, 'browserUpdate', 'index.js') }, @@ -59,9 +58,7 @@ export default { alias: { app, images: path.join(basedir, 'public/images'), - views: path.join(basedir, 'views'), - Controllers: path.join(basedir, 'controllers'), - IgniteModules + views: path.join(basedir, 'views') } }, @@ -78,7 +75,10 @@ export default { // Exclude tpl.pug files to import in bundle. { test: /^(?:(?!tpl\.pug$).)*\.pug$/, // TODO: check this regexp for correct. - loader: `pug-html?basedir=${basedir}` + loader: 'pug-html', + query: { + basedir + } }, // Render .tpl.pug files to assets folder. @@ -93,7 +93,7 @@ export default { { test: /\.js$/, enforce: 'pre', - exclude: [node_modules], + exclude: [/node_modules/], use: [{ loader: 'eslint', options: { @@ -105,7 +105,7 @@ export default { }] }, { - test: /\.(js)$/, + test: /\.js$/, exclude: [node_modules], use: [{ loader: 'babel-loader', @@ -123,17 +123,17 @@ export default { }, { test: /\.(ttf|eot|svg|woff(2)?)(\?v=[\d.]+)?(\?[a-z0-9#-]+)?$/, - exclude: [contentBase, IgniteModules], + exclude: [contentBase], loader: 'file?name=assets/fonts/[name].[ext]' }, { test: /^(?:(?!url\.svg$).)*\.svg$/, - include: [contentBase, IgniteModules], + include: [contentBase], use: ['svg-sprite-loader'] }, { test: /.*\.url\.svg$/, - include: [contentBase, IgniteModules], + include: [contentBase], loader: 'file?name=assets/fonts/[name].[ext]' }, { @@ -182,17 +182,13 @@ export default { }), new webpack.optimize.AggressiveMergingPlugin({moveToParents: true}), new HtmlWebpackPlugin({ - template: './views/index.pug' + template: path.join(basedir, './views/index.pug') }), new CopyWebpackPlugin([ - { context: 'public', from: '**/*.png' }, - { context: 'public', from: '**/*.svg' }, - { context: 'public', from: '**/*.ico' }, - // Ignite modules. - { context: IgniteModules, from: '**/*.png', force: true }, - { context: IgniteModules, from: '**/*.svg', force: true }, - { context: IgniteModules, from: '**/*.ico', force: true } + { context: 'public', from: '**/*.{png,svg,ico}' } ]), new ProgressBarPlugin() ] }; + +export default config; http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/frontend/webpack/webpack.dev.babel.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/webpack/webpack.dev.babel.js b/modules/web-console/frontend/webpack/webpack.dev.babel.js index b0b6553..8f7e2a2 100644 --- a/modules/web-console/frontend/webpack/webpack.dev.babel.js +++ b/modules/web-console/frontend/webpack/webpack.dev.babel.js @@ -15,7 +15,6 @@ * limitations under the License. */ -import webpack from 'webpack'; import merge from 'webpack-merge'; import path from 'path'; @@ -52,7 +51,8 @@ export default merge(commonCfg, { { loader: 'sass-loader', options: { - sourceMap: true + sourceMap: true, + includePaths: [ path.join(__dirname, '../') ] } } ] http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/frontend/webpack/webpack.prod.babel.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/webpack/webpack.prod.babel.js b/modules/web-console/frontend/webpack/webpack.prod.babel.js index aaca632..a5aa1c6 100644 --- a/modules/web-console/frontend/webpack/webpack.prod.babel.js +++ b/modules/web-console/frontend/webpack/webpack.prod.babel.js @@ -15,6 +15,7 @@ * limitations under the License. */ +import path from 'path'; import merge from 'webpack-merge'; const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -22,6 +23,8 @@ import UglifyJSPlugin from 'uglifyjs-webpack-plugin'; import commonCfg from './webpack.common'; +const basedir = path.join(__dirname, '../'); + export default merge(commonCfg, { bail: true, // Cancel build on error. mode: 'production', @@ -33,7 +36,12 @@ export default merge(commonCfg, { }, { test: /\.scss$/, - use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'] + use: [MiniCssExtractPlugin.loader, 'css-loader', { + loader: 'sass', + options: { + includePaths: [basedir] + } + }] } ] }, http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/modules/web-console/pom.xml ---------------------------------------------------------------------- diff --git a/modules/web-console/pom.xml b/modules/web-console/pom.xml index 7558dab..25a6540 100644 --- a/modules/web-console/pom.xml +++ b/modules/web-console/pom.xml @@ -35,7 +35,12 @@ <url>http://ignite.apache.org</url> <properties> - <node.version>v8.9.0</node.version> + <node.version>v8.11.2</node.version> + <docker.registry.host>docker.io</docker.registry.host> + <docker.repository>apacheignite</docker.repository> + <docker.backend.image>web-console-backend</docker.backend.image> + <docker.frontend.image>web-console-frontend</docker.frontend.image> + <docker.standalone.image>web-console-standalone</docker.standalone.image> </properties> <dependencies> @@ -47,210 +52,370 @@ </dependency> </dependencies> - <build> - <pluginManagement> - <plugins> - <plugin> - <groupId>com.github.eirslett</groupId> - <artifactId>frontend-maven-plugin</artifactId> - <version>1.6</version> - <configuration> - <nodeVersion>${node.version}</nodeVersion> - <installDirectory>target</installDirectory> - </configuration> - </plugin> - </plugins> - </pluginManagement> + <profiles> + <profile> + <id>direct-install</id> - <plugins> - <plugin> - <groupId>com.github.eirslett</groupId> - <artifactId>frontend-maven-plugin</artifactId> - - <executions> - <execution> - <id>install node and npm for frontend</id> - <goals> - <goal>install-node-and-npm</goal> - </goals> - </execution> - - <execution> - <id>download dependencies for frontend</id> - <goals> - <goal>npm</goal> - </goals> - - <configuration> - <workingDirectory>frontend</workingDirectory> - <arguments>install --no-optional --prod</arguments> - </configuration> - </execution> - - <execution> - <id>download dependencies for backend</id> - <goals> - <goal>npm</goal> - </goals> - - <configuration> - <workingDirectory>backend</workingDirectory> - <arguments>install --no-optional</arguments> - </configuration> - </execution> - - <execution> - <id>build frontend</id> - <goals> - <goal>npm</goal> - </goals> - - <phase>compile</phase> - - <configuration> - <workingDirectory>frontend</workingDirectory> - <arguments>run build</arguments> - <environmentVariables> - <NODE_ENV>production</NODE_ENV> - </environmentVariables> - </configuration> - </execution> - - <execution> - <id>build backend</id> - <goals> - <goal>npm</goal> - </goals> - - <phase>compile</phase> - - <configuration> - <workingDirectory>backend</workingDirectory> - <arguments>run build</arguments> - </configuration> - </execution> - </executions> - </plugin> + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>com.github.eirslett</groupId> + <artifactId>frontend-maven-plugin</artifactId> + <version>1.6</version> + <configuration> + <nodeVersion>${node.version}</nodeVersion> + <installDirectory>target</installDirectory> + </configuration> + </plugin> + </plugins> + </pluginManagement> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-clean-plugin</artifactId> - <version>2.5</version> - <executions> - <execution> - <id>clean-frontend-build</id> - <goals> - <goal>clean</goal> - </goals> - <phase>process-resources</phase> - <configuration> - <excludeDefaultDirectories>true</excludeDefaultDirectories> - <filesets> - <fileset> - <directory>${project.basedir}/frontend/build</directory> - </fileset> - </filesets> - </configuration> - </execution> - - <execution> - <id>clean-backend-build</id> - <goals> - <goal>clean</goal> - </goals> - <phase>process-resources</phase> - <configuration> - <excludeDefaultDirectories>true</excludeDefaultDirectories> - <filesets> - <fileset> - <directory>${project.basedir}/backend/build</directory> - </fileset> - </filesets> - </configuration> - </execution> - - <execution> - <id>remove-old-getos</id> - <goals> - <goal>clean</goal> - </goals> - <phase>process-resources</phase> - <configuration> - <excludeDefaultDirectories>true</excludeDefaultDirectories> - <filesets> - <fileset> - <directory>${project.basedir}/backend/node_modules/mongodb-download/node_modules</directory> - </fileset> - </filesets> - </configuration> - </execution> - </executions> - </plugin> + <plugins> + <plugin> + <groupId>com.github.eirslett</groupId> + <artifactId>frontend-maven-plugin</artifactId> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.7</version> - <executions> - <execution> - <id>fixed-rhel-detection</id> - <goals> - <goal>run</goal> - </goals> - <phase>process-resources</phase> - <configuration> - <target> - <replace dir="${basedir}/backend/node_modules/mongodb-download/built" - token="/rhel/" value="/Red Hat Linux/i.test(os.dist) || /rhel/"> - <include name="mongodb-download.js"/> - </replace> - </target> - </configuration> - </execution> - - <execution> - <id>fixed-download-url</id> - <goals> - <goal>run</goal> - </goals> - <phase>process-resources</phase> - <configuration> - <target> - <replace dir="${basedir}/backend/node_modules/mongodb-download/built" - token="http://downloads.mongodb.org" value="https://fastdl.mongodb.org"> - <include name="mongodb-download.js"/> - </replace> - </target> - </configuration> - </execution> - </executions> - </plugin> + <executions> + <execution> + <id>install node and npm for frontend</id> + <goals> + <goal>install-node-and-npm</goal> + </goals> + </execution> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.4</version> - <inherited>false</inherited> - - <executions> - <execution> - <id>release-direct-install</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - <configuration> - <descriptors> - <descriptor>assembly/direct-install.xml</descriptor> - </descriptors> - <finalName>ignite-web-console-direct-install-${project.version}</finalName> - <outputDirectory>target</outputDirectory> - <appendAssemblyId>false</appendAssemblyId> - </configuration> - </execution> - </executions> - </plugin> + <execution> + <id>download dependencies for frontend</id> + <goals> + <goal>npm</goal> + </goals> + + <configuration> + <workingDirectory>frontend</workingDirectory> + <arguments>install --no-optional</arguments> + </configuration> + </execution> + + <execution> + <id>download dependencies for backend</id> + <goals> + <goal>npm</goal> + </goals> + + <configuration> + <workingDirectory>backend</workingDirectory> + <arguments>install --no-optional --production</arguments> + </configuration> + </execution> + + <execution> + <id>build frontend</id> + <goals> + <goal>npm</goal> + </goals> + + <phase>compile</phase> + + <configuration> + <workingDirectory>frontend</workingDirectory> + <arguments>run build</arguments> + <environmentVariables> + <NODE_ENV>production</NODE_ENV> + </environmentVariables> + </configuration> + </execution> + + <execution> + <id>build backend</id> + <goals> + <goal>npm</goal> + </goals> + <phase>compile</phase> + + <configuration> + <workingDirectory>backend</workingDirectory> + <arguments>run build</arguments> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>2.5</version> + <executions> + <execution> + <id>clean-frontend-build</id> + <goals> + <goal>clean</goal> + </goals> + <phase>process-resources</phase> + <configuration> + <excludeDefaultDirectories>true</excludeDefaultDirectories> + <filesets> + <fileset> + <directory>${project.basedir}/frontend/build</directory> + </fileset> + </filesets> + </configuration> + </execution> + + <execution> + <id>clean-backend-build</id> + <goals> + <goal>clean</goal> + </goals> + <phase>process-resources</phase> + <configuration> + <excludeDefaultDirectories>true</excludeDefaultDirectories> + <filesets> + <fileset> + <directory>${project.basedir}/backend/build</directory> + </fileset> + </filesets> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.7</version> + + <dependencies> + <dependency> + <groupId>ant-contrib</groupId> + <artifactId>ant-contrib</artifactId> + <version>1.0b3</version> + <exclusions> + <exclusion> + <groupId>ant</groupId> + <artifactId>ant</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <executions> + <execution> + <id>fixed-getos-logic-path</id> + <goals> + <goal>run</goal> + </goals> + <phase>process-resources</phase> + <configuration> + + <tasks> + <taskdef resource="net/sf/antcontrib/antlib.xml"/> + <if> + <available + file="${project.basedir}/backend/node_modules/mongodb-download/node_modules/getos/index.js"/> + <then> + <replace dir="${project.basedir}/backend/node_modules/mongodb-download/node_modules/getos" + token='"./logic/"' value='__dirname+"/logic/"'> + <include name="index.js"/> + </replace> + </then> + </if> + </tasks> + </configuration> + </execution> + + <execution> + <id>fixed-rhel-detection</id> + <goals> + <goal>run</goal> + </goals> + <phase>process-resources</phase> + <configuration> + <target> + <replace dir="${project.basedir}/backend/node_modules/mongodb-download/built" + token="/rhel/" value="/Red Hat Linux/i.test(os.dist) || /rhel/"> + <include name="mongodb-download.js"/> + </replace> + </target> + </configuration> + </execution> + + <execution> + <id>fixed-download-url</id> + <goals> + <goal>run</goal> + </goals> + <phase>process-resources</phase> + <configuration> + <target> + <replace dir="${project.basedir}/backend/node_modules/mongodb-download/built" + token="https://downloads.mongodb.org" value="https://fastdl.mongodb.org"> + <include name="mongodb-download.js"/> + </replace> + </target> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.4</version> + <inherited>false</inherited> + + <executions> + <execution> + <id>release-direct-install</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <descriptors> + <descriptor>assembly/direct-install.xml</descriptor> + </descriptors> + <finalName>ignite-web-console-direct-install-${project.version}</finalName> + <outputDirectory>target</outputDirectory> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>docker-image</id> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <executions> + <execution> + <id>docker-build-backend</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>docker</executable> + <arguments> + <argument>build</argument> + <argument>-f</argument> + <argument>docker/compose/backend/Dockerfile</argument> + <argument>-t</argument> + <argument> + ${docker.registry.host}/${docker.repository}/${docker.backend.image}:${project.version} + </argument> + <argument>${project.basedir}</argument> + </arguments> + </configuration> + </execution> + + <execution> + <id>docker-build-frontend</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>docker</executable> + <arguments> + <argument>build</argument> + <argument>-f</argument> + <argument>docker/compose/frontend/Dockerfile</argument> + <argument>-t</argument> + <argument> + ${docker.registry.host}/${docker.repository}/${docker.frontend.image}:${project.version} + </argument> + <argument>${project.basedir}</argument> + </arguments> + </configuration> + </execution> + + <execution> + <id>docker-build-standalone</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>docker</executable> + <arguments> + <argument>build</argument> + <argument>-f</argument> + <argument>docker/standalone/Dockerfile</argument> + <argument>-t</argument> + <argument> + ${docker.registry.host}/${docker.repository}/${docker.standalone.image}:${project.version} + </argument> + <argument>${project.basedir}</argument> + </arguments> + </configuration> + </execution> + + <execution> + <id>docker-push-backend</id> + <phase>deploy</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>docker</executable> + <arguments> + <argument>push</argument> + <argument> + ${docker.registry.host}/${docker.repository}/${docker.backend.image}:${project.version} + </argument> + </arguments> + </configuration> + </execution> + + <execution> + <id>docker-push-frontend</id> + <phase>deploy</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>docker</executable> + <arguments> + <argument>push</argument> + <argument> + ${docker.registry.host}/${docker.repository}/${docker.frontend.image}:${project.version} + </argument> + </arguments> + </configuration> + </execution> + + <execution> + <id>docker-push-standalone</id> + <phase>deploy</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>docker</executable> + <arguments> + <argument>push</argument> + <argument> + ${docker.registry.host}/${docker.repository}/${docker.standalone.image}:${project.version} + </argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + + <build> + <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> http://git-wip-us.apache.org/repos/asf/ignite/blob/4c295f8f/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index 1dea4be..b554968 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -926,18 +926,18 @@ <exclude>**/*.ps1</exclude> <exclude>**/*.json</exclude> <!--web console--> - <exclude>**/.babelrc</exclude> - <exclude>**/.eslintrc</exclude> - <exclude>**/.dockerignore</exclude> - <exclude>**/backend/config/settings.json.sample</exclude> - <exclude>**/backend/node_modules/**</exclude> - <exclude>**/e2e/testcafe/node_modules/**</exclude> - <exclude>**/frontend/build/**</exclude> - <exclude>**/frontend/public/images/**/*.png</exclude> - <exclude>**/frontend/public/images/**/*.svg</exclude> - <exclude>**/frontend/ignite_modules/**</exclude> - <exclude>**/frontend/ignite_modules_temp/**</exclude> - <exclude>**/frontend/node_modules/**</exclude> + <exclude>**/web-console/**/.eslintrc</exclude> + <exclude>**/web-console/**/.dockerignore</exclude> + <exclude>**/web-console/**/.babelrc</exclude> + <exclude>**/web-console/**/*.json</exclude> + <exclude>**/web-console/**/*.json.sample</exclude> + <exclude>**/web-console/backend/build/**</exclude> + <exclude>**/web-console/backend/node_modules/**</exclude> + <exclude>**/web-console/e2e/testcafe/node_modules/**</exclude> + <exclude>**/web-console/frontend/build/**</exclude> + <exclude>**/web-console/frontend/node_modules/**</exclude> + <exclude>**/web-console/frontend/**/*.png</exclude> + <exclude>**/web-console/frontend/**/*.svg</exclude> <!--Packaging --> <exclude>packaging/**</exclude> </excludes>