Skip to content

Commit

Permalink
Merge pull request #3 from jhipster/master
Browse files Browse the repository at this point in the history
merge upstream
  • Loading branch information
pmverma authored Oct 29, 2018
2 parents dfb73e4 + 256de8c commit 97890d1
Show file tree
Hide file tree
Showing 279 changed files with 9,317 additions and 1,145 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,11 @@
"no-multi-assign": "off",
"no-param-reassign": "off",
"no-shadow": "off"
}
},
"overrides": [
{
"files": ["test/**/*.js"],
"env": { "mocha": true }
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ test/temp/
yarn-error.log
*.sw?
/test/templates/import-jdl/*.png
.git
87 changes: 43 additions & 44 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,32 @@ cache:
- $HOME/.gradle
env:
global:
- PROFILE=dev
- RUN_APP=1
- PROTRACTOR=0
- JHIPSTER_TRAVIS=$TRAVIS_BUILD_DIR/travis
- JHIPSTER_SAMPLES=$JHIPSTER_TRAVIS/samples
- JHIPSTER_SCRIPTS=$JHIPSTER_TRAVIS/scripts
- APP_FOLDER=$HOME/app
- UAA_APP_FOLDER=$HOME/uaa
# environment properties
- SPRING_OUTPUT_ANSI_ENABLED=ALWAYS
- SPRING_JPA_SHOW_SQL=false

- JHI_PROFILE=dev
- JHI_RUN_APP=1
- JHI_PROTRACTOR=0
# if JHIPSTER_LIB_BRANCH value is release, use the release from Maven
- JHIPSTER_LIB_REPO=https://github.com/jhipster/jhipster.git
- JHIPSTER_LIB_BRANCH=release
- JHI_LIB_REPO=https://github.com/jhipster/jhipster.git
- JHI_LIB_BRANCH=release
# if JHIPSTER_BRANCH value is release, use the release from NPM
- JHIPSTER_REPO=https://github.com/jhipster/generator-jhipster.git
- JHIPSTER_BRANCH=release
- JH_DISABLE_WEBPACK_LOGS=true

- JHI_GEN_REPO=https://github.com/jhipster/generator-jhipster.git
- JHI_GEN_BRANCH=release
- 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:
- JHIPSTER=webflux-mongodb
- JHIPSTER=ngx-default PROFILE=prod PROTRACTOR=1
- JHIPSTER=ngx-psql-es-noi18n PROFILE=prod PROTRACTOR=1
- JHIPSTER=ngx-gradle-fr PROFILE=prod PROTRACTOR=1
- JHIPSTER=ngx-mariadb-oauth2-sass-infinispan PROTRACTOR=1
- JHIPSTER=ngx-h2mem-ws-nol2
- JHIPSTER=ngx-mongodb-kafka-cucumber
- JHIPSTER=ngx-session-cassandra-fr
- JHIPSTER=ngx-couchbase PROFILE=prod
- JHIPSTER=react-default PROFILE=prod PROTRACTOR=1
- JHIPSTER=react-noi18n-es-ws-gradle-session PROTRACTOR=1
- JHIPSTER=ms-ngx-gateway-eureka
- JHIPSTER=ms-ngx-gateway-eureka-oauth2 PROTRACTOR=1
- JHIPSTER=ms-ngx-gateway-consul
- JHIPSTER=ms-ngx-gateway-uaa
- JHIPSTER=ms-micro-eureka
- JHIPSTER=ms-micro-consul
- 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

#----------------------------------------------------------------------
# Install all tools and check configuration
#----------------------------------------------------------------------
before_install:
- jdk_switcher use oraclejdk8
- java -version
Expand All @@ -70,17 +57,29 @@ before_install:
- sh -e /etc/init.d/xvfb start
# Update NPM
- npm install -g npm

#----------------------------------------------------------------------
# Install JHipster and generate project+entities
#----------------------------------------------------------------------
install:
- $JHIPSTER_SCRIPTS/00-install-jhipster.sh
# generate project and entities
- $JHIPSTER_SCRIPTS/01-generate-entities.sh
- $JHIPSTER_SCRIPTS/02-generate-project.sh
- $JHIPSTER_SCRIPTS/03-replace-version-generated-project.sh
- $JHI_SCRIPTS/10-install-jhipster.sh
- $JHI_SCRIPTS/11-generate-entities.sh
- $JHI_SCRIPTS/12-generate-project.sh
- $JHI_SCRIPTS/13-replace-version-generated-project.sh
#----------------------------------------------------------------------
# Launch tests
#----------------------------------------------------------------------
script:
- $JHIPSTER_SCRIPTS/03-docker-compose.sh
- travis_wait $JHIPSTER_SCRIPTS/04-tests.sh
- $JHIPSTER_SCRIPTS/05-run.sh
- $JHIPSTER_SCRIPTS/06-sonar.sh
- $JHI_SCRIPTS/20-docker-compose.sh
- $JHI_SCRIPTS/21-tests-backend.sh
- $JHI_SCRIPTS/22-tests-frontend.sh
- $JHI_SCRIPTS/23-package.sh
- $JHI_SCRIPTS/24-tests-e2e.sh
- $JHI_SCRIPTS/25-sonar-analyze.sh

#----------------------------------------------------------------------
# Cache
#----------------------------------------------------------------------
before_cache:
- rm -rf $HOME/.m2/repository/io/github/jhipster/jhipster-framework/
- rm -rf $HOME/.m2/repository/io/github/jhipster/jhipster-dependencies/
Expand Down
138 changes: 115 additions & 23 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,118 @@
# Node.js
# Build a general Node.js application with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/vsts/pipelines/languages/javascript
#
# 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.
#

pool:
vmImage: 'Ubuntu 16.04'
jobs:
- job: Test
pool:
vmImage: 'Ubuntu 16.04'
timeoutInMinutes: 40
variables:
JHI_PROFILE: dev
JHI_RUN_APP: 1
JHI_PROTRACTOR: 0
JHI_LIB_REPO: https://github.com/jhipster/jhipster.git
JHI_LIB_BRANCH: release
JHI_GEN_REPO: https://github.com/jhipster/generator-jhipster.git
JHI_GEN_BRANCH: release
SPRING_OUTPUT_ANSI_ENABLED: NEVER
SPRING_JPA_SHOW_SQL: false
JHI_DISABLE_WEBPACK_LOGS: true
JHI_E2E_HEADLESS: true
JHI_SCRIPTS: $BUILD_REPOSITORY_LOCALPATH/test-integration/scripts

steps:
- task: NodeTool@0
inputs:
versionSpec: '8.12.0'
displayName: 'Install Node.js'
strategy:
matrix:
react-default:
JHI_APP: react-default
JHI_PROFILE: prod
JHI_PROTRACTOR: 1
react-noi18n-es-ws-gradle-session:
JHI_APP: react-noi18n-es-ws-gradle-session
JHI_PROTRACTOR: 1
ms-ngx-gateway-eureka-oauth2:
JHI_APP: ms-ngx-gateway-eureka-oauth2
JHI_PROTRACTOR: 1
ms-ngx-gateway-consul:
JHI_APP: ms-ngx-gateway-consul
ms-ngx-gateway-uaa:
JHI_APP: ms-ngx-gateway-uaa
ms-micro-consul:
JHI_APP: ms-micro-consul
ngx-session-cassandra-fr:
JHI_APP: ngx-session-cassandra-fr
ngx-couchbase:
JHI_APP: ngx-couchbase
JHI_PROFILE: prod
webflux-mongodb:
JHI_APP: webflux-mongodb

- script: |
docker version
displayName: 'docker version'
- script: |
docker-compose version
displayName: 'docker-compose version'
- script: |
npm install
displayName: 'npm install'
- script: |
npm link
displayName: 'npm link'
steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
#----------------------------------------------------------------------
- task: NodeTool@0
inputs:
versionSpec: '8.12.0'
displayName: 'TOOLS: install Node.js'
- script: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt update
sudo apt install google-chrome-stable
displayName: 'TOOLS: install google-chrome-stable'
- script: sudo npm install -g npm
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'

#----------------------------------------------------------------------
# Install JHipster and generate project+entities
#----------------------------------------------------------------------
- bash: $(JHI_SCRIPTS)/10-install-jhipster.sh
displayName: 'GENERATION: install JHipster'
- bash: $(JHI_SCRIPTS)/11-generate-entities.sh
displayName: 'GENERATION: entities'
- bash: $(JHI_SCRIPTS)/12-generate-project.sh
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'

#----------------------------------------------------------------------
# Launch tests
#----------------------------------------------------------------------
- bash: $(JHI_SCRIPTS)/20-docker-compose.sh
displayName: 'TESTS: Start docker-compose containers'
- bash: $(JHI_SCRIPTS)/21-tests-backend.sh
displayName: 'TESTS: backend'
- bash: $(JHI_SCRIPTS)/22-tests-frontend.sh
displayName: 'TESTS: frontend'
- bash: $(JHI_SCRIPTS)/23-package.sh
displayName: 'TESTS: packaging'
- bash: $(JHI_SCRIPTS)/24-tests-e2e.sh
displayName: 'TESTS: End-to-End'
6 changes: 6 additions & 0 deletions cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ Object.keys(SUB_GENERATORS).forEach(key => {
require(`./${key}`)(program.args, options, env);
/* eslint-enable */
} else {
if (key === 'server') {
logger.error('Please run "jhipster --skip-client" instead');
}
if (key === 'client') {
logger.error('Please run "jhipster --skip-server" instead');
}
runYoCommand(key, program.args, options, opts);
}
})
Expand Down
23 changes: 21 additions & 2 deletions cli/commands.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* 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.
*/
module.exports = {
app: {
default: true,
Expand All @@ -13,7 +31,8 @@ module.exports = {
desc: 'Create pipeline scripts for popular Continuous Integration/Continuous Deployment tools'
},
client: {
desc: 'Create a new JHipster client-side application based on the selected options'
desc:
'DEPRECATED: Create a new JHipster client-side application based on the selected options - Use jhipster --skip-server instead'
},
cloudfoundry: {
desc: 'Generate a `deploy/cloudfoundry` folder with a specific manifest.yml to deploy to Cloud Foundry'
Expand Down Expand Up @@ -77,7 +96,7 @@ Example:
desc: 'Deploy the current application to Rancher'
},
server: {
desc: 'Create a new JHipster server-side application'
desc: 'DEPRECATED: Create a new JHipster server-side application - Use jhipster --skip-client instead'
},
'spring-service': {
alias: 'service',
Expand Down
18 changes: 18 additions & 0 deletions cli/import-jdl.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* 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.
*/
const chalk = require('chalk');
const _ = require('lodash');
const path = require('path');
Expand Down
18 changes: 18 additions & 0 deletions cli/run-yeoman-process.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* 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.
*/
const chalk = require('chalk');

const packageJson = require('../package.json');
Expand Down
Loading

0 comments on commit 97890d1

Please sign in to comment.