mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5146] Upgrade to Angular 10 (#5834)
* remove useless module * upgrade to angular 8 * upgrade material to v8 * upgrade adf libs * migrate demo shell to v8 * upgrade to angular 9 * upgrade material to v9 * remove hammer * upgrade nx * upgrade datetime picker * upgrade flex layout * update core api * remove entry components * code fixes * upgrade testbed usage * code fixes * remove unnecessary core-js from tests * upgrade CLI * ts config fixes * fix builds * fix testing config * compile fixes * fix demo shell dev setup * fix core tests * fix card view import * upgrade nx * disable smart builds for now * remove fdescribe * restore smart builds * fix issues * unify tsconfigs and fix newly found issues * fix configuration and cleanup package scripts * improved production build from the same config * use ADF libs directly instead of node_modules * disable smart build * single app configuration (angular) * fix core build * fix build scripts * lint fixes * fix linting setup * fix linting rules * various fixes * disable affected libs for unit tests * cleanup insights package.json * simplify smart-build * fix content tests * fix tests * test fixes * fix tests * fix test * fix tests * disable AppExtensionsModule (monaco example) * remove monaco extension module * upgrade bundle check rules * fix insights tests and karma config * fix protractor config * e2e workaround * upgrade puppeteer and split linting and build * reusable resources config * update protractor config * fix after rebase * fix protractor config * fix e2e tsconfig * update e2e setup * Save demoshell artifact on S3 and remove travis cache * Push the libs on S3 and fetch before releasing it * Add deps * Add dependencies among libs and run only affected unit test and build * fix the travis stage name * fix after renaming dev to demoshell * force the order of the projects * remove unused dependencies * fix content e2e script * exit codes fix * add extra exit codes to core e2e * postinstall hook and package cleanup * cleanup packages * remove deprecated code and dependency on router * improve bundle analyzer script * minor code fixes * update spec * fix code after rebase * upgrade protractor after rebase * fix e2e mapping lib * Update tsconfig.e2e.json * update e2e tsconfig * fix angular config * fix protractor runs * cache dist folder for libs * update material selectors for dropdowns * selector fixes * remove duplicated e2e that have unit tests already * fix login selector * fix e2e * fix test * fix import issues * fix selector * cleanup old monaco extension files * cleanup demo shell login * add protractor max retries * disable customisations of protractor * fix login validation * fix after rebase * fix after rebase, disable latest versions of libs * Hide the report tab and rollback the localstorage * rename protractor config back to js * restore lint as part of build * cleanup code * do not copy anything to node_modules on dist test * fix unit tests * config fixes * fix code * fix code after rebase * fix tests * remove existing words from spellcheck * remove useless directive decorators * update package.json after rebase * add js-api back * code fixes * add missing export * update configs * fix code * try fix the sso login test * fix * remove puppeteer unit * fix e2e script * fix * make provider easy * fix routes module before upgrade * fix unit tests * upgrade angular cli * upgrade to angular 10 Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com> Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com> Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
@@ -1,149 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
eval BRANCH_NAME=""
|
||||
eval HEAD_SHA_BRANCH=""
|
||||
eval DIRECTORY="tmp"
|
||||
eval GNU=false
|
||||
|
||||
show_help() {
|
||||
echo "Usage: affected-libs.sh"
|
||||
echo ""
|
||||
echo "-b branch name"
|
||||
echo "-gnu for gnu"
|
||||
}
|
||||
|
||||
gnu_mode() {
|
||||
GNU=true
|
||||
}
|
||||
|
||||
branch_name(){
|
||||
BRANCH_NAME=$1
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-b) branch_name $2; shift 2;;
|
||||
-gnu) gnu_mode; shift;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
if $GNU; then
|
||||
sedi='-i'
|
||||
else
|
||||
sedi=('-i' '')
|
||||
fi
|
||||
|
||||
|
||||
if [[ "$BRANCH_NAME" == "" ]]
|
||||
then
|
||||
echo "The branch name is mandatory"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# tmp folder doesn't exist.
|
||||
if [ ! -d "$DIRECTORY" ]; then
|
||||
#find affected libs
|
||||
echo "Directory tmp created";
|
||||
mkdir $DIRECTORY;
|
||||
fi
|
||||
|
||||
HEAD_SHA_BRANCH="$(git merge-base origin/$BRANCH_NAME HEAD)"
|
||||
|
||||
if [ ! -f $DIRECTORY/deps.txt ]; then
|
||||
npm run affected:libs -- $HEAD_SHA_BRANCH "HEAD" > $DIRECTORY/deps.txt
|
||||
fi
|
||||
|
||||
LIST_SPECS="$(git diff --name-only $BRANCH_NAME HEAD)"
|
||||
|
||||
if [[ $LIST_SPECS == *"protractor.excludes.json"* ]]; then
|
||||
AFFECTED_LIBS="core$ content-services$ process-services$ process-services-cloud$ insights$ extensions$ testing$ cli$"
|
||||
echo "${AFFECTED_LIBS}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#cat $DIRECTORY/deps.txt
|
||||
#echo "extensions" > deps.txt
|
||||
|
||||
#clean file
|
||||
sed "${sedi[@]}" '/^$/d' ./$DIRECTORY/deps.txt
|
||||
sed "${sedi[@]}" '/alfresco-components/d' ./$DIRECTORY/deps.txt
|
||||
sed "${sedi[@]}" '/nx affected:libs/d' ./$DIRECTORY/deps.txt
|
||||
sed "${sedi[@]}" '/^$/d' ./$DIRECTORY/deps.txt
|
||||
|
||||
#read result from file
|
||||
while IFS= read -r var
|
||||
do
|
||||
fileLine=$var
|
||||
done < "./$DIRECTORY/deps.txt"
|
||||
|
||||
#transform string to array
|
||||
libs=(`echo $fileLine | sed 's/^$/\n/g'`)
|
||||
|
||||
#extensions
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "extensions" ] ; then
|
||||
AFFECTED_LIBS=$AFFECTED_LIBS" extensions$"
|
||||
fi
|
||||
done
|
||||
|
||||
#core
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "core" ] ; then
|
||||
AFFECTED_LIBS="core$ content-services$ process-services$ process-services-cloud$ insights$ extensions$ testing$ cli$"
|
||||
echo "${AFFECTED_LIBS}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
#process-services
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "process-services" ] ; then
|
||||
AFFECTED_LIBS=$AFFECTED_LIBS" process-services$"
|
||||
fi
|
||||
done
|
||||
|
||||
#content-services
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "content-services" ] ; then
|
||||
AFFECTED_LIBS=$AFFECTED_LIBS" content-services$"
|
||||
fi
|
||||
done
|
||||
|
||||
#insights
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "insights" ] ; then
|
||||
AFFECTED_LIBS=$AFFECTED_LIBS" insights$"
|
||||
fi
|
||||
done
|
||||
|
||||
#testing
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "testing" ] ; then
|
||||
AFFECTED_LIBS=$AFFECTED_LIBS" testing$"
|
||||
fi
|
||||
done
|
||||
|
||||
#process-services-cloud
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "process-services-cloud" ] ; then
|
||||
AFFECTED_LIBS=$AFFECTED_LIBS" process-services-cloud$"
|
||||
fi
|
||||
done
|
||||
|
||||
#cli
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "cli" ] ; then
|
||||
AFFECTED_LIBS=$AFFECTED_LIBS" cli$"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "${AFFECTED_LIBS}"
|
@@ -4,7 +4,7 @@
|
||||
require('dotenv').config({path: process.env.ENV_FILE});
|
||||
const fs = require('fs');
|
||||
|
||||
const configPath = './demo-shell/dist/app.config.json';
|
||||
const configPath = './dist/demo-shell/app.config.json';
|
||||
|
||||
fs.readFile(configPath, (err, appConfigString) => {
|
||||
if (err) throw err;
|
||||
@@ -17,7 +17,7 @@ fs.readFile(configPath, (err, appConfigString) => {
|
||||
appConfig.notificationDefaultDuration = process.env.NOTIFICATION_LAST || 8000;
|
||||
appConfig.authType = process.env.AUTH_TYPE || 'BASIC';
|
||||
|
||||
let appConfigReplacedJson = JSON.stringify(appConfig);
|
||||
let appConfigReplacedJson = JSON.stringify(appConfig,null,4);
|
||||
|
||||
|
||||
fs.writeFileSync(configPath, appConfigReplacedJson);
|
||||
|
@@ -3,6 +3,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR
|
||||
|
||||
rm -rf lib/dist
|
||||
|
||||
echo "====== Run lib ====="
|
||||
|
||||
echo "====== Run extensions ====="
|
||||
|
@@ -6,7 +6,7 @@ cd $DIR/../../lib/cli/
|
||||
|
||||
echo "====== Cli ======"
|
||||
echo "====== Build ======"
|
||||
npm install -g typescript
|
||||
npm i
|
||||
npm run dist
|
||||
|
||||
cd $DIR/../../
|
||||
@@ -20,8 +20,3 @@ else if [ ! -d "./lib/dist" ];
|
||||
fi
|
||||
|
||||
cp -R ./lib/cli/dist lib/dist/cli/
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-cli/ && \
|
||||
mkdir -p ./node_modules/@alfresco/adf-cli/ && \
|
||||
cp -R ./lib/dist/cli/* ./node_modules/@alfresco/adf-cli/
|
||||
|
@@ -6,7 +6,7 @@ cd $DIR/../..
|
||||
|
||||
echo "====== Content Services ======"
|
||||
echo "====== Build ======"
|
||||
npm run ng-packagr -- -p ./lib/content-services/ || exit 1
|
||||
npm run ng -- build content-services || exit 1
|
||||
|
||||
echo "====== Build style ======"
|
||||
node ./lib/config/bundle-content-services-scss.js || exit 1
|
||||
@@ -17,8 +17,3 @@ cp -R ./lib/content-services/src/lib/i18n/* ./lib/dist/content-services/bundles/
|
||||
|
||||
echo "====== Copy assets ======"
|
||||
cp -R ./lib/content-services/src/lib/assets/* ./lib/dist/content-services/bundles/assets
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-content-services/ && \
|
||||
mkdir -p ./node_modules/@alfresco/adf-content-services/ && \
|
||||
cp -R ./lib/dist/content-services/* ./node_modules/@alfresco/adf-content-services/
|
||||
|
@@ -6,7 +6,7 @@ cd $DIR/../..
|
||||
|
||||
echo "====== Core ======"
|
||||
echo "====== Build ======"
|
||||
npm run ng-packagr -- -p ./lib/core/ || exit 1
|
||||
npm run ng -- build core|| exit 1
|
||||
|
||||
echo "====== Build style ======"
|
||||
node ./lib/config/bundle-core-scss.js || exit 1
|
||||
@@ -20,8 +20,3 @@ cp -R ./lib/core/assets/* ./lib/dist/core/bundles/assets
|
||||
|
||||
npm run webpack -- --config ./lib/config/webpack.style.js --progress --profile --bail
|
||||
rm ./lib/dist/core/prebuilt-themes/*.js
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-core/ && \
|
||||
mkdir -p ./node_modules/@alfresco/adf-core/ && \
|
||||
cp -R ./lib/dist/core/* ./node_modules/@alfresco/adf-core/
|
||||
|
@@ -4,11 +4,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../..
|
||||
|
||||
echo "====== Extensions ======"
|
||||
echo "====== Build ======"
|
||||
npm run ng-packagr -- -p ./lib/extensions/ || exit 1
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-extensions/ && \
|
||||
mkdir -p ./node_modules/@alfresco/adf-extensions/ && \
|
||||
cp -R ./lib/dist/extensions/* ./node_modules/@alfresco/adf-extensions/
|
||||
npm run ng -- build extensions
|
||||
|
@@ -6,7 +6,7 @@ cd $DIR/../..
|
||||
|
||||
echo "====== Insights ======"
|
||||
echo "====== Build ======"
|
||||
npm run ng-packagr -- -p ./lib/insights/ || exit 1
|
||||
npm run ng -- build insights || exit 1
|
||||
|
||||
echo "====== Build style ======"
|
||||
node ./lib/config/bundle-insights-scss.js || exit 1
|
||||
@@ -14,8 +14,3 @@ node ./lib/config/bundle-insights-scss.js || exit 1
|
||||
echo "====== Copy i18n ======"
|
||||
mkdir -p ./lib/dist/insights/bundles/assets/adf-insights/i18n
|
||||
cp -R ./lib/insights/src/lib/i18n/* ./lib/dist/insights/bundles/assets/adf-insights/i18n
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-insights/ && \
|
||||
mkdir -p ./node_modules/@alfresco/adf-insights/ && \
|
||||
cp -R ./lib/dist/insights/* ./node_modules/@alfresco/adf-insights/
|
||||
|
@@ -6,7 +6,7 @@ cd $DIR/../..
|
||||
|
||||
echo "====== Process Services Cloud ======"
|
||||
echo "====== Build ======"
|
||||
npm run ng-packagr -- -p ./lib/process-services-cloud/ || exit 1
|
||||
npm run ng -- build process-services-cloud || exit 1
|
||||
|
||||
echo "====== Build style ======"
|
||||
node ./lib/config/bundle-process-services-cloud-scss.js || exit 1
|
||||
@@ -17,8 +17,3 @@ cp -R ./lib/process-services-cloud/src/lib/i18n/* ./lib/dist/process-services-cl
|
||||
|
||||
echo "====== Copy assets ======"
|
||||
cp -R ./lib/process-services-cloud/src/lib/assets/* ./lib/dist/process-services-cloud/bundles/assets
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-process-services-cloud/ && \
|
||||
mkdir -p ./node_modules/@alfresco/adf-process-services-cloud/ && \
|
||||
cp -R ./lib/dist/process-services-cloud/* ./node_modules/@alfresco/adf-process-services-cloud/
|
||||
|
@@ -6,7 +6,7 @@ cd $DIR/../..
|
||||
|
||||
echo "====== Process Services ======"
|
||||
echo "====== Build ======"
|
||||
npm run ng-packagr -- -p ./lib/process-services/ || exit 1
|
||||
npm run ng -- build process-services || exit 1
|
||||
|
||||
echo "====== Build style ======"
|
||||
node ./lib/config/bundle-process-services-scss.js || exit 1
|
||||
@@ -17,8 +17,3 @@ cp -R ./lib/process-services/src/lib/i18n/* ./lib/dist/process-services/bundles/
|
||||
|
||||
echo "====== Copy assets ======"
|
||||
cp -R ./lib/process-services/src/lib/assets/* ./lib/dist/process-services/bundles/assets
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-process-services/ && \
|
||||
mkdir -p ./node_modules/@alfresco/adf-process-services/ && \
|
||||
cp -R ./lib/dist/process-services/* ./node_modules/@alfresco/adf-process-services/
|
||||
|
@@ -6,9 +6,4 @@ cd $DIR/../..
|
||||
|
||||
echo "====== Testing ======"
|
||||
echo "====== Build ======"
|
||||
npm run ng-packagr -- -p ./lib/testing/ || exit 1
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-testing/ && \
|
||||
mkdir -p ./node_modules/@alfresco/adf-testing/ && \
|
||||
cp -R ./lib/dist/testing/* ./node_modules/@alfresco/adf-testing/
|
||||
npm run ng -- build testing || exit 1
|
||||
|
28
scripts/ci/job_hooks/before_install.sh
Executable file
28
scripts/ci/job_hooks/before_install.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pip install --user awscli
|
||||
|
||||
export NODE_OPTIONS="--max_old_space_size=30000"
|
||||
export GIT_HASH=`git rev-parse HEAD`
|
||||
echo "GIT_HASH: $GIT_HASH"
|
||||
S3_DBP_PATH="s3://alfresco-travis-builds/dbp"
|
||||
export BASE_HASH="$(git describe --tags `git rev-list --tags --max-count=1`)"
|
||||
export HEAD_HASH="HEAD"
|
||||
|
||||
if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
|
||||
export S3_DBP_FOLDER="$S3_DBP_PATH/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID"
|
||||
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||
export S3_DBP_FOLDER="$S3_DBP_PATH/$TRAVIS_PULL_REQUEST/$TRAVIS_BUILD_ID"
|
||||
export BASE_HASH="origin/$TRAVIS_BRANCH"
|
||||
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
|
||||
export S3_DBP_FOLDER="$S3_DBP_PATH/cron/$TRAVIS_BUILD_ID"
|
||||
else
|
||||
export S3_DBP_FOLDER="$S3_DBP_PATH/api/$TRAVIS_BUILD_ID"
|
||||
fi
|
||||
|
||||
echo "BASE_HASH: $BASE_HASH"
|
||||
echo "S3 DBP destination: $S3_DBP_FOLDER"
|
||||
|
||||
export DISPLAY=:99.0
|
||||
sh -e /etc/init.d/xvfb start
|
||||
sleep 3 # give xvfb some time to start
|
28
scripts/ci/utils/artifact-from-s3.sh
Executable file
28
scripts/ci/utils/artifact-from-s3.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
show_help() {
|
||||
echo "Usage: artifact-from-s3.sh <options>"
|
||||
echo ""
|
||||
echo "-a or --artifact [mandatory]: path to the s3 artifact (tar.bz2) to download and extract"
|
||||
echo "-o or --output [mandatory]: directory to extract the archive to"
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-a|--artifact) ARTIFACT=$2; shift 2;;
|
||||
-o|--output) OUTPUT=$2; shift 2;;
|
||||
-*) shift;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${ARTIFACT}" == "" ] || [ "${OUTPUT}" == "" ]
|
||||
then
|
||||
show_help;
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test ! -d $OUTPUT && mkdir -p $OUTPUT
|
||||
aws s3 cp $ARTIFACT ./s3-artifact.tmp
|
||||
tar -xvf ./s3-artifact.tmp -C $OUTPUT
|
||||
rm ./s3-artifact.tmp
|
27
scripts/ci/utils/artifact-to-s3.sh
Executable file
27
scripts/ci/utils/artifact-to-s3.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
show_help() {
|
||||
echo "Usage: artifact-to-s3.sh <options>"
|
||||
echo ""
|
||||
echo "-a or --artifact [mandatory]: path to the artifact to archieve (tar.bz2) and upload (like ./dist)"
|
||||
echo "-o or --output [mandatory]: the S3 object to copy it to, like: s3://bucket-name/folder/whatever.tar.bz2"
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-a|--artifact) ARTIFACT=$2; shift 2;;
|
||||
-o|--output) OUTPUT=$2; shift 2;;
|
||||
-*) shift;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${ARTIFACT}" == "" ] || [ "${OUTPUT}" == "" ]
|
||||
then
|
||||
show_help;
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar cvfj ./s3-artifact.tmp -C $ARTIFACT `ls $ARTIFACT`
|
||||
aws s3 cp ./s3-artifact.tmp $OUTPUT
|
||||
rm ./s3-artifact.tmp
|
@@ -10,14 +10,20 @@ show_help() {
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$DIR/../"
|
||||
|
||||
echo "====== Parallel lint ====="
|
||||
|
||||
npx concurrently -s "all" "npm run lint-lib || exit 1" "npm run stylelint || exit 1" "npm run spellcheck || exit " "ng lint dev || exit 1" "npm run lint-e2e || exit 1" || exit 1
|
||||
|
||||
if grep "envalfresco" . -R --exclude-dir={node_modules,.history,.idea,scripts,dist,e2e-output} --exclude=".env.cloud"; then
|
||||
if grep "envalfresco" . -R --exclude-dir={node_modules,.history,.idea,scripts,dist,e2e-output} --exclude={.env,.env.*}; then
|
||||
echo not permitted word
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "====== License Check ====="
|
||||
npm run license-checker || exit 1
|
||||
npm run ng -- lint extensions && \
|
||||
npm run ng -- lint core && \
|
||||
npm run ng -- lint content-services && \
|
||||
npm run ng -- lint process-services && \
|
||||
npm run ng -- lint process-services-cloud && \
|
||||
npm run ng -- lint insights && \
|
||||
npm run ng -- lint testing && \
|
||||
npm run ng -- lint demoshell && \
|
||||
npm run lint-e2e && \
|
||||
npm run stylelint && \
|
||||
npm run spellcheck && \
|
||||
npm run license-checker
|
||||
|
@@ -1,19 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
eval BRANCH_NAME=""
|
||||
eval GNU=false
|
||||
|
||||
show_help() {
|
||||
echo "Usage: smart-build.sh"
|
||||
echo ""
|
||||
echo "-b branch name"
|
||||
echo "-gnu for gnu"
|
||||
}
|
||||
|
||||
branch_name(){
|
||||
BRANCH_NAME=$1
|
||||
}
|
||||
|
||||
gnu_mode() {
|
||||
echo "====== GNU MODE ====="
|
||||
GNU=true
|
||||
@@ -21,98 +15,73 @@ gnu_mode() {
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-b) branch_name $2; shift 2;;
|
||||
-gnu) gnu_mode; shift;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$BRANCH_NAME" == "" ]]
|
||||
then
|
||||
echo "The branch name is mandatory"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "The branch name to check is $BRANCH_NAME"
|
||||
|
||||
if $GNU; then
|
||||
gnu='-gnu'
|
||||
else
|
||||
gnu=''
|
||||
fi
|
||||
|
||||
if [ $BRANCH_NAME == "undefined" ]; then
|
||||
echo "Rebase your branch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#reset the tmp folder
|
||||
affected="$(./scripts/affected-libs.sh ${gnu[@]} -b "$BRANCH_NAME")"
|
||||
affected="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
echo $affected
|
||||
libs=(`echo $affected | sed 's/^$/\n/g'`)
|
||||
|
||||
echo "Builds"
|
||||
|
||||
#extensions
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "extensions$" ] ; then
|
||||
if [ "$i" == "extensions" ] ; then
|
||||
./scripts/build/build-extensions.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
#core
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "core$" ] ; then
|
||||
if [ "$i" == "core" ] ; then
|
||||
./scripts/build/build-core.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
#content-services
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "content-services$" ] ; then
|
||||
if [ "$i" == "content-services" ] ; then
|
||||
./scripts/build/build-content-services.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
#process-services
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "process-services$" ] ; then
|
||||
if [ "$i" == "process-services" ] ; then
|
||||
./scripts/build/build-process-services.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
#process-services-cloud
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "process-services-cloud$" ] ; then
|
||||
if [ "$i" == "process-services-cloud" ] ; then
|
||||
./scripts/build/build-process-services-cloud.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
#insights
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "insights$" ] ; then
|
||||
if [ "$i" == "insights" ] ; then
|
||||
./scripts/build/build-insights.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
#testing
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "testing$" ] ; then
|
||||
if [ "$i" == "testing" ] ; then
|
||||
./scripts/build/build-testing.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
#cli
|
||||
for i in "${libs[@]}"
|
||||
do
|
||||
if [ "$i" == "cli$" ] ; then
|
||||
if [ "$i" == "cli" ] ; then
|
||||
./scripts/build/build-cli.sh || exit 1;
|
||||
fi
|
||||
done
|
||||
|
@@ -174,16 +174,14 @@ if $EXEC_VERSION_JSAPI == true; then
|
||||
npm install alfresco-js-api@${JSAPI_VERSION}
|
||||
fi
|
||||
|
||||
if [ -f "./.env" ]; then
|
||||
export $(cat .env | xargs)
|
||||
fi
|
||||
|
||||
if $EXEC_START == true; then
|
||||
if [ -f "./.env" ]; then
|
||||
export $(cat .env | xargs)
|
||||
fi
|
||||
if $EXEC_DEVELOP == true; then
|
||||
echo "====== Start Demo shell dev mode ====="
|
||||
npm run start:dev
|
||||
elif $EXEC_DIST == true; then
|
||||
if $EXEC_DIST == true; then
|
||||
echo "====== Start Demo shell dist mode ====="
|
||||
npm run start:dist
|
||||
npm run start:prod
|
||||
else
|
||||
echo "====== Start Demo shell ====="
|
||||
npm run start
|
||||
@@ -191,10 +189,10 @@ if $EXEC_START == true; then
|
||||
else
|
||||
if $EXEC_DEVELOP == true; then
|
||||
echo "====== Build Demo shell dev mode ====="
|
||||
npm run build:dev
|
||||
npm run build
|
||||
else
|
||||
echo "====== Build Demo shell ====="
|
||||
npm run build
|
||||
npm run build:prod
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -35,30 +35,10 @@ echo "====== Build ADF ===== "
|
||||
|
||||
npm run build-lib || exit 1
|
||||
|
||||
echo "====== COPY new build in node_modules ===== "
|
||||
|
||||
rm -rf ../node_modules/@alfresco
|
||||
|
||||
mkdir -p $DIR/../node_modules/@alfresco/adf-core
|
||||
mkdir -p $DIR/../node_modules/@alfresco/adf-content-services
|
||||
mkdir -p $DIR/../node_modules/@alfresco/adf-process-services
|
||||
mkdir -p $DIR/../node_modules/@alfresco/adf-process-services-cloud
|
||||
mkdir -p $DIR/../node_modules/@alfresco/adf-testing
|
||||
mkdir -p $DIR/../node_modules/@alfresco/adf-insights
|
||||
mkdir -p $DIR/../node_modules/@alfresco/adf-extensions
|
||||
|
||||
cp -R $DIR/../lib/dist/core/* $DIR/../node_modules/@alfresco/adf-core
|
||||
cp -R $DIR/../lib/dist/content-services/* $DIR/../node_modules/@alfresco/adf-content-services
|
||||
cp -R $DIR/../lib/dist/process-services/* $DIR/../node_modules/@alfresco/adf-process-services
|
||||
cp -R $DIR/../lib/dist/process-services-cloud/* $DIR/../node_modules/@alfresco/adf-process-services-cloud
|
||||
cp -R $DIR/../lib/dist/process-services-cloud/* $DIR/../node_modules/@alfresco/adf-testing
|
||||
cp -R $DIR/../lib/dist/insights/* $DIR/../node_modules/@alfresco/adf-insights
|
||||
cp -R $DIR/../lib/dist/extensions/* $DIR/../node_modules/@alfresco/adf-extensions
|
||||
|
||||
echo "====== Build dist demo shell ===== "
|
||||
|
||||
npm run server-versions
|
||||
ng build dist --base-href=$NAME/ --output-path demo-shell/dist/$NAME || exit 1
|
||||
ng build dist --base-href=$NAME/ --output-path dist/demo-shell/$NAME || exit 1
|
||||
|
||||
echo "====== e2e test ===== "
|
||||
|
||||
|
@@ -207,12 +207,12 @@ else
|
||||
if [[ $LITESERVER == "true" ]]; then
|
||||
echo "====== Run dist in lite-server ====="
|
||||
|
||||
ls demo-shell/dist/ || exit 1
|
||||
ls dist/demo-shell/ || exit 1
|
||||
|
||||
npm run postbuild:ci
|
||||
|
||||
npm run lite-server-e2e>/dev/null & $DEBUG_OPTION ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
||||
npm run lite-server-e2e>/dev/null & $DEBUG_OPTION ./node_modules/protractor/bin/protractor ./e2e/protractor.conf.js || exit 1
|
||||
else
|
||||
$DEBUG_OPTION ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
||||
$DEBUG_OPTION ./node_modules/protractor/bin/protractor ./e2e/protractor.conf.js || exit 1
|
||||
fi
|
||||
fi
|
||||
|
@@ -6,8 +6,7 @@ cd $DIR/../../../
|
||||
|
||||
rm -rf tmp && mkdir tmp;
|
||||
|
||||
npm install @alfresco/adf-cli@alpha
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
|
||||
npx @alfresco/adf-cli@alpha update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
|
||||
|
||||
if [[ $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
@@ -18,7 +17,7 @@ then
|
||||
then
|
||||
NEXT_VERSION=-nextbeta
|
||||
fi
|
||||
./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1;
|
||||
#./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1;
|
||||
fi
|
||||
|
||||
node ./scripts/pre-publish.js
|
||||
@@ -27,12 +26,11 @@ then
|
||||
|
||||
./scripts/npm-build-all.sh || exit 1;
|
||||
else
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli update-version --alpha --pathPackage "$(pwd)"
|
||||
|
||||
npm install;
|
||||
# npx @alfresco/adf-cli@alpha update-version --alpha --pathPackage "$(pwd)"
|
||||
|
||||
./scripts/smart-build.sh -b $TRAVIS_BRANCH -gnu || exit 1;
|
||||
./scripts/smart-build.sh -gnu || exit 1;
|
||||
fi;
|
||||
|
||||
echo "====== Build Demo shell dist ====="
|
||||
npm run build:dist || exit 1;
|
||||
echo "====== Build Demo shell for production ====="
|
||||
npm run build:prod || exit 1;
|
||||
|
@@ -11,13 +11,13 @@ echo "Running the docker with tag" $TAG_VERSION
|
||||
# Publish Image to docker
|
||||
|
||||
sed s%href=\".\"%href=\".\"%g \
|
||||
-i ./demo-shell/dist/index.html
|
||||
-i ./dist/demo-shell/index.html
|
||||
|
||||
mkdir "./demo-shell/tmp/"
|
||||
mv ./demo-shell/dist/* ./demo-shell/tmp
|
||||
mv ./dist/demo-shell/* ./demo-shell/tmp
|
||||
|
||||
mkdir -p "./demo-shell/dist/${TRAVIS_BUILD_NUMBER}"
|
||||
mv ./demo-shell/tmp/* ./demo-shell/dist/${TRAVIS_BUILD_NUMBER}
|
||||
mkdir -p "./dist/demo-shell/${TRAVIS_BUILD_NUMBER}"
|
||||
mv ./demo-shell/tmp/* ./dist/demo-shell/${TRAVIS_BUILD_NUMBER}
|
||||
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli docker-publish --loginCheck --loginUsername "$DOCKER_REPOSITORY_USER" --loginPassword "$DOCKER_REPOSITORY_PASSWORD" --loginRepo "$DOCKER_REPOSITORY_DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --dockerTags "$TAG_VERSION" --pathProject "$(pwd)"
|
||||
|
||||
@@ -27,5 +27,5 @@ echo "Update rancher with docker tag" $TAG_VERSION --url $REPO_RANCHER --enviro
|
||||
(node --no-deprecation ./scripts/travis/deploy/rancher-pr-deploy.js -n $TRAVIS_BUILD_NUMBER -u $RANCHER_TOKEN -p $RANCHER_SECRET -s $REPO_RANCHER --image "alfresco/demo-shell:develop-$TRAVIS_BUILD_NUMBER" --env $ENVIRONMENT_NAME -r $ENVIRONMENT_URL || exit 1);
|
||||
|
||||
# Restore the app in the main run the unit test
|
||||
mv ./demo-shell/dist/${TRAVIS_BUILD_NUMBER} "./demo-shell/tmp/"
|
||||
mv "./demo-shell/tmp/" "./demo-shell/dist/"
|
||||
mv ./dist/demo-shell/${TRAVIS_BUILD_NUMBER} "./demo-shell/tmp/"
|
||||
mv "./dist/demo-shell/" "./dist/demo-shell/"
|
||||
|
@@ -10,13 +10,13 @@ export AUTH_TYPE='BASIC'
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
||||
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||
|
||||
#-b is needed to run the Folder upload test that are not workin in Headless chrome
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -b -save -m 4 || exit 1)
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -b -save -m 4 || exit 1)
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
$RUN_CHECK
|
||||
|
@@ -10,16 +10,16 @@ export AUTH_TYPE='BASIC'
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
||||
|
||||
node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -m 2 )
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -m 2 || exit 1)
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
$RUN_E2E --folder $CONTEXT_ENV
|
||||
$RUN_E2E --folder $CONTEXT_ENV || exit 1
|
||||
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
|
||||
then
|
||||
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
|
||||
@@ -27,7 +27,7 @@ else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
|
||||
if [[ $LIST_SPECS != "" ]];
|
||||
then
|
||||
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
|
||||
$RUN_E2E --specs "$LIST_SPECS"
|
||||
$RUN_E2E --specs "$LIST_SPECS" || exit 1
|
||||
fi
|
||||
fi
|
||||
fi;
|
||||
|
@@ -9,7 +9,7 @@ cd $DIR/../../../
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "insight" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
|
@@ -10,7 +10,7 @@ export AUTH_TYPE="OAUTH"
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
||||
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist -m 2 -save -b )
|
||||
|
@@ -10,11 +10,11 @@ export AUTH_TYPE='BASIC'
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
||||
|
||||
node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -m 2 )
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -m 2 || exit 1)
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
|
@@ -10,11 +10,11 @@ export AUTH_TYPE='BASIC'
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
||||
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -m 2 )
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -m 2 || exit 1)
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "content-services" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
|
@@ -4,12 +4,14 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
echo "================== content-services unit ==================="
|
||||
ng test content-services --watch=false || exit 1;
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "content-services$" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
# echo "================== content-services unit ==================="
|
||||
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
if [[ $AFFECTED_LIBS =~ "content-services" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
ng test content-services --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
# bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
|
@@ -4,20 +4,21 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
|
||||
echo "================== core unit ==================="
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "core$" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
if [[ $AFFECTED_LIBS =~ "core" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
ng test core --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
echo "================== extensions unit ==================="
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "extensions$" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
if [[ $AFFECTED_LIBS =~ "extensions" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
ng test extensions --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
# bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
|
@@ -6,24 +6,25 @@ command="concurrently "
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
|
||||
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||
|
||||
echo "================== process-services unit ==================="
|
||||
if [[ $AFFECTED_LIBS =~ "process-services$" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
if [[ $AFFECTED_LIBS =~ "process-services" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
ng test process-services --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
echo "================== insights unit ==================="
|
||||
if [[ $AFFECTED_LIBS =~ "insights$" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
if [[ $AFFECTED_LIBS =~ "insights" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
ng test insights --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
echo "================== process-services-cloud unit ==================="
|
||||
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
if [[ $AFFECTED_LIBS =~ "process-services-cloud" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
ng test process-services-cloud --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
# bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
|
Reference in New Issue
Block a user