mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[AAE-3278] Temporary fix for some flakyness: C297638 and C297638 (#1602)
This commit is contained in:
parent
9bdaa59657
commit
3edf48f050
29
.travis.yml
29
.travis.yml
@ -77,37 +77,54 @@ jobs:
|
|||||||
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
||||||
- ./start.sh
|
- ./start.sh
|
||||||
script: ng run app-e2e:e2elite --suite "authentication,listViews,navigation,application,pagination,search"
|
script: ng run app-e2e:e2elite --suite "authentication,listViews,navigation,application,pagination,search"
|
||||||
after_script: ./start.sh -d
|
after_script:
|
||||||
|
- ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
|
- ./start.sh -d
|
||||||
|
|
||||||
- name: Test Suite actionsAvailable
|
- name: Test Suite actionsAvailable
|
||||||
before_script:
|
before_script:
|
||||||
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
||||||
- ./start.sh
|
- ./start.sh
|
||||||
script: ng run app-e2e:e2elite --suite "actionsAvailable"
|
script: ng run app-e2e:e2elite --suite "actionsAvailable"
|
||||||
after_script: ./start.sh -d
|
after_script:
|
||||||
|
- ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
|
- ./start.sh -d
|
||||||
|
|
||||||
- name: Test Suite addRemoveContent
|
- name: Test Suite addRemoveContent
|
||||||
before_script:
|
before_script:
|
||||||
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
||||||
- ./start.sh
|
- ./start.sh
|
||||||
script: ng run app-e2e:e2elite --suite "addRemoveContent"
|
script: ng run app-e2e:e2elite --suite "addRemoveContent"
|
||||||
after_script: ./start.sh -d
|
after_script:
|
||||||
|
- ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
|
- ./start.sh -d
|
||||||
|
|
||||||
- name: Test Suite manageContent
|
- name: Test Suite manageContent
|
||||||
before_script:
|
before_script:
|
||||||
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
||||||
- ./start.sh
|
- ./start.sh
|
||||||
script: ng run app-e2e:e2elite --suite "manageContent"
|
script: ng run app-e2e:e2elite --suite "manageContent"
|
||||||
after_script: ./start.sh -d
|
after_script:
|
||||||
|
- ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
|
- ./start.sh -d
|
||||||
|
|
||||||
- name: Test Suite sharingContent&markFavorite
|
- name: Test Suite sharingContent&markFavorite
|
||||||
before_script:
|
before_script:
|
||||||
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
||||||
- ./start.sh
|
- ./start.sh
|
||||||
script: ng run app-e2e:e2elite --suite "sharingContent"
|
script: ng run app-e2e:e2elite --suite "sharingContent"
|
||||||
after_script: ./start.sh -d
|
after_script:
|
||||||
|
- ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
|
- ./start.sh -d
|
||||||
|
|
||||||
- name: Test Suite viewContent&metadata&extensions
|
- name: Test Suite viewContent&metadata&extensions
|
||||||
before_script:
|
before_script:
|
||||||
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
|
||||||
- ./start.sh
|
- ./start.sh
|
||||||
script: ng run app-e2e:e2elite --suite "viewer,infoDrawer,extensions"
|
script: ng run app-e2e:e2elite --suite "viewer,infoDrawer,extensions"
|
||||||
after_script: ./start.sh -d
|
after_script:
|
||||||
|
- ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
|
- ./start.sh -d
|
||||||
|
|
||||||
- stage: Update Rancher
|
- stage: Update Rancher
|
||||||
name: Update Rancher
|
name: Update Rancher
|
||||||
|
@ -6,6 +6,7 @@ const { SpecReporter } = require('jasmine-spec-reporter');
|
|||||||
const afterLaunch = require('./e2e/e2e-config/hooks/after-launch');
|
const afterLaunch = require('./e2e/e2e-config/hooks/after-launch');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const resolve = require('path').resolve;
|
const resolve = require('path').resolve;
|
||||||
|
const logger = require('./tools/helpers/logger');
|
||||||
|
|
||||||
require('dotenv').config({ path: process.env.ENV_FILE });
|
require('dotenv').config({ path: process.env.ENV_FILE });
|
||||||
|
|
||||||
@ -18,8 +19,7 @@ const BROWSER_RUN = process.env.BROWSER_RUN;
|
|||||||
const width = 1366;
|
const width = 1366;
|
||||||
const height = 768;
|
const height = 768;
|
||||||
|
|
||||||
const API_CONTENT_HOST =
|
const API_CONTENT_HOST = process.env.API_CONTENT_HOST || 'http://localhost:8080';
|
||||||
process.env.API_CONTENT_HOST || 'http://localhost:8080';
|
|
||||||
|
|
||||||
function rmDir(dirPath) {
|
function rmDir(dirPath) {
|
||||||
try {
|
try {
|
||||||
@ -139,9 +139,7 @@ exports.config = {
|
|||||||
showColors: true,
|
showColors: true,
|
||||||
defaultTimeoutInterval: 100000,
|
defaultTimeoutInterval: 100000,
|
||||||
print: function () {},
|
print: function () {},
|
||||||
...SmartRunner.withOptionalExclusions(
|
...SmartRunner.withOptionalExclusions(resolve(__dirname, './e2e/protractor.excludes.json'))
|
||||||
resolve(__dirname, './e2e/protractor.excludes.json'),
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -157,7 +155,11 @@ exports.config = {
|
|||||||
|
|
||||||
onPrepare() {
|
onPrepare() {
|
||||||
if (process.env.CI) {
|
if (process.env.CI) {
|
||||||
SmartRunner.apply({repoHash: process.env.GIT_HASH || ''});
|
const repoHash = process.env.GIT_HASH || '';
|
||||||
|
const outputDirectory = process.env.SMART_RUNNER_DIRECTORY;
|
||||||
|
logger.info(`SmartRunner's repoHash: "${repoHash}"`);
|
||||||
|
logger.info(`SmartRunner's outputDirectory: "${outputDirectory}"`);
|
||||||
|
SmartRunner.apply({ outputDirectory, repoHash });
|
||||||
}
|
}
|
||||||
|
|
||||||
const tsConfigPath = path.resolve(e2eFolder, 'tsconfig.e2e.json');
|
const tsConfigPath = path.resolve(e2eFolder, 'tsconfig.e2e.json');
|
||||||
@ -176,10 +178,7 @@ exports.config = {
|
|||||||
paths: tsConfig.compilerOptions.paths
|
paths: tsConfig.compilerOptions.paths
|
||||||
});
|
});
|
||||||
|
|
||||||
browser
|
browser.manage().window().setSize(width, height);
|
||||||
.manage()
|
|
||||||
.window()
|
|
||||||
.setSize(width, height);
|
|
||||||
|
|
||||||
jasmine.getEnv().addReporter(
|
jasmine.getEnv().addReporter(
|
||||||
new SpecReporter({
|
new SpecReporter({
|
||||||
@ -196,7 +195,6 @@ exports.config = {
|
|||||||
behavior: 'allow',
|
behavior: 'allow',
|
||||||
downloadPath: downloadFolder
|
downloadPath: downloadFolder
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
afterLaunch
|
afterLaunch
|
||||||
};
|
};
|
||||||
|
4
scripts/ci/job_hooks/after_e2e.sh
Executable file
4
scripts/ci/job_hooks/after_e2e.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Upload protractor-smartrunner artifact related to this particular job to S3
|
||||||
|
./scripts/ci/utils/artifact-to-s3.sh -a "$SMART_RUNNER_DIRECTORY" -o "$S3_DBP_FOLDER/protractor-smartrunner-$TRAVIS_JOB_ID.tar.bz2"
|
@ -4,13 +4,12 @@ FROM=$1;
|
|||||||
TO=$2;
|
TO=$2;
|
||||||
PARAMS=$3;
|
PARAMS=$3;
|
||||||
|
|
||||||
echo "Download artefact from S3 $FROM"
|
# Download built application artifact from S3
|
||||||
./scripts/ci/utils/artifact-from-s3.sh -a "$FROM" -o "$TO"
|
./scripts/ci/utils/artifact-from-s3.sh -a "$FROM" -o "$TO"
|
||||||
echo "Download artefact done"
|
|
||||||
|
|
||||||
echo "Replace app.config with options $PARAMS"
|
|
||||||
node "./scripts/app-config-replace.js" --config="$TO/app.config.json" $PARAMS
|
node "./scripts/app-config-replace.js" --config="$TO/app.config.json" $PARAMS
|
||||||
echo "Replace app.config done"
|
|
||||||
|
# Download protractor-smartrunner artifact related to this particular job from S3, if exists
|
||||||
|
./scripts/ci/utils/artifact-from-s3.sh -a "$S3_DBP_FOLDER/protractor-smartrunner-$TRAVIS_JOB_ID.tar.bz2" -o "$SMART_RUNNER_DIRECTORY"
|
||||||
|
|
||||||
echo "====== Update webdriver-manager ====="
|
echo "====== Update webdriver-manager ====="
|
||||||
if [ "$CI" = "true" ]; then
|
if [ "$CI" = "true" ]; then
|
||||||
|
@ -1,30 +1,37 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Run the build on mergin to development with always the latest ADF
|
# Run the build on develop branch with always the latest ADF
|
||||||
if [ "${TRAVIS_BRANCH}" == "develop" ] && [ "${TRAVIS_EVENT_TYPE}" == "api" ] || [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
|
if [[ "${TRAVIS_BRANCH}" == "develop" && ( "${TRAVIS_EVENT_TYPE}" == "api" || "${TRAVIS_EVENT_TYPE}" == "cron" || "${TRAVIS_EVENT_TYPE}" == "push" ) ]]; then
|
||||||
|
echo " ===== USING LATEST ADF VERSION ===== "
|
||||||
./scripts/update-version.sh -v $ADF_RELEASE_VERSION
|
./scripts/update-version.sh -v $ADF_RELEASE_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip install --user awscli
|
# Settings for Angular builder --------------------------------------------------------
|
||||||
|
|
||||||
export NODE_OPTIONS="--max_old_space_size=30000"
|
export NODE_OPTIONS="--max_old_space_size=30000"
|
||||||
|
|
||||||
|
# Settings for protractor-smartrunner -------------------------------------------------
|
||||||
export GIT_HASH=`git rev-parse HEAD`
|
export GIT_HASH=`git rev-parse HEAD`
|
||||||
S3_DBP_PATH="s3://alfresco-travis-builds/aca"
|
export SMART_RUNNER_DIRECTORY=".protractor-smartrunner"
|
||||||
|
|
||||||
|
# Settings for Nx ---------------------------------------------------------------------
|
||||||
export BASE_HASH="$(git describe --tags `git rev-list --tags --max-count=1`)"
|
export BASE_HASH="$(git describe --tags `git rev-list --tags --max-count=1`)"
|
||||||
export HEAD_HASH="HEAD"
|
export HEAD_HASH="HEAD"
|
||||||
|
|
||||||
|
# Settings for S3 caching -------------------------------------------------------------
|
||||||
|
pip install --user awscli
|
||||||
|
S3_DBP_PATH="s3://alfresco-travis-builds/aca"
|
||||||
if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
|
if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
|
||||||
export S3_DBP_FOLDER="$S3_DBP_PATH/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID"
|
export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$TRAVIS_BRANCH"
|
||||||
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||||
export S3_DBP_FOLDER="$S3_DBP_PATH/$TRAVIS_PULL_REQUEST/$TRAVIS_BUILD_ID"
|
export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$TRAVIS_PULL_REQUEST"
|
||||||
export BASE_HASH="origin/$TRAVIS_BRANCH"
|
export BASE_HASH="origin/$TRAVIS_BRANCH"
|
||||||
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
|
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
|
||||||
export S3_DBP_FOLDER="$S3_DBP_PATH/cron/$TRAVIS_BUILD_ID"
|
export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/cron"
|
||||||
else
|
else
|
||||||
export S3_DBP_FOLDER="$S3_DBP_PATH/api/$TRAVIS_BUILD_ID"
|
export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/api"
|
||||||
fi
|
fi
|
||||||
|
export S3_DBP_FOLDER="$S3_DBP_ROOT_FOLDER/$TRAVIS_BUILD_ID"
|
||||||
|
|
||||||
echo "BASE_HASH: $BASE_HASH"
|
echo "BASE_HASH: $BASE_HASH"
|
||||||
|
echo "S3 DBP root folder: $S3_DBP_ROOT_FOLDER"
|
||||||
echo "S3 DBP destination: $S3_DBP_FOLDER"
|
echo "S3 DBP destination: $S3_DBP_FOLDER"
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import * as ora from 'ora';
|
|||||||
|
|
||||||
require('dotenv').config({ path: process.env.ENV_FILE });
|
require('dotenv').config({ path: process.env.ENV_FILE });
|
||||||
const API_HOST = process.env.API_HOST;
|
const API_HOST = process.env.API_HOST;
|
||||||
|
const API_CONTENT_HOST = process.env.API_CONTENT_HOST;
|
||||||
const OAUTH_HOST = process.env.OAUTH_HOST;
|
const OAUTH_HOST = process.env.OAUTH_HOST;
|
||||||
const IDENTITY_HOST = process.env.IDENTITY_HOST;
|
const IDENTITY_HOST = process.env.IDENTITY_HOST;
|
||||||
const NOTIFICATION_LAST = process.env.NOTIFICATION_LAST;
|
const NOTIFICATION_LAST = process.env.NOTIFICATION_LAST;
|
||||||
@ -49,18 +50,7 @@ export default class LiteServeRunner {
|
|||||||
alias: 'c',
|
alias: 'c',
|
||||||
title: 'Rewrite app.config.json with the following environment vars?',
|
title: 'Rewrite app.config.json with the following environment vars?',
|
||||||
required: false,
|
required: false,
|
||||||
choices: [
|
choices: this.getEnvVarChoices.bind(this)
|
||||||
...(API_HOST !== undefined ? [{ name: `API_HOST=${API_HOST}`, value: 'a', short: 'API_HOST', checked: true }] : []),
|
|
||||||
...(OAUTH_HOST !== undefined
|
|
||||||
? [{ name: `OAUTH_HOST=${OAUTH_HOST} ${red('+ authType=OAUTH also!!!')}`, value: 'o', short: 'OAUTH_HOST', checked: true }]
|
|
||||||
: []),
|
|
||||||
...(IDENTITY_HOST !== undefined
|
|
||||||
? [{ name: `IDENTITY_HOST=${IDENTITY_HOST} ${red('+ authType=OAUTH also!!!')}`, value: 'i', short: 'IDENTITY_HOST', checked: true }]
|
|
||||||
: []),
|
|
||||||
...(NOTIFICATION_LAST !== undefined
|
|
||||||
? [{ name: `NOTIFICATION_LAST=${NOTIFICATION_LAST}`, value: 'n', short: 'NOTIFICATION_LAST', checked: true }]
|
|
||||||
: [])
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -156,4 +146,46 @@ export default class LiteServeRunner {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getEnvVarChoices() {
|
||||||
|
const choices = [];
|
||||||
|
|
||||||
|
if (API_HOST !== undefined || API_CONTENT_HOST !== undefined) {
|
||||||
|
choices.push({
|
||||||
|
name: `API_HOST=${API_HOST} && API_CONTENT_HOST=${API_CONTENT_HOST || API_HOST}`,
|
||||||
|
value: 'a',
|
||||||
|
short: 'API_HOST',
|
||||||
|
checked: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OAUTH_HOST !== undefined) {
|
||||||
|
choices.push({
|
||||||
|
name: `OAUTH_HOST=${OAUTH_HOST} ${red('+ authType=OAUTH also!!!')}`,
|
||||||
|
value: 'o',
|
||||||
|
short: 'OAUTH_HOST',
|
||||||
|
checked: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IDENTITY_HOST !== undefined) {
|
||||||
|
choices.push({
|
||||||
|
name: `IDENTITY_HOST=${IDENTITY_HOST} ${red('+ authType=OAUTH also!!!')}`,
|
||||||
|
value: 'i',
|
||||||
|
short: 'IDENTITY_HOST',
|
||||||
|
checked: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NOTIFICATION_LAST !== undefined) {
|
||||||
|
choices.push({
|
||||||
|
name: `NOTIFICATION_LAST=${NOTIFICATION_LAST}`,
|
||||||
|
value: 'n',
|
||||||
|
short: 'NOTIFICATION_LAST',
|
||||||
|
checked: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return choices;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const tsConfigPath = path.resolve(__dirname, 'tsconfig.base.json');
|
const tsConfigPath = path.resolve(__dirname, 'tsconfig.json');
|
||||||
const tsConfig = require(tsConfigPath);
|
const tsConfig = require(tsConfigPath);
|
||||||
|
|
||||||
require('ts-node').register({ project: tsConfigPath });
|
require('ts-node').register({ project: tsConfigPath });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user