@stechquick/symphony-cli 0.2.271

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.md +378 -0
  2. package/bin/run +5 -0
  3. package/bin/run.cmd +3 -0
  4. package/lib/commands/mui-create.d.ts +14 -0
  5. package/lib/commands/mui-create.js +39 -0
  6. package/lib/commands/nc-addcomp.d.ts +11 -0
  7. package/lib/commands/nc-addcomp.js +22 -0
  8. package/lib/commands/nc-build.d.ts +9 -0
  9. package/lib/commands/nc-build.js +20 -0
  10. package/lib/commands/nc-create.d.ts +14 -0
  11. package/lib/commands/nc-create.js +38 -0
  12. package/lib/commands/qui-build.d.ts +6 -0
  13. package/lib/commands/qui-build.js +16 -0
  14. package/lib/commands/qui-create.d.ts +14 -0
  15. package/lib/commands/qui-create.js +39 -0
  16. package/lib/commands/qui-start.d.ts +9 -0
  17. package/lib/commands/qui-start.js +30 -0
  18. package/lib/commands/quick-serve.d.ts +17 -0
  19. package/lib/commands/quick-serve.js +73 -0
  20. package/lib/commands/sym-addfunc.d.ts +12 -0
  21. package/lib/commands/sym-addfunc.js +21 -0
  22. package/lib/commands/sym-build.d.ts +12 -0
  23. package/lib/commands/sym-build.js +56 -0
  24. package/lib/commands/sym-create-module.d.ts +14 -0
  25. package/lib/commands/sym-create-module.js +39 -0
  26. package/lib/commands/sym-create.d.ts +14 -0
  27. package/lib/commands/sym-create.js +39 -0
  28. package/lib/commands/sym-fn-deploy.d.ts +24 -0
  29. package/lib/commands/sym-fn-deploy.js +152 -0
  30. package/lib/commands/sym-nano-deploy.d.ts +11 -0
  31. package/lib/commands/sym-nano-deploy.js +50 -0
  32. package/lib/commands/sym-start.d.ts +14 -0
  33. package/lib/commands/sym-start.js +28 -0
  34. package/lib/commands/sym-test.d.ts +6 -0
  35. package/lib/commands/sym-test.js +12 -0
  36. package/lib/helpers/deploy/fnDeployHelper.d.ts +28 -0
  37. package/lib/helpers/deploy/fnDeployHelper.js +196 -0
  38. package/lib/helpers/deploy/nanoDeployHelper.d.ts +20 -0
  39. package/lib/helpers/deploy/nanoDeployHelper.js +83 -0
  40. package/lib/helpers/fnDownloadHelper.d.ts +11 -0
  41. package/lib/helpers/fnDownloadHelper.js +64 -0
  42. package/lib/helpers/initHelper.d.ts +22 -0
  43. package/lib/helpers/initHelper.js +78 -0
  44. package/lib/helpers/microUIHelper.d.ts +10 -0
  45. package/lib/helpers/microUIHelper.js +33 -0
  46. package/lib/helpers/namedComponent/ncHelper.d.ts +15 -0
  47. package/lib/helpers/namedComponent/ncHelper.js +60 -0
  48. package/lib/helpers/npmHelper.d.ts +23 -0
  49. package/lib/helpers/npmHelper.js +79 -0
  50. package/lib/helpers/packageHelper.d.ts +14 -0
  51. package/lib/helpers/packageHelper.js +32 -0
  52. package/lib/helpers/shellHelper.d.ts +25 -0
  53. package/lib/helpers/shellHelper.js +52 -0
  54. package/lib/helpers/socketServer/socketServerHelper.d.ts +14 -0
  55. package/lib/helpers/socketServer/socketServerHelper.js +106 -0
  56. package/lib/helpers/typeHelper.d.ts +3 -0
  57. package/lib/helpers/typeHelper.js +22 -0
  58. package/lib/helpers/ui/createuiHelper.d.ts +10 -0
  59. package/lib/helpers/ui/createuiHelper.js +33 -0
  60. package/lib/helpers/ui/quiBuilder.d.ts +13 -0
  61. package/lib/helpers/ui/quiBuilder.js +163 -0
  62. package/lib/helpers/utils.d.ts +8 -0
  63. package/lib/helpers/utils.js +20 -0
  64. package/lib/index.d.ts +1 -0
  65. package/lib/index.js +4 -0
  66. package/lib/pathFinder.d.ts +4 -0
  67. package/lib/pathFinder.js +13 -0
  68. package/lib/predeploy/src/fn/fnPostdeploy.d.ts +5 -0
  69. package/lib/predeploy/src/fn/fnPostdeploy.js +49 -0
  70. package/lib/predeploy/src/fn/fnPredeploy.d.ts +4 -0
  71. package/lib/predeploy/src/fn/fnPredeploy.js +30 -0
  72. package/lib/predeploy/src/nano/nanoPostdeploy.d.ts +5 -0
  73. package/lib/predeploy/src/nano/nanoPostdeploy.js +41 -0
  74. package/lib/predeploy/src/nano/nanoPredeploy.d.ts +4 -0
  75. package/lib/predeploy/src/nano/nanoPredeploy.js +25 -0
  76. package/lib/predeploy/src/paramReplacer.d.ts +7 -0
  77. package/lib/predeploy/src/paramReplacer.js +14 -0
  78. package/lib/predeploy/src/predeployCommon.d.ts +15 -0
  79. package/lib/predeploy/src/predeployCommon.js +83 -0
  80. package/oclif.manifest.json +1 -0
  81. package/package.json +76 -0
  82. package/templates/addModule/{{ModuleName}}/.jenkins/dev.yaml +43 -0
  83. package/templates/addModule/{{ModuleName}}/README.md +2 -0
  84. package/templates/addModule/{{ModuleName}}/index.ts +1 -0
  85. package/templates/addModule/{{ModuleName}}/src/implementation/object.ts +16 -0
  86. package/templates/addModule/{{ModuleName}}/src/module.ts +9 -0
  87. package/templates/addModule/{{ModuleName}}/tsconfig.json +66 -0
  88. package/templates/addModule/{{ModuleName}}/webpack.config.js +41 -0
  89. package/templates/addModule/{{ModuleName}}/{{remove}}.gitignore +6 -0
  90. package/templates/addModule/{{ModuleName}}/{{remove}}package.json +33 -0
  91. package/templates/addfunc/functions/{{FuncName}}/config.yaml +25 -0
  92. package/templates/addfunc/functions/{{FuncName}}/func.yaml +9 -0
  93. package/templates/addfunc/functions/{{FuncName}}/{{FuncName}}.ts +8 -0
  94. package/templates/addfunc/unitTest/{{FuncName}}.test.ts +18 -0
  95. package/templates/createmicroui/{{MicroUIName}}-ui/.babelrc +17 -0
  96. package/templates/createmicroui/{{MicroUIName}}-ui/.editorconfig +9 -0
  97. package/templates/createmicroui/{{MicroUIName}}-ui/.postcssrc.js +8 -0
  98. package/templates/createmicroui/{{MicroUIName}}-ui/README.md +45 -0
  99. package/templates/createmicroui/{{MicroUIName}}-ui/build/build.js +41 -0
  100. package/templates/createmicroui/{{MicroUIName}}-ui/build/check-versions.js +49 -0
  101. package/templates/createmicroui/{{MicroUIName}}-ui/build/dev-client.js +10 -0
  102. package/templates/createmicroui/{{MicroUIName}}-ui/build/dev-server.js +107 -0
  103. package/templates/createmicroui/{{MicroUIName}}-ui/build/utils.js +73 -0
  104. package/templates/createmicroui/{{MicroUIName}}-ui/build/vue-loader.conf.js +19 -0
  105. package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.base.conf.js +76 -0
  106. package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.dev.conf.js +39 -0
  107. package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.prod.conf.js +128 -0
  108. package/templates/createmicroui/{{MicroUIName}}-ui/build/webpack.test.conf.js +32 -0
  109. package/templates/createmicroui/{{MicroUIName}}-ui/build.gradle +251 -0
  110. package/templates/createmicroui/{{MicroUIName}}-ui/config/dev.env.js +7 -0
  111. package/templates/createmicroui/{{MicroUIName}}-ui/config/index.js +50 -0
  112. package/templates/createmicroui/{{MicroUIName}}-ui/config/prod.env.js +4 -0
  113. package/templates/createmicroui/{{MicroUIName}}-ui/config/test.env.js +7 -0
  114. package/templates/createmicroui/{{MicroUIName}}-ui/copyBundle.js +3 -0
  115. package/templates/createmicroui/{{MicroUIName}}-ui/gradle/base/repos.gradle +48 -0
  116. package/templates/createmicroui/{{MicroUIName}}-ui/gradle/wrapper/gradle-wrapper.jar +0 -0
  117. package/templates/createmicroui/{{MicroUIName}}-ui/gradle/wrapper/gradle-wrapper.properties +6 -0
  118. package/templates/createmicroui/{{MicroUIName}}-ui/gradlew +172 -0
  119. package/templates/createmicroui/{{MicroUIName}}-ui/index.html +11 -0
  120. package/templates/createmicroui/{{MicroUIName}}-ui/index.js +18 -0
  121. package/templates/createmicroui/{{MicroUIName}}-ui/indexCompNames.js +14 -0
  122. package/templates/createmicroui/{{MicroUIName}}-ui/indexInitial.js +8 -0
  123. package/templates/createmicroui/{{MicroUIName}}-ui/indexModuleName.js +1 -0
  124. package/templates/createmicroui/{{MicroUIName}}-ui/indexVCompNames.json +50 -0
  125. package/templates/createmicroui/{{MicroUIName}}-ui/package.json +84 -0
  126. package/templates/createmicroui/{{MicroUIName}}-ui/removeDist.js +2 -0
  127. package/templates/createmicroui/{{MicroUIName}}-ui/src/App.vue +54 -0
  128. package/templates/createmicroui/{{MicroUIName}}-ui/src/api/index.js +5 -0
  129. package/templates/createmicroui/{{MicroUIName}}-ui/src/components/index.js +6 -0
  130. package/templates/createmicroui/{{MicroUIName}}-ui/src/docker/nginx.conf +39 -0
  131. package/templates/createmicroui/{{MicroUIName}}-ui/src/localization/en/default.json +3 -0
  132. package/templates/createmicroui/{{MicroUIName}}-ui/src/localization/tr/default.json +3 -0
  133. package/templates/createmicroui/{{MicroUIName}}-ui/src/main.js +15 -0
  134. package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/handlers/health.js +8 -0
  135. package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/index.js +8 -0
  136. package/templates/createmicroui/{{MicroUIName}}-ui/src/mockserver/server.js +45 -0
  137. package/templates/createmicroui/{{MicroUIName}}-ui/src/pages/index.js +6 -0
  138. package/templates/createmicroui/{{MicroUIName}}-ui/src/router/index.js +5 -0
  139. package/templates/createmicroui/{{MicroUIName}}-ui/src/service/serviceConstants.js +1 -0
  140. package/templates/createmicroui/{{MicroUIName}}-ui/src/store/index.js +14 -0
  141. package/templates/createmicroui/{{MicroUIName}}-ui/src/worker/a9e657cbf4abb977edda.worker.js +60638 -0
  142. package/templates/createmicroui/{{MicroUIName}}-ui/static/.gitkeep +0 -0
  143. package/templates/createmicroui/{{MicroUIName}}-ui/webpack.config.js +257 -0
  144. package/templates/createui/{{UIName}}/Jenkinsfile +20 -0
  145. package/templates/createui/{{UIName}}/build.gradle +266 -0
  146. package/templates/createui/{{UIName}}/gradle/base/repos.gradle +93 -0
  147. package/templates/createui/{{UIName}}/gradle/wrapper/gradle-wrapper.jar +0 -0
  148. package/templates/createui/{{UIName}}/gradle/wrapper/gradle-wrapper.properties +6 -0
  149. package/templates/createui/{{UIName}}/gradlew +172 -0
  150. package/templates/createui/{{UIName}}/gradlew.bat +90 -0
  151. package/templates/createui/{{UIName}}/settings/globalLocalization.qjson +29 -0
  152. package/templates/createui/{{UIName}}/settings/localProxy.yaml +25 -0
  153. package/templates/createui/{{UIName}}/settings/qjson/alert.qjson +920 -0
  154. package/templates/createui/{{UIName}}/settings/qjson/loading.qjson +1486 -0
  155. package/templates/createui/{{UIName}}/settings/qjson/logHandler.qjson +65 -0
  156. package/templates/createui/{{UIName}}/settings/qjson/pipeline.qjson +116 -0
  157. package/templates/createui/{{UIName}}/settings/settings-proxy.js +120 -0
  158. package/templates/createui/{{UIName}}/settings/settings.yaml +85 -0
  159. package/templates/createui/{{UIName}}/settings.gradle +1 -0
  160. package/templates/createui/{{UIName}}/static/components/yourNamedCompHere.js +0 -0
  161. package/templates/createui/{{UIName}}/static/css/main.css +36 -0
  162. package/templates/createui/{{UIName}}/static/css/myDarkTheme.css +143 -0
  163. package/templates/createui/{{UIName}}/static/css/myHappyTheme1.css +140 -0
  164. package/templates/createui/{{UIName}}/static/css/myHappyTheme2.css +140 -0
  165. package/templates/createui/{{UIName}}/static/images/ahelogo.png +0 -0
  166. package/templates/createui/{{UIName}}/static/images/avatar.png +0 -0
  167. package/templates/createui/{{UIName}}/static/images/profile.png +0 -0
  168. package/templates/createui/{{UIName}}/static/images/profile2.png +0 -0
  169. package/templates/createui/{{UIName}}/static/images/yourImagesHere.png +0 -0
  170. package/templates/createui/{{UIName}}/static/js/componentList.ts +4452 -0
  171. package/templates/createui/{{UIName}}/static/qjsons/VDatatableConditionalRowColoring.qjson +158 -0
  172. package/templates/createui/{{UIName}}/static/qjsons/alertSamplePage.qjson +772 -0
  173. package/templates/createui/{{UIName}}/static/qjsons/complicatedSamplePage.qjson +10448 -0
  174. package/templates/createui/{{UIName}}/static/qjsons/customComponentSample.qjson +803 -0
  175. package/templates/createui/{{UIName}}/static/qjsons/customerInfoCustomComp.qjson +1451 -0
  176. package/templates/createui/{{UIName}}/static/qjsons/first.qjson +2180 -0
  177. package/templates/createui/{{UIName}}/static/qjsons/formatterSample.qjson +877 -0
  178. package/templates/createui/{{UIName}}/static/qjsons/localizationSample.qjson +1845 -0
  179. package/templates/createui/{{UIName}}/static/qjsons/pipelineSample.qjson +913 -0
  180. package/templates/createui/{{UIName}}/static/qjsons/validationSample.qjson +2371 -0
  181. package/templates/createui/{{UIName}}/static/qjsons/webDashboardSample.qjson +2993 -0
  182. package/templates/createui/{{UIName}}/{{remove}}.gitignore +3 -0
  183. package/templates/createui/{{UIName}}/{{remove}}package.json +22 -0
  184. package/templates/fnPredeploy/Dockerfile +22 -0
  185. package/templates/init/{{AppName}}/.vscode/launch.json +24 -0
  186. package/templates/init/{{AppName}}/Jenkinsfile +36 -0
  187. package/templates/init/{{AppName}}/app.yaml +1 -0
  188. package/templates/init/{{AppName}}/functions/qjsonfunc/func.yaml +9 -0
  189. package/templates/init/{{AppName}}/functions/qjsonfunc/qjsonfunc.ts +3 -0
  190. package/templates/init/{{AppName}}/functions/qjsonfunc/qjsons/test.qjson +180 -0
  191. package/templates/init/{{AppName}}/functions/samplefunc/config.yaml +46 -0
  192. package/templates/init/{{AppName}}/functions/samplefunc/func.yaml +9 -0
  193. package/templates/init/{{AppName}}/functions/samplefunc/samplefunc.ts +27 -0
  194. package/templates/init/{{AppName}}/jest.config.js +8 -0
  195. package/templates/init/{{AppName}}/local.ts +6 -0
  196. package/templates/init/{{AppName}}/sym-engine/config.yaml +7 -0
  197. package/templates/init/{{AppName}}/sym-engine/localization.yaml +5 -0
  198. package/templates/init/{{AppName}}/sym-engine/pipeline.ts +64 -0
  199. package/templates/init/{{AppName}}/test/qjson.http +29 -0
  200. package/templates/init/{{AppName}}/test/sample.http +24 -0
  201. package/templates/init/{{AppName}}/tsconfig.json +66 -0
  202. package/templates/init/{{AppName}}/unitTest/samplefunc.test.ts +55 -0
  203. package/templates/init/{{AppName}}/{{remove}}.gitignore +6 -0
  204. package/templates/init/{{AppName}}/{{remove}}package.json +40 -0
  205. package/templates/nanoPredeploy/Dockerfile +27 -0
  206. package/templates/nc-addComp/{{ComponentName}}.vue +29 -0
  207. package/templates/nc-create/{{ProjectName}}/shims/shims-vue.d.ts +4 -0
  208. package/templates/nc-create/{{ProjectName}}/src/namedComps/{{ProjectName}}.vue +29 -0
  209. package/templates/nc-create/{{ProjectName}}/tsconfig.json +66 -0
  210. package/templates/nc-create/{{ProjectName}}/webpack.config.js +2 -0
  211. package/templates/nc-create/{{ProjectName}}/{{remove}}.gitignore +3 -0
  212. package/templates/nc-create/{{ProjectName}}/{{remove}}package.json +28 -0
@@ -0,0 +1,128 @@
1
+ 'use strict'
2
+ const path = require('path')
3
+ const utils = require('./utils')
4
+ const webpack = require('webpack')
5
+ const config = require('../config')
6
+ const merge = require('webpack-merge')
7
+ const baseWebpackConfig = require('./webpack.base.conf')
8
+ const CopyWebpackPlugin = require('copy-webpack-plugin')
9
+ const HtmlWebpackPlugin = require('html-webpack-plugin')
10
+ const ExtractTextPlugin = require('extract-text-webpack-plugin')
11
+ const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12
+
13
+ const env = process.env.NODE_ENV === 'testing'
14
+ ? require('../config/test.env')
15
+ : config.build.env
16
+
17
+ const webpackConfig = merge(baseWebpackConfig, {
18
+ module: {
19
+ rules: utils.styleLoaders({
20
+ sourceMap: config.build.productionSourceMap,
21
+ extract: true
22
+ })
23
+ },
24
+ devtool: config.build.productionSourceMap ? '#source-map' : false,
25
+ output: {
26
+ path: config.build.assetsRoot,
27
+ filename: utils.assetsPath('js/[name].[chunkhash].js'),
28
+ chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
29
+ },
30
+ plugins: [
31
+ // http://vuejs.github.io/vue-loader/en/workflow/production.html
32
+ new webpack.DefinePlugin({
33
+ 'process.env': env
34
+ }),
35
+ // UglifyJs do not support ES6+, you can also use babel-minify for better treeshaking: https://github.com/babel/minify
36
+ new webpack.optimize.UglifyJsPlugin({
37
+ compress: {
38
+ warnings: false
39
+ },
40
+ sourceMap: true
41
+ }),
42
+ // extract css into its own file
43
+ new ExtractTextPlugin({
44
+ filename: utils.assetsPath('css/[name].[contenthash].css')
45
+ }),
46
+ // Compress extracted CSS. We are using this plugin so that possible
47
+ // duplicated CSS from different components can be deduped.
48
+ new OptimizeCSSPlugin({
49
+ cssProcessorOptions: {
50
+ safe: true
51
+ }
52
+ }),
53
+ // generate dist index.html with correct asset hash for caching.
54
+ // you can customize output by editing /index.html
55
+ // see https://github.com/ampedandwired/html-webpack-plugin
56
+ new HtmlWebpackPlugin({
57
+ filename: process.env.NODE_ENV === 'testing'
58
+ ? 'index.html'
59
+ : config.build.index,
60
+ template: 'index.html',
61
+ inject: true,
62
+ minify: {
63
+ removeComments: true,
64
+ collapseWhitespace: true,
65
+ removeAttributeQuotes: true
66
+ // more options:
67
+ // https://github.com/kangax/html-minifier#options-quick-reference
68
+ },
69
+ // necessary to consistently work with multiple chunks via CommonsChunkPlugin
70
+ chunksSortMode: 'dependency'
71
+ }),
72
+ // keep module.id stable when vender modules does not change
73
+ new webpack.HashedModuleIdsPlugin(),
74
+ // split vendor js into its own file
75
+ new webpack.optimize.CommonsChunkPlugin({
76
+ name: 'vendor',
77
+ minChunks: function (module) {
78
+ // any required modules inside node_modules are extracted to vendor
79
+ return (
80
+ module.resource &&
81
+ /\.js$/.test(module.resource) &&
82
+ module.resource.indexOf(
83
+ path.join(__dirname, '../node_modules')
84
+ ) === 0
85
+ )
86
+ }
87
+ }),
88
+ // extract webpack runtime and module manifest to its own file in order to
89
+ // prevent vendor hash from being updated whenever app bundle is updated
90
+ new webpack.optimize.CommonsChunkPlugin({
91
+ name: 'manifest',
92
+ chunks: ['vendor']
93
+ }),
94
+ // copy custom static assets
95
+ new CopyWebpackPlugin([
96
+ {
97
+ from: path.resolve(__dirname, '../static'),
98
+ to: config.build.assetsSubDirectory,
99
+ ignore: ['.*']
100
+ }
101
+ ])
102
+ ]
103
+ })
104
+
105
+ if (config.build.productionGzip) {
106
+ const CompressionWebpackPlugin = require('compression-webpack-plugin')
107
+
108
+ webpackConfig.plugins.push(
109
+ new CompressionWebpackPlugin({
110
+ asset: '[path].gz[query]',
111
+ algorithm: 'gzip',
112
+ test: new RegExp(
113
+ '\\.(' +
114
+ config.build.productionGzipExtensions.join('|') +
115
+ ')$'
116
+ ),
117
+ threshold: 10240,
118
+ minRatio: 0.8
119
+ })
120
+ )
121
+ }
122
+
123
+ if (config.build.bundleAnalyzerReport) {
124
+ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
125
+ webpackConfig.plugins.push(new BundleAnalyzerPlugin())
126
+ }
127
+
128
+ module.exports = webpackConfig
@@ -0,0 +1,32 @@
1
+ 'use strict'
2
+ // This is the webpack config used for unit tests.
3
+
4
+ const utils = require('./utils')
5
+ const webpack = require('webpack')
6
+ const merge = require('webpack-merge')
7
+ const baseWebpackConfig = require('./webpack.base.conf')
8
+
9
+ const webpackConfig = merge(baseWebpackConfig, {
10
+ // use inline sourcemap for karma-sourcemap-loader
11
+ module: {
12
+ rules: utils.styleLoaders()
13
+ },
14
+ devtool: '#inline-source-map',
15
+ resolveLoader: {
16
+ alias: {
17
+ // necessary to to make lang="scss" work in test when using vue-loader's ?inject option
18
+ // see discussion at https://github.com/vuejs/vue-loader/issues/724
19
+ 'scss-loader': 'sass-loader'
20
+ }
21
+ },
22
+ plugins: [
23
+ new webpack.DefinePlugin({
24
+ 'process.env': require('../config/test.env')
25
+ })
26
+ ]
27
+ })
28
+
29
+ // no need for app entry during tests
30
+ delete webpackConfig.entry
31
+
32
+ module.exports = webpackConfig
@@ -0,0 +1,251 @@
1
+ apply plugin: 'com.bmuschko.docker-remote-api'
2
+ import com.bmuschko.gradle.docker.tasks.image.Dockerfile
3
+ import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
4
+ import com.bmuschko.gradle.docker.tasks.image.DockerPushImage
5
+
6
+ buildscript {
7
+
8
+ ext {
9
+ dockerPubVersionExtentions = System.env.BUILD_NUMBER ?: "XXX"
10
+ dockerRegistery = System.env.DOCKER_REGISTRY ?: "gcr.io/rally"
11
+ dockerApiUrl = System.env.DOCKER_API_URL ?: "dummy_api_url"
12
+ dockerUsername = System.env.DOCKER_USERNAME ?: "dummy_docker_username"
13
+ dockerPassword = System.env.DOCKER_PASSWORD ?: "dummy_docker_userpass"
14
+
15
+ appVersion = rootProject.version
16
+
17
+ nexusPubVersion = "".concat(project.appVersion.toString())
18
+ dockerPubVersion = "".concat(project.appVersion.toString()).concat("-").concat(dockerPubVersionExtentions)
19
+ dockerMajorPubVersion = "".concat(project.appVersion.toString().tokenize('.')[0])
20
+ dockerMinorPubVersion = "".concat(dockerMajorPubVersion.toString()).concat(".").concat(project.appVersion.toString().tokenize('.')[1])
21
+ dockerIncrementalPubVersion = "".concat(dockerMinorPubVersion.toString()).concat(".").concat(project.appVersion.toString().tokenize('.')[2])
22
+ if (project.appVersion.endsWith('-SNAPSHOT')){
23
+ dockerQualifierpubVersion = "SNAPSHOT-latest"
24
+ }else{
25
+ dockerQualifierpubVersion = "RELEASE-latest"
26
+ }
27
+ }
28
+ apply from: 'gradle/base/repos.gradle'
29
+
30
+ repositories.addAll(repos)
31
+ dependencies {
32
+ classpath 'com.bmuschko:gradle-docker-plugin:3.2.4'
33
+ }
34
+ }
35
+
36
+ docker {
37
+ url = dockerApiUrl
38
+
39
+ registryCredentials {
40
+ url = 'https://' + dockerRegistery
41
+ username = dockerUsername
42
+ password = dockerPassword
43
+ }
44
+ }
45
+
46
+ task createNginxConfFile() {
47
+ def dockerFolder = new File("src", "docker")
48
+ println("dockerFolder: "+dockerFolder)
49
+
50
+ if( !dockerFolder.exists() ) {
51
+ println("creating dockerFolder")
52
+
53
+ if(dockerFolder.mkdirs()) {
54
+ println("succeeded in making folder")
55
+
56
+ if(dockerFolder.exists()) {
57
+ println("folder exists")
58
+ } else {
59
+ println("folder does not exist")
60
+ }
61
+ } else {
62
+ println("failed to make folder")
63
+ }
64
+ } else {
65
+ println("folder exists already")
66
+ }
67
+ new File("src/docker", "nginx.conf").text = """
68
+ worker_processes 1;
69
+
70
+ error_log /var/log/nginx/error.log warn;
71
+ pid /var/run/nginx.pid;
72
+
73
+ events {
74
+ worker_connections 1024;
75
+ }
76
+
77
+ http {
78
+ include /etc/nginx/mime.types;
79
+ default_type application/octet-stream;
80
+
81
+ log_format main '\$remote_addr - \$remote_user [\$time_local] "\$request" '
82
+ '\$status \$body_bytes_sent "\$http_referer" '
83
+ '"\$http_user_agent" "\$http_x_forwarded_for"';
84
+
85
+ access_log /var/log/nginx/access.log main;
86
+
87
+ sendfile on;
88
+
89
+ keepalive_timeout 65;
90
+
91
+ server {
92
+ listen 8889;
93
+ server_name ~^${rootProject.name}-ui\\.(?<kubens>.+)\\.dev\\.rally\\.softtech;
94
+ root /usr/share/nginx/html/;
95
+
96
+
97
+ location / {
98
+ try_files \$uri \$uri/ index.html;
99
+ }
100
+
101
+ error_page 500 502 503 504;
102
+
103
+ }
104
+ }
105
+
106
+ """
107
+
108
+ }
109
+
110
+ task createDockerfile(type: Dockerfile) {
111
+ dependsOn createNginxConfFile
112
+ destFile = project.file('dockerbuild/Dockerfile')
113
+ from 'nginx:1.14.0'
114
+ maintainer 'Rally Architecture Team'
115
+ runCommand 'mkdir /usr/share/nginx/html/microui'
116
+ runCommand 'mkdir /usr/share/nginx/html/microui/'.concat(rootProject.name)
117
+ addFile '/dist', '/usr/share/nginx/html/microui/'.concat(rootProject.name).concat('/')
118
+ copyFile 'nginx.conf', '/etc/nginx'
119
+ exposePort(8889)
120
+
121
+ //entryPoint('service','nginx','start')
122
+ entryPoint("nginx", "-g", "daemon off;")
123
+ }
124
+
125
+ task buildDocker(type: DockerBuildImage) {
126
+ dependsOn createDockerfile
127
+ inputDir file('dockerbuild')
128
+ tags = ["".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerPubVersion.toString()),
129
+ "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerMajorPubVersion.toString()),
130
+ "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerMinorPubVersion.toString()),
131
+ "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerIncrementalPubVersion.toString()),
132
+ "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat(dockerQualifierpubVersion.toString()),
133
+ "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui:").concat("latest")]
134
+ doFirst {
135
+ copy {
136
+ from file('dist')
137
+ into file('dockerbuild/dist')
138
+ }
139
+ copy {
140
+ from file('src/docker/nginx.conf')
141
+ into file('dockerbuild')
142
+ }
143
+ copy {
144
+ from file('src/docker/java.png')
145
+ into file('dockerbuild')
146
+ }
147
+ }
148
+ }
149
+
150
+ task pushTask(type: DockerPushImage) {
151
+ dependsOn buildDocker
152
+ imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
153
+ tag = "".concat(dockerPubVersion.toString())
154
+ }
155
+
156
+ task dockerMajorPush(type: DockerPushImage) {
157
+ dependsOn pushTask
158
+ imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
159
+ tag = "".concat(dockerMajorPubVersion.toString())
160
+ }
161
+
162
+ task dockerMinorPush(type: DockerPushImage) {
163
+ dependsOn dockerMajorPush
164
+ imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
165
+ tag = "".concat(dockerMinorPubVersion.toString())
166
+ }
167
+
168
+ task dockerIncrementalPush(type: DockerPushImage) {
169
+ dependsOn dockerMinorPush
170
+ imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
171
+ tag = "".concat(dockerIncrementalPubVersion.toString())
172
+ }
173
+
174
+ task dockerQualifierPush(type: DockerPushImage) {
175
+ dependsOn dockerIncrementalPush
176
+ imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
177
+ tag = "".concat(dockerQualifierpubVersion.toString())
178
+ }
179
+
180
+ task dockerPublish(type: DockerPushImage) {
181
+ dependsOn dockerQualifierPush
182
+ imageName = "".concat(dockerRegistery).concat("/rally/").concat(rootProject.name).concat("-ui")
183
+ tag = "latest"
184
+ }
185
+
186
+ task tarDist(type: Tar) {
187
+ baseName "rally-".concat(rootProject.name).concat("-ui-").concat(nexusPubVersion.toString())
188
+ destinationDir = file('build/distributions')
189
+ extension = 'tgz'
190
+ compression = Compression.GZIP
191
+ from('dist') {
192
+ into('/')
193
+ }
194
+ }
195
+
196
+ apply plugin: 'maven-publish'
197
+
198
+ def mvnInfo
199
+ if (rootProject.version.endsWith('-SNAPSHOT')){
200
+ mvnInfo = mvnSnapshotRepo
201
+ } else {
202
+ mvnInfo = mvnReleaseRepo
203
+ }
204
+ publishing {
205
+ publications {
206
+ mavenJava(MavenPublication) {
207
+ groupId 'rally'
208
+ artifactId "".concat(rootProject.name).concat("-ui")
209
+ version "".concat(nexusPubVersion.toString())
210
+ artifact tarDist
211
+ }
212
+ }
213
+
214
+ repositories {
215
+ maven {
216
+ url mvnInfo.url
217
+ credentials {
218
+ username = mvnInfo.username
219
+ password = mvnInfo.password
220
+ }
221
+ }
222
+ }
223
+ }
224
+
225
+ task build {
226
+ doLast {
227
+ exec {
228
+ commandLine "sh", "-c", "sed --in-place 's/\"version\":\\(.*\\)\"\\(.*[0-9]\\).\\(.*\\)\"/\"version\": \"\\2.${System.env.BUILD_NUMBER}\"/' $projectDir/package.json"
229
+ }
230
+ exec {
231
+ commandLine "rm", "-f", "package-lock.json"
232
+ }
233
+ exec {
234
+ commandLine "npm", "install"
235
+ }
236
+ exec {
237
+ commandLine "npm", "run","qbuild"
238
+ }
239
+ }
240
+ }
241
+
242
+ task mavenPublish {
243
+ doLast {
244
+ exec {
245
+ commandLine "rm", "-f", "package-lock.json"
246
+ }
247
+ exec {
248
+ commandLine "npm", "publish", "--registry=${System.env.NEXUS_NPM_HOSTED_URL}"
249
+ }
250
+ }
251
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+ const merge = require('webpack-merge')
3
+ const prodEnv = require('./prod.env')
4
+
5
+ module.exports = merge(prodEnv, {
6
+ NODE_ENV: '"development"'
7
+ })
@@ -0,0 +1,50 @@
1
+
2
+ 'use strict'
3
+ // Template version: 1.1.3
4
+ // see http://vuejs-templates.github.io/webpack for documentation.
5
+
6
+ const path = require('path')
7
+
8
+ module.exports = {
9
+ build: {
10
+ env: require('./prod.env'),
11
+ index: path.resolve(__dirname, '../dist/index.html'),
12
+ assetsRoot: path.resolve(__dirname, '../dist'),
13
+ assetsSubDirectory: 'static',
14
+ assetsPublicPath: '/',
15
+ productionSourceMap: true,
16
+ // Gzip off by default as many popular static hosts such as
17
+ // Surge or Netlify already gzip all static assets for you.
18
+ // Before setting to `true`, make sure to:
19
+ // npm install --save-dev compression-webpack-plugin
20
+ productionGzip: false,
21
+ productionGzipExtensions: ['js', 'css'],
22
+ // Run the build command with an extra argument to
23
+ // View the bundle analyzer report after build finishes:
24
+ // `npm run build --report`
25
+ // Set to `true` or `false` to always turn it on or off
26
+ bundleAnalyzerReport: process.env.npm_config_report
27
+ },
28
+
29
+ dev: {
30
+ env: require('./dev.env'),
31
+ port: process.env.PORT || 3000,
32
+ autoOpenBrowser: true,
33
+ assetsSubDirectory: 'static',
34
+ assetsPublicPath: '/',
35
+ proxyTable: {
36
+ 'api' : {
37
+ target: 'http://127.0.0.1:2000',
38
+ pathRewrite: {
39
+
40
+ }
41
+ }
42
+ },
43
+ // CSS Sourcemaps off by default because relative paths are "buggy"
44
+ // with this option, according to the CSS-Loader README
45
+ // (https://github.com/webpack/css-loader#sourcemaps)
46
+ // In our experience, they generally work as expected,
47
+ // just be aware of this issue when enabling this option.
48
+ cssSourceMap: false
49
+ }
50
+ }
@@ -0,0 +1,4 @@
1
+ 'use strict'
2
+ module.exports = {
3
+ NODE_ENV: '"production"'
4
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+ const merge = require('webpack-merge')
3
+ const devEnv = require('./dev.env')
4
+
5
+ module.exports = merge(devEnv, {
6
+ NODE_ENV: '"testing"'
7
+ })
@@ -0,0 +1,3 @@
1
+ const moduleName = require("./indexModuleName");
2
+ const goRun = require("microuiexternal/external/moduleBundleCopier");
3
+ goRun.GoRun(moduleName);
@@ -0,0 +1,48 @@
1
+ def nexusURL = System.getenv('NEXUS_URL') ?: 'http://nexus.rally.softtech'
2
+
3
+ ext.mvnUser = findProperty('mvnUser') ?: System.getenv('MAVEN_USER')
4
+ if(! ext.mvnUser) {
5
+ ext.mvnUser = 'uploader'
6
+ }
7
+
8
+ ext.mvnPassword = findProperty('mvnPassword') ?: System.getenv('MAVEN_PWD')
9
+ if(! ext.mvnPassword) {
10
+ ext.mvnPassword = 'S@FTt_ch81112!?'
11
+ }
12
+
13
+ ext {
14
+ mvnPublicRepo = [
15
+ 'url' : "$nexusURL/repository/public/",
16
+ 'username' : mvnUser,
17
+ 'password' : mvnPassword
18
+ ]
19
+
20
+ mvnReleaseRepo = [
21
+ 'url' : "$nexusURL/repository/maven-releases/",
22
+ 'username' : mvnUser,
23
+ 'password' : mvnPassword
24
+ ]
25
+
26
+ mvnSnapshotRepo = [
27
+ 'url' : "$nexusURL/repository/maven-snapshots/",
28
+ 'username' : mvnUser,
29
+ 'password' : mvnPassword
30
+ ]
31
+
32
+ mvnCommonsPublishRepo = mvnReleaseRepo
33
+ }
34
+
35
+ // define how the dependencies are resolved
36
+ repositories {
37
+ mavenLocal()
38
+ maven {
39
+ name 'cloudNexus'
40
+ url mvnPublicRepo.url
41
+ credentials {
42
+ username mvnPublicRepo.username
43
+ password mvnPublicRepo.password
44
+ }
45
+ }
46
+ }
47
+
48
+ ext.repos = repositories
@@ -0,0 +1,6 @@
1
+ #Sat Feb 08 12:04:39 EET 2020
2
+ distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip
3
+ distributionBase=GRADLE_USER_HOME
4
+ distributionPath=wrapper/dists
5
+ zipStorePath=wrapper/dists
6
+ zipStoreBase=GRADLE_USER_HOME