Skip to content

Commit

Permalink
Merge pull request #5 from jhipster/master
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
pmverma authored Nov 25, 2018
2 parents 0551427 + 9875384 commit e105d00
Show file tree
Hide file tree
Showing 472 changed files with 4,788 additions and 9,247 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ yarn-error.log
*.sw?
/test/templates/import-jdl/*.png
.git
.classpath
.factorypath
.project
.settings
test/**/*.png
44 changes: 34 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#
# Copyright 2013-2018 the original author or authors from the JHipster project.
#
# This file is part of the JHipster project, see https://www.jhipster.tech/
# for more information.
#
# Licensed 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.
#

os:
- linux
services:
- docker
language: node_js
node_js:
- "8.12.0"
- "10.13.0"
jdk:
- oraclejdk8
addons:
Expand All @@ -22,25 +41,27 @@ env:
- JHI_PROFILE=dev
- JHI_RUN_APP=1
- JHI_PROTRACTOR=0
# if JHIPSTER_LIB_BRANCH value is release, use the release from Maven
# if JHI_LIB_BRANCH value is release, use the release from Maven
- JHI_LIB_REPO=https://github.com/jhipster/jhipster.git
- JHI_LIB_BRANCH=release
# if JHIPSTER_BRANCH value is release, use the release from NPM
# if JHI_GEN_BRANCH value is release, use the release from NPM
- JHI_GEN_REPO=https://github.com/jhipster/generator-jhipster.git
- JHI_GEN_BRANCH=release
# specific config
- SPRING_OUTPUT_ANSI_ENABLED=ALWAYS
- SPRING_JPA_SHOW_SQL=false
- JHI_DISABLE_WEBPACK_LOGS=true
- JHI_E2E_HEADLESS=true
- JHI_SCRIPTS=$TRAVIS_BUILD_DIR/test-integration/scripts
matrix:
- JHI_APP=ngx-default JHI_PROFILE=prod JHI_PROTRACTOR=1
- JHI_APP=ngx-psql-es-noi18n JHI_PROFILE=prod JHI_PROTRACTOR=1
- JHI_APP=ngx-gradle-fr JHI_PROFILE=prod JHI_PROTRACTOR=1
- JHI_APP=ngx-mariadb-oauth2-sass-infinispan JHI_PROTRACTOR=1
- JHI_APP=ms-ngx-gateway-eureka
- JHI_APP=ms-micro-eureka
- JHI_APP=ngx-mongodb-kafka-cucumber
- JHI_APP=jdl-default JHI_ENTITY=jdl JHI_PROFILE=prod JHI_PROTRACTOR=1
- JHI_APP=ngx-default JHI_PROFILE=prod JHI_PROTRACTOR=1 JHI_ENTITY=sql JHI_SONAR=1
- JHI_APP=ngx-psql-es-noi18n JHI_PROFILE=prod JHI_PROTRACTOR=1 JHI_ENTITY=sqlfull
- JHI_APP=ngx-gradle-fr JHI_PROFILE=prod JHI_PROTRACTOR=1 JHI_ENTITY=sql
- JHI_APP=ngx-mariadb-oauth2-sass-infinispan JHI_PROTRACTOR=1 JHI_ENTITY=sql
- JHI_APP=ms-ngx-gateway-eureka JHI_ENTITY=sql
- JHI_APP=ms-micro-eureka JHI_ENTITY=micro
- JHI_APP=ngx-mongodb-kafka-cucumber JHI_ENTITY=mongodb

#----------------------------------------------------------------------
# Install all tools and check configuration
Expand All @@ -57,6 +78,7 @@ before_install:
- sh -e /etc/init.d/xvfb start
# Update NPM
- npm install -g npm
- $JHI_SCRIPTS/04-git-config.sh

#----------------------------------------------------------------------
# Install JHipster and generate project+entities
Expand All @@ -66,6 +88,8 @@ install:
- $JHI_SCRIPTS/11-generate-entities.sh
- $JHI_SCRIPTS/12-generate-project.sh
- $JHI_SCRIPTS/13-replace-version-generated-project.sh
- $JHI_SCRIPTS/14-jhipster-info.sh

#----------------------------------------------------------------------
# Launch tests
#----------------------------------------------------------------------
Expand Down
18 changes: 7 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Before you submit your pull request consider the following guidelines:
mvn spring-boot:run
```

- You can also run our travis build locally by following [this](#local-travis-build)
- You can generate our Continuous Integration (with Travis CI and Azure Pipelines) by following [this](#local-build)

- Commit your changes using a descriptive commit message that follows our
[commit message conventions](#commit-message-format).
Expand Down Expand Up @@ -243,24 +243,20 @@ To start debugging JHipster with **VSCode**, open the generator code in your wor
It is also possible to debug sub generators by selecting one of the other debug options (for example `jhipster entity`). Those debug configurations are specified in the `.vscode/launch.json` file.
## Local Travis Build
## Local Build
You can run the travis builds locally by following below commands
You can run the builds locally by following below commands
CD into the travis folder `cd travis` from the generator source code root folder
Go into the `test-integration` folder with `cd test-integration` from the generator source code root folder
Run `./build-samples.sh [command_name] [sample_name:optional]`
Run `./generate-sample.sh <command_name> [folder] [sample_name:optional] [type of entity]`
This will create the travis sample project under the `travis/samples` folder with folder name `[sample_name]-sample`. You can open this application in your editor or IDE to check it further. You can also run tests locally on the project to verify
Sample name is optional and can be any of the folder name in the `travis/samples` folder. If not specified the it will mean all samples
This will create a folder with configuration and entities. Then, you can generate manually a JHipster project and test it.
Command name can be as below
`list`: List all sample names
`generate`: Generate the sample if specified else generate all samples
`build` : Generate and test the sample if specified else generate and test all samples
`clean` : Clean the generated code for the sample if specified else clean all samples
`generate`: Generate the sample
## <a name="rules"></a> Coding Rules
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ RUN \
g++ \
libpng-dev \
build-essential && \

# install node.js
curl -sL https://deb.nodesource.com/setup_8.x | bash && \
apt-get install -y nodejs && \
wget https://nodejs.org/dist/v10.13.0/node-v10.13.0-linux-x64.tar.gz -O /tmp/node.tar.gz && \
tar -C /usr/local --strip-components 1 -xzf /tmp/node.tar.gz && \
# upgrade npm
npm install -g npm && \
# install yarn
Expand Down Expand Up @@ -54,7 +53,7 @@ RUN \
# fix jhipster user permissions
chown -R jhipster:jhipster \
/home/jhipster \
/usr/lib/node_modules && \
/usr/local/lib/node_modules && \
# cleanup
rm -rf \
/home/jhipster/.cache/ \
Expand Down
63 changes: 42 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,61 @@ Support this project by becoming a sponsor! [Become a sponsor](https://opencolle

**Thank you to our sponsors!**

**Gold sponsors!**

[![Okta][okta-image]][okta-url]

**Bronze sponsors!**

[![ForsysLab][forsyslab-image]][forsyslab-url]

[![CUBA Platform][cubaplatform-image]][cubaplatform-url]

[![Intesys][intesys-image]][intesys-url]

**Thank you to all our backers!**

[![Backers][backers-image]][backers-url]

## Travis Builds

Additional builds on [hipster-labs/jhipster-travis-build](https://github.com/hipster-labs/jhipster-travis-build)

| Type | Status | Description |
| :------------ | :------------------------------------------------- | :----------------------------- |
| docker | [![Build Status][image-docker]][travis-url] | Build for testing Docker image |
| ngx-maven | [![Build Status][image-ngx-maven]][travis-url] | Builds for ngx Maven |
| ngx-gradle | [![Build Status][image-ngx-gradle]][travis-url] | Builds for ngx Gradle |
| microservices | [![Build Status][image-microservices]][travis-url] | Builds for Microservices |
| ms-gradle | [![Build Status][image-ms-gradle]][travis-url] | Builds for MS+Gradle |
| react | [![Build Status][image-react]][travis-url] | Builds for React |
| node latest | [![Build Status][image-node-latest]][travis-url] | Builds for Node Latest |
## Azure Builds

Additional builds at [hipster-labs/jhipster-daily-builds](https://github.com/hipster-labs/jhipster-daily-builds)

| Type | Status |
|:---------------------|:-------------------------------------------------------|
| Docker | [![Build Status][img-docker]][azure-url] |
| Angular.Maven | [![Build Status][img-angular-maven]][azure-url] |
| Angular.Maven.NoSQL | [![Build Status][img-angular-maven-nosql]][azure-url] |
| Angular.Gradle | [![Build Status][img-angular-gradle]][azure-url] |
| Angular.Gradle.NoSQL | [![Build Status][img-angular-gradle-nosql]][azure-url] |
| React.Maven | [![Build Status][img-react-maven]][azure-url] |
| React.Maven.NoSQL | [![Build Status][img-react-maven-nosql]][azure-url] |
| React.Gradle | [![Build Status][img-react-gradle]][azure-url] |
| React.Gradle.NoSQL | [![Build Status][img-react-gradle-nosql]][azure-url] |
| Elasticsearch | [![Build Status][img-elasticsearch]][azure-url] |
| Microservices.JWT | [![Build Status][img-ms-jwt]][azure-url] |
| Microservices.OAuth2 | [![Build Status][img-ms-oauth2]][azure-url] |
| Microservices.UAA | [![Build Status][img-ms-uaa]][azure-url] |

## Analysis of the sample JHipster project

[![sonar-quality-gate][sonar-quality-gate]][sonar-url] [![sonar-coverage][sonar-coverage]][sonar-url] [![sonar-bugs][sonar-bugs]][sonar-url] [![sonar-vulnerabilities][sonar-vulnerabilities]][sonar-url]

[travis-url]: https://travis-ci.org/hipster-labs/jhipster-travis-build/branches
[image-docker]: https://travis-ci.org/hipster-labs/jhipster-travis-build.svg?branch=docker
[image-ngx-maven]: https://travis-ci.org/hipster-labs/jhipster-travis-build.svg?branch=ngx-maven
[image-ngx-gradle]: https://travis-ci.org/hipster-labs/jhipster-travis-build.svg?branch=ngx-gradle
[image-microservices]: https://travis-ci.org/hipster-labs/jhipster-travis-build.svg?branch=microservices
[image-ms-gradle]: https://travis-ci.org/hipster-labs/jhipster-travis-build.svg?branch=microservices-gradle
[image-react]: https://travis-ci.org/hipster-labs/jhipster-travis-build.svg?branch=react
[image-node-latest]: https://travis-ci.org/hipster-labs/jhipster-travis-build.svg?branch=node-latest
[azure-url]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_build
[img-docker]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Docker.Image
[img-angular-maven]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Angular.Maven
[img-angular-maven-nosql]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Angular.Maven.NoSQL
[img-angular-gradle]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Angular.Gradle
[img-angular-gradle-nosql]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Angular.Gradle.NoSQL
[img-react-maven]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/React.Maven
[img-react-maven-nosql]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/React.Maven.NoSQL
[img-react-gradle]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/React.Gradle
[img-react-gradle-nosql]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/React.Gradle.NoSQL
[img-elasticsearch]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Elasticsearch
[img-ms-jwt]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Microservices.JWT
[img-ms-oauth2]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Microservices.OAuth2
[img-ms-uaa]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Microservices.UAA

[sonar-url]: https://sonarcloud.io/dashboard?id=io.github.jhipster.sample%3Ajhipster-sample-application
[sonar-quality-gate]: https://sonarcloud.io/api/project_badges/measure?project=io.github.jhipster.sample%3Ajhipster-sample-application&metric=alert_status
[sonar-coverage]: https://sonarcloud.io/api/project_badges/measure?project=io.github.jhipster.sample%3Ajhipster-sample-application&metric=coverage
Expand All @@ -73,5 +92,7 @@ Additional builds on [hipster-labs/jhipster-travis-build](https://github.com/hip
[forsyslab-url]: https://forsyslab.com/
[cubaplatform-image]: https://www.jhipster.tech/images/open-collective/cubaplatform.png
[cubaplatform-url]: https://www.cuba-platform.com/
[intesys-image]: https://www.jhipster.tech/images/open-collective/intesys.png
[intesys-url]: https://www.intesys.it/
[issue-template]: https://github.com/jhipster/generator-jhipster/issues/new?template=BUG_REPORT.md
[feature-template]: https://github.com/jhipster/generator-jhipster/issues/new?template=FEATURE_REQUEST.md
35 changes: 26 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ jobs:
JHI_PROFILE: dev
JHI_RUN_APP: 1
JHI_PROTRACTOR: 0
# if JHI_LIB_BRANCH value is release, use the release from Maven
JHI_LIB_REPO: https://github.com/jhipster/jhipster.git
JHI_LIB_BRANCH: release
# if JHI_GEN_BRANCH value is release, use the release from NPM
JHI_GEN_REPO: https://github.com/jhipster/generator-jhipster.git
JHI_GEN_BRANCH: release
# specific config
SPRING_OUTPUT_ANSI_ENABLED: NEVER
SPRING_JPA_SHOW_SQL: false
JHI_DISABLE_WEBPACK_LOGS: true
Expand All @@ -41,33 +44,45 @@ jobs:
JHI_APP: react-default
JHI_PROFILE: prod
JHI_PROTRACTOR: 1
JHI_ENTITY: sql
react-noi18n-es-ws-gradle-session:
JHI_APP: react-noi18n-es-ws-gradle-session
JHI_PROTRACTOR: 1
JHI_ENTITY: sql
ms-ngx-gateway-eureka-oauth2:
JHI_APP: ms-ngx-gateway-eureka-oauth2
JHI_PROTRACTOR: 1
JHI_ENTITY: sql
ms-ngx-gateway-consul:
JHI_APP: ms-ngx-gateway-consul
JHI_ENTITY: sql
ms-ngx-gateway-uaa:
JHI_APP: ms-ngx-gateway-uaa
JHI_ENTITY: uaa
ms-micro-consul:
JHI_APP: ms-micro-consul
JHI_ENTITY: micro
ngx-h2mem-ws-nol2:
JHI_APP: ngx-h2mem-ws-nol2
JHI_ENTITY: sql
ngx-session-cassandra-fr:
JHI_APP: ngx-session-cassandra-fr
JHI_ENTITY: cassandra
ngx-couchbase:
JHI_APP: ngx-couchbase
JHI_PROFILE: prod
JHI_ENTITY: couchbase
webflux-mongodb:
JHI_APP: webflux-mongodb
JHI_ENTITY: mongodb

steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
#----------------------------------------------------------------------
- task: NodeTool@0
inputs:
versionSpec: '8.12.0'
versionSpec: '10.13.0'
displayName: 'TOOLS: install Node.js'
- script: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
Expand All @@ -79,12 +94,10 @@ jobs:
displayName: 'TOOLS: update NPM'
- bash: $(JHI_SCRIPTS)/01-display-configuration.sh
displayName: 'TOOLS: display configuration'
# need to be deleted, as soon as JHipster Core 3.4.0+ is released
# See https://github.com/jhipster/generator-jhipster/issues/8572
- bash: $(JHI_SCRIPTS)/02-display-tools.sh
displayName: 'TOOLS: display installed tools'
- bash: $(JHI_SCRIPTS)/03-system.sh
displayName: 'TOOLS: configure tools installed by the system'
- bash: $(JHI_SCRIPTS)/04-git-config.sh
displayName: 'TOOLS: configure git'

#----------------------------------------------------------------------
# Install JHipster and generate project+entities
Expand All @@ -97,10 +110,14 @@ jobs:
displayName: 'GENERATION: project'
- bash: $(JHI_SCRIPTS)/13-replace-version-generated-project.sh
displayName: 'GENERATION: replace version in generated project'
# need to be uncommented, as soon as JHipster Core 3.4.0+ is released
# See https://github.com/jhipster/generator-jhipster/issues/8572
# - bash: $(JHI_SCRIPTS)/14-jhipster-info.sh
# displayName: 'GENERATION: jhipster info'
- bash: $(JHI_SCRIPTS)/14-jhipster-info.sh
displayName: 'GENERATION: jhipster info'

#----------------------------------------------------------------------
# Bugs fix
#----------------------------------------------------------------------
- bash: test-integration/scripts/20-no-memory-limit-elasticsearch.sh
displayName: 'BUGS-FIX: no memory limit for Elasticsearch'

#----------------------------------------------------------------------
# Launch tests
Expand Down
8 changes: 6 additions & 2 deletions cli/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,23 @@ module.exports = {
'import-jdl': {
argument: ['jdlFiles...'],
cliOnly: true,
desc: 'Create entities from the JDL file passed in argument',
desc: `Create entities from the JDL file passed in argument.
By default everything is run in parallel. If you like to interact with the console use '--interactive' flag.`,
help: `
--skip-install # Do not automatically install dependencies Default: false
--interactive # Run generation in series so that questions can be interacted with Default: false
--db # Provide DB option for the application when using skip-server flag
--json-only # Generate only the JSON files and skip entity regeneration Default: false
--ignore-application # Ignores application generation Default: false
--skip-ui-grouping # Disable the UI grouping behaviour for entity client side code Default: false
--ignore-deployments # Ignores deployments generation Default: false
--skip-ui-grouping # Disable the UI grouping behavior for entity client side code Default: false
Arguments:
jdlFiles # The JDL file names Type: String[] Required: true
Example:
jhipster import-jdl myfile.jdl
jhipster import-jdl myfile.jdl --interactive
jhipster import-jdl myfile1.jdl myfile2.jdl
`
},
Expand Down
Loading

0 comments on commit e105d00

Please sign in to comment.