mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[no-issue] Parallel run e2e and e2e common action refactoring (#4702)
This commit is contained in:
@@ -2,16 +2,17 @@ let path = require('path');
|
||||
let fs = require('fs');
|
||||
let alfrescoApi = require('@alfresco/js-api');
|
||||
let program = require('commander');
|
||||
let ACTIVITI7_APPS = require('../e2e/util/resources').ACTIVITI7_APPS;
|
||||
let ACTIVITI7_APPS = require('../../e2e/util/resources').ACTIVITI7_APPS;
|
||||
|
||||
let config = {};
|
||||
let absentApps = [];
|
||||
let pushFaileApps = [];
|
||||
let notRunningApps = [];
|
||||
let host;
|
||||
|
||||
let MAX_RETRY = 3;
|
||||
let counter = 0;
|
||||
let TIMEOUT = 180000;
|
||||
let TIMEOUT = 1000;
|
||||
|
||||
|
||||
async function main() {
|
||||
@@ -50,6 +51,13 @@ async function main() {
|
||||
}
|
||||
|
||||
await deployAbsentApps(this.alfrescoJsApi);
|
||||
|
||||
let pushFailed = await getPushFailedApps(this.alfrescoJsApi);
|
||||
|
||||
if (pushFailed && pushFailed.length > 0) {
|
||||
await deleteStaleApps(this.alfrescoJsApi, pushFailed);
|
||||
}
|
||||
|
||||
let notRunning = await getNotRunningApps(this.alfrescoJsApi);
|
||||
|
||||
if (notRunning && notRunning.length > 0) {
|
||||
@@ -76,7 +84,7 @@ async function main() {
|
||||
console.log(`Activiti 7 all ok :)`);
|
||||
}
|
||||
} else {
|
||||
console.log(`Activiti 7 all ok :)`);
|
||||
console.log(`Activiti 7 all ok :-)`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +97,7 @@ async function deleteStaleApps(alfrescoJsApi, notRunningAppAfterWait) {
|
||||
}
|
||||
|
||||
async function waitPossibleStaleApps(alfrescoJsApi, notRunning) {
|
||||
pushFaileApps = [];
|
||||
do {
|
||||
console.log(`Wait stale app ${TIMEOUT}`);
|
||||
|
||||
@@ -108,6 +117,8 @@ async function waitPossibleStaleApps(alfrescoJsApi, notRunning) {
|
||||
});
|
||||
|
||||
if (nowIsRunning) {
|
||||
console.log(`The ${currentApp.entry.name } is now running`);
|
||||
|
||||
notRunning = notRunning.filter((item) => {
|
||||
return item.entry.name !== nowIsRunning.entry.name
|
||||
})
|
||||
@@ -128,7 +139,7 @@ async function getNotRunningApps(alfrescoJsApi) {
|
||||
return ACTIVITI7_APPS[key].name === currentApp.entry.name && currentApp.entry.status !== 'Running';
|
||||
});
|
||||
|
||||
if (isNotRunning) {
|
||||
if (isNotRunning && isNotRunning.entry.status !== 'ImagePushFailed') {
|
||||
notRunningApps.push(isNotRunning);
|
||||
}
|
||||
});
|
||||
@@ -145,6 +156,31 @@ async function getNotRunningApps(alfrescoJsApi) {
|
||||
return notRunningApps;
|
||||
}
|
||||
|
||||
async function getPushFailedApps(alfrescoJsApi) {
|
||||
let allStatusApps = await getDeployedApplicationsByStatus(alfrescoJsApi, '');
|
||||
|
||||
Object.keys(ACTIVITI7_APPS).forEach((key) => {
|
||||
let isNotRunning = allStatusApps.find((currentApp) => {
|
||||
//console.log(currentApp.entry.name + ' ' +currentApp.entry.status);
|
||||
return ACTIVITI7_APPS[key].name === currentApp.entry.name && currentApp.entry.status !== 'Running';
|
||||
});
|
||||
|
||||
if (isNotRunning && isNotRunning.entry.status === 'ImagePushFailed') {
|
||||
pushFaileApps.push(isNotRunning);
|
||||
}
|
||||
});
|
||||
|
||||
if (pushFaileApps.length > 0) {
|
||||
console.log(`The following apps are pushFaileApps:`);
|
||||
pushFaileApps.forEach((currentApp) => {
|
||||
console.log(`App ${currentApp.entry.name } current status ${JSON.stringify(currentApp.entry.status)}`);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return pushFaileApps;
|
||||
}
|
||||
|
||||
async function deployAbsentApps(alfrescoJsApi) {
|
||||
let deployedApps = await getDeployedApplicationsByStatus(alfrescoJsApi, '');
|
||||
|
||||
@@ -186,6 +222,7 @@ async function checkIfAppIsReleased(apiService, absentApps) {
|
||||
if (uploadedApp) {
|
||||
await releaseApp(apiService, uploadedApp);
|
||||
await deployApp(apiService, uploadedApp, currentAbsentApp.name);
|
||||
sleep(120000);///wait to not fail
|
||||
}
|
||||
} else {
|
||||
console.log('Project for ' + currentAbsentApp.name + ' present');
|
||||
@@ -194,21 +231,28 @@ async function checkIfAppIsReleased(apiService, absentApps) {
|
||||
let appReleaseList = await getReleaseAppProjectId(apiService, app.entry.id);
|
||||
|
||||
if (appReleaseList.list.entries.length === 0) {
|
||||
console.log('Needs to release');
|
||||
appRelease = await releaseApp(apiService, app);
|
||||
|
||||
} else {
|
||||
console.log('Not Need to release');
|
||||
|
||||
appRelease = appReleaseList.list.entries.find((currentRelease) => {
|
||||
return currentRelease.entry.version === 'latest';
|
||||
});
|
||||
}
|
||||
|
||||
console.log('App to deploy app release id ' + app.entry.id);
|
||||
console.log('App to deploy app release id ' + appRelease.entry.id);
|
||||
|
||||
await deployApp(apiService, appRelease, currentAbsentApp.name);
|
||||
sleep(120000);///wait to not fail
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function deployApp(apiService, app, name) {
|
||||
console.log(`Deploy app ${name}`);
|
||||
|
||||
const url = `${config.hostBpm}/deployment-service/v1/applications`;
|
||||
|
||||
const pathParams = {};
|
||||
@@ -216,13 +260,15 @@ async function deployApp(apiService, app, name) {
|
||||
"name": name,
|
||||
"releaseId": app.entry.id,
|
||||
"version": app.entry.name,
|
||||
"security": [{"role": "APS_ADMIN", "groups": [], "users": ["admin.adf", "processadminuser"]}, {
|
||||
"security": [{"role": "APS_ADMIN", "groups": [], "users": ["admin.adf"]}, {
|
||||
"role": "APS_USER",
|
||||
"groups": [],
|
||||
"users": ["admin.adf", "hruser"]
|
||||
"users": ["admin.adf"]
|
||||
}]
|
||||
};
|
||||
|
||||
//console.log(JSON.stringify(bodyParam));
|
||||
|
||||
const headerParams = {}, formParams = {}, queryParams = {},
|
||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
||||
|
||||
@@ -238,6 +284,7 @@ async function deployApp(apiService, app, name) {
|
||||
|
||||
async function importProjectApp(apiService, app) {
|
||||
const pathFile = path.join('./e2e/' + app.file_location);
|
||||
console.log(pathFile);
|
||||
const file = fs.createReadStream(pathFile);
|
||||
|
||||
const url = `${config.hostBpm}/modeling-service/v1/projects/import`;
|
||||
@@ -282,6 +329,7 @@ async function getReleaseAppProjectId(apiService, projectId) {
|
||||
async function releaseApp(apiService, app) {
|
||||
const url = `${config.hostBpm}/modeling-service/v1/projects/${app.entry.id}/releases`;
|
||||
|
||||
console.log(url);
|
||||
console.log('Release ID ' + app.entry.id);
|
||||
const pathParams = {}, queryParams = {},
|
||||
headerParams = {}, formParams = {}, bodyParam = {},
|
122
scripts/check-env/delete-all-apps.js
Executable file
122
scripts/check-env/delete-all-apps.js
Executable file
@@ -0,0 +1,122 @@
|
||||
let alfrescoApi = require('@alfresco/js-api');
|
||||
let program = require('commander');
|
||||
let ACTIVITI7_APPS = require('../../e2e/util/resources').ACTIVITI7_APPS;
|
||||
|
||||
let config = {};
|
||||
let absentApps = [];
|
||||
let notRunningApps = [];
|
||||
let host;
|
||||
|
||||
async function main() {
|
||||
|
||||
program
|
||||
.version('0.1.0')
|
||||
.option('--host [type]', 'Remote environment host adf.lab.com ')
|
||||
.option('--client [type]', 'clientId ')
|
||||
.option('-p, --password [type]', 'password ')
|
||||
.option('-u, --username [type]', 'username ')
|
||||
.parse(process.argv);
|
||||
|
||||
config = {
|
||||
provider: 'BPM',
|
||||
hostBpm: `http://${program.host}`,
|
||||
authType: 'OAUTH',
|
||||
oauth2: {
|
||||
host: `http://${program.host}/auth/realms/alfresco`,
|
||||
clientId: program.client,
|
||||
scope: 'openid',
|
||||
secret: '',
|
||||
implicitFlow: false,
|
||||
silentLogin: false,
|
||||
redirectUri: '/',
|
||||
redirectUriLogout: '/logout'
|
||||
}
|
||||
};
|
||||
|
||||
host = program.host;
|
||||
|
||||
try {
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility(config);
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
} catch (e) {
|
||||
console.log('Login error' + e);
|
||||
}
|
||||
|
||||
Object.keys(ACTIVITI7_APPS).forEach(async (key) => {
|
||||
await deleteApp(alfrescoJsApi, ACTIVITI7_APPS[key].name);
|
||||
});
|
||||
|
||||
let notRunning = await getNotRunningApps(this.alfrescoJsApi);
|
||||
|
||||
if (notRunning && notRunning.length > 0) {
|
||||
console.log(JSON.stringify(notRunning));
|
||||
}
|
||||
}
|
||||
|
||||
async function getNotRunningApps(alfrescoJsApi) {
|
||||
let allStatusApps = await getDeployedApplicationsByStatus(alfrescoJsApi, '');
|
||||
|
||||
Object.keys(ACTIVITI7_APPS).forEach((key) => {
|
||||
let isNotRunning = allStatusApps.find((currentApp) => {
|
||||
//console.log(currentApp.entry.name + ' ' +currentApp.entry.status);
|
||||
return ACTIVITI7_APPS[key].name === currentApp.entry.name && currentApp.entry.status !== 'Running';
|
||||
});
|
||||
|
||||
if (isNotRunning && isNotRunning.entry.status !== 'ImagePushFailed') {
|
||||
notRunningApps.push(isNotRunning);
|
||||
}
|
||||
});
|
||||
|
||||
if (notRunningApps.length > 0) {
|
||||
console.log(`The following apps are NOT running in the target env:`);
|
||||
notRunningApps.forEach((currentApp) => {
|
||||
console.log(`App ${currentApp.entry.name } current status ${JSON.stringify(currentApp.entry.status)}`);
|
||||
});
|
||||
|
||||
await checkIfAppIsReleased(alfrescoJsApi, absentApps);
|
||||
}
|
||||
|
||||
return notRunningApps;
|
||||
}
|
||||
|
||||
async function getDeployedApplicationsByStatus(apiService, status) {
|
||||
const url = `${config.hostBpm}/alfresco-deployment-service/v1/applications`;
|
||||
|
||||
const pathParams = {}, queryParams = {status: status},
|
||||
headerParams = {}, formParams = {}, bodyParam = {},
|
||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
||||
|
||||
let data;
|
||||
try {
|
||||
data = await apiService.oauth2Auth.callCustomApi(url, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam,
|
||||
contentTypes, accepts);
|
||||
|
||||
return data.list.entries;
|
||||
} catch (error) {
|
||||
console.log(`Not possible get the applications from alfresco-deployment-service ${JSON.stringify(error)} `);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function deleteApp(apiService, appName) {
|
||||
console.log(`Delete the app ${appName}`);
|
||||
|
||||
const url = `${config.hostBpm}/alfresco-deployment-service/v1/applications/${appName}`;
|
||||
|
||||
const pathParams = {}, queryParams = {},
|
||||
headerParams = {}, formParams = {}, bodyParam = {},
|
||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
||||
|
||||
try {
|
||||
await apiService.oauth2Auth.callCustomApi(url, 'DELETE', pathParams, queryParams, headerParams, formParams, bodyParam,
|
||||
contentTypes, accepts);
|
||||
|
||||
console.log(`App deleted`);
|
||||
} catch (error) {
|
||||
console.log(`Not possible to delete the application from alfresco-modeling-service` + error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd "$DIR/.."
|
||||
|
||||
license-checker --production --failOn "GPL" > licenses.txt
|
@@ -10,25 +10,9 @@ show_help() {
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$DIR/../"
|
||||
|
||||
echo "====== lint Lib ====="
|
||||
echo "====== Parallel lint ====="
|
||||
|
||||
npm run lint-lib || exit 1
|
||||
|
||||
echo "====== lint E2E ====="
|
||||
|
||||
npm run lint-e2e || exit 1
|
||||
|
||||
echo "====== lint Demo shell ====="
|
||||
|
||||
ng lint dev || exit 1
|
||||
|
||||
echo "====== spellcheck ====="
|
||||
|
||||
npm run spellcheck || exit 1
|
||||
|
||||
echo "====== styleLint ====="
|
||||
|
||||
npm run stylelint || exit 1
|
||||
concurrently -s "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
|
||||
|
||||
echo "====== exclude-word ====="
|
||||
|
||||
|
61
scripts/release/release.sh
Executable file
61
scripts/release/release.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
eval GNU=false
|
||||
|
||||
set -e
|
||||
TEMP=".tmp";
|
||||
|
||||
show_help() {
|
||||
echo "Usage: update-generator.sh"
|
||||
echo ""
|
||||
echo "-t or --token Github ouath token"
|
||||
echo "-v or --version version to bump"
|
||||
echo "-gnu for gnu"
|
||||
}
|
||||
|
||||
gnu_mode() {
|
||||
echo "====== GNU MODE ====="
|
||||
GNU=true
|
||||
}
|
||||
|
||||
token() {
|
||||
TOKEN=$1
|
||||
}
|
||||
|
||||
version() {
|
||||
VERSION=$1
|
||||
}
|
||||
|
||||
release() {
|
||||
rm -rf $TEMP;
|
||||
git clone https://$TOKEN@github.com/$1.git $TEMP
|
||||
cd $TEMP
|
||||
git checkout development
|
||||
|
||||
if $GNU; then
|
||||
./scripts/update-version.sh -gnu -v $VERSION
|
||||
else
|
||||
./scripts/update-version.sh -v $VERSION
|
||||
fi
|
||||
|
||||
git add .
|
||||
git commit -m "Release $VERSION"
|
||||
git push -u origin development
|
||||
|
||||
curl -H "Authorization: token $TOKEN" -X POST -d '{"body":"Release ADF version '$VERSION'","head":"'development'","base":"master","title":"Release ADF version '$VERSION'"}' https://api.github.com/repos/$1/pulls
|
||||
rm -rf $TEMP;
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-v|--version|-\?) version $2; shift 2;;
|
||||
-gnu) gnu_mode; shift;;
|
||||
-t|--token) token $2; shift 2;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
release 'Alfresco/alfresco-js-api'
|
||||
release 'Alfresco/generator-ng2-alfresco-app'
|
||||
release 'Alfresco/alfresco-ng2-components'
|
@@ -39,6 +39,8 @@ else
|
||||
gnu=''
|
||||
fi
|
||||
|
||||
git merge-base origin/$BRANCH_NAME HEAD > ./tmp/devhead.txt;
|
||||
|
||||
#reset the tmp folder
|
||||
affected="$(./scripts/affected-libs.sh ${gnu[@]} -b "$BRANCH_NAME")"
|
||||
echo $affected
|
||||
|
@@ -1,62 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
show_help() {
|
||||
echo "Usage: test-e2e.bc.sh"
|
||||
echo ""
|
||||
echo "-b or --build build number"
|
||||
}
|
||||
|
||||
build_number(){
|
||||
BUILD_NUMBER=$1
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-b|--build) build_number $2; shift 2;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
cd $DIR/../integration/base_ver_2_app
|
||||
|
||||
ANGULAR_VERSION="5.1.1"
|
||||
ANGULAR_CLI_VERSION="1.7.4"
|
||||
MATERIAL_VERSION="5.1.1"
|
||||
NGX_TRANSLATE_VERSION="10.0.2"
|
||||
MOMENT_VERSION="2.20.1"
|
||||
RXJS_VERSION="6.0.0"
|
||||
TYPESCRIPT_VERSION="2.9.2"
|
||||
|
||||
npm install
|
||||
|
||||
echo "====== Install New documented dependency ===== "
|
||||
|
||||
npm install --save-exact --save-dev @angular-devkit/core@0.0.28 @angular/compiler-cli@${ANGULAR_VERSION} @angular/cli@${ANGULAR_CLI_VERSION} typescript@${TYPESCRIPT_VERSION}
|
||||
npm install --save @mat-datetimepicker/core @mat-datetimepicker/moment
|
||||
npm install --save-exact --save @angular/animations@${ANGULAR_VERSION} @angular/common@${ANGULAR_VERSION} @angular/compiler@${ANGULAR_VERSION} @angular/core@${ANGULAR_VERSION} @angular/platform-browser@${ANGULAR_VERSION} @angular/router@${ANGULAR_VERSION} @angular/flex-layout@2.0.0-beta.12 @angular/forms@${ANGULAR_VERSION} @angular/forms@${ANGULAR_VERSION} @angular/http@${ANGULAR_VERSION} @angular/platform-browser-dynamic@${ANGULAR_VERSION}
|
||||
npm install --save-exact --save @angular/cdk@${MATERIAL_VERSION} @angular/material@${MATERIAL_VERSION}
|
||||
npm install --save-exact --save @ngx-translate/core@${NGX_TRANSLATE_VERSION}
|
||||
npm install --save-exact --save moment@${MOMENT_VERSION}
|
||||
npm install --save-exact --save rxjs@${RXJS_VERSION}
|
||||
npm install --save-exact --save @angular/material-moment-adapter@${MATERIAL_VERSION}
|
||||
npm install --save-exact --save rxjs-compat@6.1.0
|
||||
|
||||
echo "====== Install JS-API alpha ===== "
|
||||
npm install --save alfresco-js-api@alpha
|
||||
|
||||
echo "====== COPY new build in node_modules ===== "
|
||||
|
||||
rm -rf $DIR/../integration/base_ver_2_app/node_modules/@alfresco
|
||||
|
||||
cd $DIR/..
|
||||
|
||||
node $DIR/download-build-lib-in-cs.js --username "$E2E_USERNAME" --password "$E2E_PASSWORD" --host "$E2E_HOST" --folder $TRAVIS_BUILD_NUMBER -o /integration/base_ver_2_app/node_modules
|
||||
|
||||
rm -rf $DIR/../node_modules/@angular
|
||||
rm -rf $DIR/../node_modules/@alfresco
|
||||
|
||||
cd $DIR/../integration/base_ver_2_app
|
||||
|
||||
npm run e2e
|
@@ -7,7 +7,7 @@ DEVELOPMENT=false
|
||||
EXECLINT=true
|
||||
LITESERVER=false
|
||||
EXEC_VERSION_JSAPI=false
|
||||
TIMEOUT=10000
|
||||
TIMEOUT=15000
|
||||
SELENIUM_PROMISE_MANAGER=1
|
||||
|
||||
show_help() {
|
||||
|
21
scripts/travis/build/build.sh
Executable file
21
scripts/travis/build/build.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
rm -rf tmp && mkdir tmp;
|
||||
|
||||
./scripts/lint.sh || exit 1;
|
||||
|
||||
if [[ $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
./scripts/npm-build-all.sh || exit 1;
|
||||
else
|
||||
./scripts/update-version.sh -gnu -alpha || exit 1;
|
||||
npm install;
|
||||
./scripts/smart-build.sh -b $TRAVIS_BRANCH -gnu || exit 1;
|
||||
fi;
|
||||
|
||||
npm run build:dist || exit 1;
|
||||
npm run license-checker
|
15
scripts/travis/deploy/deploy.sh
Executable file
15
scripts/travis/deploy/deploy.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
#if [ "$TRAVIS_PULL_REQUEST" != "false" ];
|
||||
#then
|
||||
node ./scripts/move-dist-folder.js --base-href $TRAVIS_BUILD_NUMBER && (./scripts/pr-publish.sh -n $TRAVIS_BUILD_NUMBER -r $REPO_DOCKER -u $USERNAME_DOCKER -p $PASSWORD_DOCKER || exit 1);
|
||||
#fi;
|
||||
|
||||
#if [ "$TRAVIS_PULL_REQUEST" != "false" ];
|
||||
#then
|
||||
(node --no-deprecation ./scripts/pr-deploy.js -n $TRAVIS_BUILD_NUMBER -u $RANCHER_TOKEN -p $RANCHER_SECRET -s $REPO_RANCHER --image "docker:$REPO_DOCKER/adf/demo-shell:$TRAVIS_BUILD_NUMBER" --env $ENVIRONMENT_NAME -r $ENVIRONMENT_URL || exit 1);
|
||||
#fi;
|
13
scripts/travis/e2e/content-services-e2e.sh
Executable file
13
scripts/travis/e2e/content-services-e2e.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder content-services --skip-lint --use-dist -b || exit 1;
|
||||
fi;
|
14
scripts/travis/e2e/core-e2e.sh
Executable file
14
scripts/travis/e2e/core-e2e.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "core$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
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;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder core --skip-lint -save --use-dist -b || exit 1;
|
||||
fi;
|
13
scripts/travis/e2e/insights-e2e.sh
Executable file
13
scripts/travis/e2e/insights-e2e.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder insights --skip-lint --use-dist || exit 1;
|
||||
fi;
|
13
scripts/travis/e2e/process-services-cloud-e2e.sh
Executable file
13
scripts/travis/e2e/process-services-cloud-e2e.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder process-services-cloud --skip-lint --use-dist -b || exit 1;
|
||||
fi;
|
13
scripts/travis/e2e/process-services-e2e.sh
Executable file
13
scripts/travis/e2e/process-services-e2e.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "process-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder process-services --skip-lint --use-dist -b || exit 1;
|
||||
fi;
|
13
scripts/travis/e2e/search-e2e.sh
Executable file
13
scripts/travis/e2e/search-e2e.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder search --skip-lint --use-dist -save -b || exit 1;
|
||||
fi;
|
13
scripts/travis/unit-test/content.sh
Executable file
13
scripts/travis/unit-test/content.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
echo "================== content-services unit ==================="
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "content-services$" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
ng test content-services --watch=false || exit 1;
|
||||
fi;
|
29
scripts/travis/unit-test/core-extension-demo.sh
Executable file
29
scripts/travis/unit-test/core-extension-demo.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
|
||||
echo "================== core unit ==================="
|
||||
|
||||
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" ]];
|
||||
then
|
||||
ng test extensions --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
echo "================== demo unit ==================="
|
||||
|
||||
if ([ "$TRAVIS_BRANCH" = "master" ]); then
|
||||
(./scripts/start.sh -t -ss -si || exit 1;);
|
||||
else
|
||||
(./scripts/start.sh -dev -t -ss -si || exit 1;);
|
||||
fi;
|
29
scripts/travis/unit-test/process.sh
Executable file
29
scripts/travis/unit-test/process.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
command="concurrently "
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
|
||||
echo "================== process-services unit ==================="
|
||||
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" ]];
|
||||
then
|
||||
ng test insights --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
echo "================== process-services-cloud unit ==================="
|
||||
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
ng test process-services-cloud --watch=false || exit 1;
|
||||
fi;
|
||||
|
||||
|
20
scripts/travis/update/update-childre.sh
Executable file
20
scripts/travis/update/update-childre.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../
|
||||
|
||||
echo "Update Generator"
|
||||
./update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/generator-ng2-alfresco-app'
|
||||
echo "Update ACA"
|
||||
./update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/alfresco-content-app'
|
||||
echo "Update ADW"
|
||||
./update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/adf-app-manager-ui'
|
||||
echo "Update ADF"
|
||||
./update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/alfresco-ng2-components'
|
||||
echo "Update AMA"
|
||||
./update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/alfresco-modeler-app'
|
||||
echo "Update AMA Activiti"
|
||||
./update-project.sh -gnu -t $GITHUB_TOKEN -n 'Activiti/activiti-modeling-app'
|
||||
echo "Update APA Activiti"
|
||||
./update-project.sh -gnu -t $GITHUB_TOKEN -n 'Alfresco/alfresco-admin-app'
|
Reference in New Issue
Block a user