Skip to content

Commit

Permalink
azure pipeline improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddell committed Dec 2, 2018
1 parent a17529f commit 2f2e670
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 26 deletions.
14 changes: 9 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,27 @@ jobs:
strategy:
matrix:
jwt:
JHI_IGNITE_APP_NAME: JwtApp
JHI_AUTH_TYPE: jwt
JHI_DTO: false
jwt-dto:
JHI_IGNITE_APP_NAME: JwtDtoApp
JHI_AUTH_TYPE: jwt
JHI_DTO: true
session:
JHI_IGNITE_APP_NAME: SessionApp
JHI_AUTH_TYPE: session
JHI_DTO: false
session-dto:
JHI_IGNITE_APP_NAME: SessionDtoApp
JHI_AUTH_TYPE: session
JHI_DTO: true
oauth2:
JHI_IGNITE_APP_NAME: OauthApp
JHI_AUTH_TYPE: oauth2
JHI_DTO: false
oauth2-dto:
JHI_IGNITE_APP_NAME: OauthDtoApp
JHI_AUTH_TYPE: oauth2
JHI_DTO: true
steps:
Expand All @@ -49,12 +55,10 @@ jobs:
- script: npm ci && npm link
displayName: 'TOOLS: npm install and link in ignite-jhipster'
- script: $(SCRIPT_DIR)/generate-ignite-jhipster-app.sh
displayName: 'GENERATING: generating ignite-jhipster app'
displayName: 'GENERATING: generate ignite-jhipster app'
- script: $(SCRIPT_DIR)/package-ignite-jhipster-app.sh
displayName: 'PACKAGING: packaging ignite-jhipster app for detox'
- script: $(SCRIPT_DIR)/generate-jhipster-backend.sh
displayName: 'GENERATING: generate jhipster project'
displayName: 'PACKAGING: package ignite-jhipster app for detox'
- script: $(SCRIPT_DIR)/package-jhipster-backend.sh
displayName: 'PACKAGING: packaging jhipster project into docker'
displayName: 'PACKAGING: generate and package jhipster backend'
- script: $(SCRIPT_DIR)/run-detox-tests.sh
displayName: 'TESTING: running detox tests'
2 changes: 1 addition & 1 deletion docs/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ You can pass flags for each of the options.

You can pass a JDL file containing an application config (and optionally entities) to the command line to generate an app:

ignite new JwtApp -b --jdl=jwt-mono.jdl --e2e=true --skip-git
ignite new JhipsterApp -b --jdl=jwt-mono.jdl --e2e=true --skip-git

This will generate the full React Native project and import any entities present in the JDL.
2 changes: 1 addition & 1 deletion test/scripts/copy-jdl-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ fi

echo "Using JDL file: ${JDL_FILE}"

cp ${BUILD_REPOSITORY_LOCALPATH}/test/.jhipster/${JDL_FILE} ../mono.jdl
cp ${BUILD_REPOSITORY_LOCALPATH}/test/.jhipster/${JDL_FILE} ../${SYSTEM_JOBNAME}.jdl
2 changes: 1 addition & 1 deletion test/scripts/display-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ docker version
docker-compose version
pwd
ignite doctor
ls -al
env
4 changes: 2 additions & 2 deletions test/scripts/generate-ignite-jhipster-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# switch to the directory containing the jhipster app folder
cd ../
# generate the app using the same JDL as the backend
ignite new JwtApp -b ${BUILD_REPOSITORY_LOCALPATH} --jdl=./mono.jdl --e2e=true --disable-insight --skip-git
ignite new ${JHI_IGNITE_APP_NAME} -b ${BUILD_REPOSITORY_LOCALPATH} --jdl=./${SYSTEM_JOBNAME}.jdl --e2e=true --disable-insight --skip-git
# list files
ls -al JwtApp
ls -al ${JHI_IGNITE_APP_NAME}
12 changes: 0 additions & 12 deletions test/scripts/generate-jhipster-backend.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test/scripts/package-ignite-jhipster-app.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# switch to the directory containing the ignite-jhipster app
cd ../JwtApp
cd ../${JHI_IGNITE_APP_NAME}

# package the app for detox testing (use release so the react-native JS is packaged)
detox build --configuration ios.sim.release
14 changes: 13 additions & 1 deletion test/scripts/package-jhipster-backend.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#!/usr/bin/env bash

set -e

# switch to a directory to generate the backend in
mkdir ../${SYSTEM_JOBNAME}-backend
cd ../${SYSTEM_JOBNAME}-backend
ls -al
# generate the app
jhipster import-jdl ../${SYSTEM_JOBNAME}.jdl --force --skip-checks --skip-git --skip-commit-hook --from-cli --force-insight --skip-install
# list files
ls -al
# display jhipster info
jhipster info

# switch to a directory to generate the backend in
cd ../mono
# package the app into a WAR
./mvnw clean package -Pprod -DskipTests
4 changes: 2 additions & 2 deletions test/scripts/run-detox-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# start the backend
cd ../mono
cd ../${SYSTEM_JOBNAME}-backend
nohup ./mvnw &

# wait for the backend to start
Expand All @@ -27,7 +27,7 @@ fi

sleep 60

cd ../JwtApp
cd ../${JHI_IGNITE_APP_NAME}

# if oauth, only run the launch screen since you need to authenticate for entities (todo: mock auth for entities)
if [ "$JHI_AUTH_TYPE" = "oauth2" ] ; then
Expand Down

0 comments on commit 2f2e670

Please sign in to comment.