mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix e2e (#6087)
* fix protractor conf * remove update env * fix cli error script cs * change screenshot plugin * remove unused param * fix * fix * fix * moment comment nvm * fix * fix * fix * fix * remove adf redirect * fix * fix * save remote report * report fix * improve save result * fix folder save * fix folder save * fix placeholder pointer , they needs refactor later * fix * fix lint * fix * remove test already covered by unit fix the test in core needed exclude the one impossible to make it works without APS basic support * lint * fix some logout missing * fix * Fix the custom-tasks-filters.e2e * fix lint * fix * fix * fix * Fix wait on start process and on process definition options * Fix logout before login again * fix uplaod test * fix * Fix infodrawer with check detail and sleep * lint * increase list of excluded test * fix * fix lint * change wait method datatable * fix * fix * revert check value * fix * fix * change tag test Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com>
This commit is contained in:
@@ -218,27 +218,6 @@ This script test the distribution of ADF against the demo shell
|
||||
./test-dist
|
||||
```
|
||||
|
||||
# rancher-update.sh
|
||||
|
||||
***rancher-update.sh***
|
||||
|
||||
Internal script for update the rancher env
|
||||
|
||||
| Option | Description |
|
||||
| --- | --- |
|
||||
|--access_key |rancher access key|
|
||||
|--secret_key |rancher secret key|
|
||||
|--url |rancher_url|
|
||||
|--environment_name s|ervice name to replace in rancher|
|
||||
|--image |image to gater and load in the service, example: docker:alfresco/demo-shell:latest|
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
/rancher-update.sh --access_key ACCESS_KEY --secret_key SECRET_KEY --url RANCHER_URL--environment_name adf-master --image docker:alfresco/demo-shell:master
|
||||
```
|
||||
|
||||
|
||||
# test-e2e-lib.sh
|
||||
|
||||
***test-e2e-lib.sh***
|
||||
|
@@ -2,8 +2,14 @@
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../
|
||||
rm -rf lib/cli/dist
|
||||
rm -rf lib/dist/cli
|
||||
|
||||
cd $DIR/../../lib/cli/
|
||||
|
||||
|
||||
|
||||
echo "====== Cli ======"
|
||||
echo "====== Build ======"
|
||||
npm i
|
||||
@@ -11,6 +17,7 @@ npm run dist
|
||||
|
||||
cd $DIR/../../
|
||||
cp -R ./lib/cli/dist lib/dist/cli/
|
||||
cp ./lib/cli/README.md lib/dist/cli/README.md
|
||||
|
||||
echo "====== Move to node_modules ======"
|
||||
rm -rf ./node_modules/@alfresco/adf-cli/ && \
|
||||
|
@@ -4,7 +4,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$DIR/../"
|
||||
BROWSER_RUN=false
|
||||
DEVELOPMENT=false
|
||||
EXECLINT=false
|
||||
LITESERVER=false
|
||||
EXEC_VERSION_JSAPI=false
|
||||
TIMEOUT=120000
|
||||
@@ -18,7 +17,6 @@ show_help() {
|
||||
echo "-p or --password"
|
||||
echo "-identity_admin_email"
|
||||
echo "-identity_admin_password"
|
||||
echo "-e or --email"
|
||||
echo "-b or --browser run the test in the browser (No headless mode)"
|
||||
echo "-s or --spec run a single test file"
|
||||
echo "-f or --folder run a single folder test"
|
||||
@@ -29,7 +27,6 @@ show_help() {
|
||||
echo "-host_sso the entire path including the name of the realm"
|
||||
echo "-save save the error screenshot and report in the remote env"
|
||||
echo "-timeout or --timeout override the timeout foe the wait utils"
|
||||
echo "-l --lint enable lint"
|
||||
echo "-m --maxInstances max instances parallel for tests"
|
||||
echo "-log or --log print all the browser log"
|
||||
echo "-db or --debug run the debugger"
|
||||
@@ -58,10 +55,7 @@ set_identity_admin_password(){
|
||||
IDENTITY_ADMIN_PASSWORD=$1
|
||||
export IDENTITY_ADMIN_PASSWORD=$IDENTITY_ADMIN_PASSWORD
|
||||
}
|
||||
set_email(){
|
||||
EMAIL=$1
|
||||
export EMAIL_ADF=$EMAIL
|
||||
}
|
||||
|
||||
set_host(){
|
||||
HOST=$1
|
||||
export URL_HOST_ADF=$HOST
|
||||
@@ -120,10 +114,6 @@ set_prefix(){
|
||||
export PREFIX=$PREFIX
|
||||
}
|
||||
|
||||
lint(){
|
||||
EXECLINT=true
|
||||
}
|
||||
|
||||
debug(){
|
||||
export DEBUG=true;
|
||||
}
|
||||
@@ -155,7 +145,6 @@ while [[ $1 == -* ]]; do
|
||||
-p|--password) set_password $2; shift 2;;
|
||||
-identity_admin_email) set_identity_admin_email $2; shift 2;;
|
||||
-identity_admin_password) set_identity_admin_password $2; shift 2;;
|
||||
-e|--email) set_email $2; shift 2;;
|
||||
-f|--folder) set_test_folder $2; shift 2;;
|
||||
-timeout|--timeout) set_timeout $2; shift 2;;
|
||||
-b|--browser) set_browser; shift;;
|
||||
@@ -167,11 +156,10 @@ while [[ $1 == -* ]]; do
|
||||
-ud|--use-dist) lite_server; shift;;
|
||||
-save) set_save_screenshot; shift;;
|
||||
-proxy|--proxy) set_proxy $2; shift 2;;
|
||||
-s|--seleniumServer) set_selenium $2; shift 2;;
|
||||
--seleniumServer) set_selenium $2; shift 2;;
|
||||
-host|--host) set_host $2; shift 2;;
|
||||
-log|--log) set_log; shift ;;
|
||||
-host_sso|--host_sso) set_host_sso $2; shift 2;;
|
||||
-l|--lint) lint; shift;;
|
||||
-m|--maxInstances) max_instances $2; shift 2;;
|
||||
-vjsapi) version_js_api $2; shift 2;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
@@ -188,10 +176,6 @@ if $EXEC_VERSION_JSAPI == true; then
|
||||
npm install alfresco-js-api@${JSAPI_VERSION}
|
||||
fi
|
||||
|
||||
if [[ $EXECLINT == "true" ]]; then
|
||||
npm run lint-e2e || exit 1
|
||||
fi
|
||||
|
||||
echo "====== Update webdriver-manager ====="
|
||||
if [ "$CI" = "true" ]; then
|
||||
export chrome=$(google-chrome --product-version)
|
||||
@@ -220,6 +204,7 @@ else
|
||||
|
||||
npm run lite-server-e2e>/dev/null & $DEBUG_OPTION ./node_modules/protractor/bin/protractor ./e2e/protractor.conf.js || exit 1
|
||||
else
|
||||
echo "====== Run without lite-server ====="
|
||||
$DEBUG_OPTION ./node_modules/protractor/bin/protractor ./e2e/protractor.conf.js || exit 1
|
||||
fi
|
||||
fi
|
||||
|
@@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
# Get Tag Image
|
||||
TAG_VERSION=$(./scripts/travis/deploy/get-docker-image-tag-name.sh)
|
||||
echo "Running the docker with tag" $TAG_VERSION
|
||||
|
||||
# Publish Image to docker
|
||||
|
||||
sed s%href=\".\"%href=\".\"%g \
|
||||
-i ./dist/demo-shell/index.html
|
||||
|
||||
mkdir "./demo-shell/tmp/"
|
||||
mv ./dist/demo-shell/* ./demo-shell/tmp
|
||||
|
||||
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)"
|
||||
|
||||
echo "Update rancher with docker tag" $TAG_VERSION --url $REPO_RANCHER --environment_name $REPO_RANCHER_ADF_NAME
|
||||
|
||||
# Deploy PR in Rancher env
|
||||
(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 ./dist/demo-shell/${TRAVIS_BUILD_NUMBER} "./demo-shell/tmp/"
|
||||
mv "./dist/demo-shell/" "./dist/demo-shell/"
|
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
# Get Tag Image
|
||||
TAG_VERSION=$(./scripts/travis/deploy/get-docker-image-tag-name.sh)
|
||||
echo "Running the docker with tag" $TAG_VERSION
|
||||
|
||||
# Publish Image to docker
|
||||
./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,$TRAVIS_BRANCH" --pathProject "$(pwd)"
|
||||
|
||||
echo "Update rancher with docker tag" $TAG_VERSION --url $REPO_RANCHER --environment_name $REPO_RANCHER_ADF_NAME
|
||||
|
||||
# Deploy PR in Rancher env
|
||||
./scripts/travis/deploy/rancher-update.sh --access_key $RANCHER_TOKEN --secret_key $RANCHER_SECRET --url $REPO_RANCHER --environment_name $REPO_RANCHER_ADF_NAME --image docker:$DOCKER_REPOSITORY:$TAG_VERSION
|
@@ -1,262 +0,0 @@
|
||||
var program = require('commander');
|
||||
var request = require('request');
|
||||
|
||||
function asyncRequest(option) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
request(option, function (error, res, body) {
|
||||
if (!error && (res.statusCode == 200 || res.statusCode == 201)) {
|
||||
resolve(body);
|
||||
} else {
|
||||
console.log("Error " + JSON.stringify(body));
|
||||
reject(error + JSON.stringify(body));
|
||||
throw "Error";
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
||||
program
|
||||
.version('0.1.0')
|
||||
.option('-n, --name [type]', 'Name to give at the service in rancher')
|
||||
.option('-r, --remote [type]', 'Remote environment host adf.lab.com ')
|
||||
.option('-e, --env [type]', 'Name to give at the service in rancher')
|
||||
.option('-i, --image [type]', 'Docker image to load')
|
||||
.option('-s, --server [type]', 'Server RANCHER_SERVER URL')
|
||||
.option('-p, --password [type]', 'password RANCHER')
|
||||
.option('-u, --username [type]', 'username RANCHER')
|
||||
.parse(process.argv);
|
||||
|
||||
auth = 'Basic ' + new Buffer(program.username + ':' + program.password).toString('base64');
|
||||
|
||||
var project = await asyncRequest({
|
||||
url: program.server + `/v1/project?name=${program.env}`,
|
||||
method: 'GET',
|
||||
json: true,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
"accept": "application/json",
|
||||
"Authorization": auth
|
||||
},
|
||||
body: ""
|
||||
}).catch((error) => {
|
||||
console.log('Project name error'+ error);
|
||||
});
|
||||
|
||||
var stacks = await asyncRequest({
|
||||
url: `${program.server}/v2-beta/projects/${project.data[0].id}/stacks?limit=-1&sort=name`,
|
||||
method: 'GET',
|
||||
json: true,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
"accept": "application/json",
|
||||
"Authorization": auth
|
||||
},
|
||||
body: ""
|
||||
}).catch((error) => {
|
||||
console.log('Stacks error'+ error);
|
||||
});
|
||||
|
||||
|
||||
var stackId = stacks.data[0].id;
|
||||
var environmentId = project.data[0].id;
|
||||
|
||||
console.log("StackId " + stackId);
|
||||
console.log("ID environment " + environmentId);
|
||||
console.log("image to Load " + program.image);
|
||||
|
||||
var postData = {
|
||||
"scale": 1,
|
||||
"assignServiceIpAddress": false,
|
||||
"startOnCreate": true,
|
||||
"type": "service",
|
||||
"stackId": stackId,
|
||||
"launchConfig": {
|
||||
"instanceTriggeredStop": "stop",
|
||||
"kind": "container",
|
||||
"networkMode": "managed",
|
||||
"privileged": false,
|
||||
"publishAllPorts": false,
|
||||
"readOnly": false,
|
||||
"runInit": false,
|
||||
"startOnCreate": true,
|
||||
"stdinOpen": true,
|
||||
"tty": true,
|
||||
"vcpu": 1,
|
||||
"drainTimeoutMs": 0,
|
||||
"type": "launchConfig",
|
||||
"labels": {"io.rancher.container.pull_image": "always"},
|
||||
"restartPolicy": {"name": "always"},
|
||||
"secrets": [],
|
||||
"dataVolumes": [],
|
||||
"dataVolumesFrom": [],
|
||||
"dns": [],
|
||||
"dnsSearch": [],
|
||||
"capAdd": [],
|
||||
"capDrop": [],
|
||||
"devices": [],
|
||||
"logConfig": {"driver": "", "config": {}},
|
||||
"dataVolumesFromLaunchConfigs": [],
|
||||
"imageUuid": "docker:"+program.image,
|
||||
"ports": [],
|
||||
"blkioWeight": null,
|
||||
"cgroupParent": null,
|
||||
"count": null,
|
||||
"cpuCount": null,
|
||||
"cpuPercent": null,
|
||||
"cpuPeriod": null,
|
||||
"cpuQuota": null,
|
||||
"cpuRealtimePeriod": null,
|
||||
"cpuRealtimeRuntime": null,
|
||||
"cpuSet": null,
|
||||
"cpuSetMems": null,
|
||||
"cpuShares": null,
|
||||
"createIndex": null,
|
||||
"created": null,
|
||||
"deploymentUnitUuid": null,
|
||||
"description": null,
|
||||
"diskQuota": null,
|
||||
"domainName": null,
|
||||
"externalId": null,
|
||||
"firstRunning": null,
|
||||
"healthInterval": null,
|
||||
"healthRetries": null,
|
||||
"healthState": null,
|
||||
"healthTimeout": null,
|
||||
"hostname": null,
|
||||
"ioMaximumBandwidth": null,
|
||||
"ioMaximumIOps": null,
|
||||
"ip": null,
|
||||
"ip6": null,
|
||||
"ipcMode": null,
|
||||
"isolation": null,
|
||||
"kernelMemory": null,
|
||||
"memory": null,
|
||||
"memoryMb": null,
|
||||
"memoryReservation": null,
|
||||
"memorySwap": null,
|
||||
"memorySwappiness": null,
|
||||
"milliCpuReservation": null,
|
||||
"oomScoreAdj": null,
|
||||
"pidMode": null,
|
||||
"pidsLimit": null,
|
||||
"removed": null,
|
||||
"requestedIpAddress": null,
|
||||
"shmSize": null,
|
||||
"startCount": null,
|
||||
"stopSignal": null,
|
||||
"stopTimeout": null,
|
||||
"user": null,
|
||||
"userdata": null,
|
||||
"usernsMode": null,
|
||||
"uts": null,
|
||||
"uuid": null,
|
||||
"volumeDriver": null,
|
||||
"workingDir": null,
|
||||
"networkLaunchConfig": null
|
||||
},
|
||||
"secondaryLaunchConfigs": [],
|
||||
"name": program.name,
|
||||
"createIndex": null,
|
||||
"created": null,
|
||||
"description": null,
|
||||
"externalId": null,
|
||||
"healthState": null,
|
||||
"kind": null,
|
||||
"removed": null,
|
||||
"selectorContainer": null,
|
||||
"selectorLink": null,
|
||||
"uuid": null,
|
||||
"vip": null,
|
||||
"fqdn": null
|
||||
};
|
||||
|
||||
console.log("Create Service ");
|
||||
|
||||
var createService = await asyncRequest({
|
||||
url: `${program.server}/v2-beta/projects/${environmentId}/service`,
|
||||
method: 'POST',
|
||||
json: true,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
"accept": "application/json",
|
||||
"Authorization": auth
|
||||
},
|
||||
body: postData,
|
||||
}).catch((error) => {
|
||||
console.log('Error createService'+ error);
|
||||
});
|
||||
|
||||
if (!createService) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("New environment ID " + createService.id);
|
||||
|
||||
var loadBalancer = await asyncRequest({
|
||||
url: `${program.server}/v1/projects/${environmentId}/loadbalancerservices`,
|
||||
method: 'GET',
|
||||
json: true,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
"accept": "application/json",
|
||||
"Authorization": auth
|
||||
},
|
||||
body: postData,
|
||||
}).catch((error) => {
|
||||
console.log('Error loadBalancer'+ error);
|
||||
});
|
||||
|
||||
if (!loadBalancer) {
|
||||
return;
|
||||
}
|
||||
|
||||
var loadBalancerId = loadBalancer.data[0].id;
|
||||
console.log("Load balancer ID " + loadBalancerId);
|
||||
|
||||
var loadBalancerGet = await asyncRequest({
|
||||
url: `${program.server}/v2-beta/projects/${environmentId}/loadbalancerservices/${loadBalancerId}`,
|
||||
method: 'GET',
|
||||
json: true,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
"accept": "application/json",
|
||||
"Authorization": auth
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log('Error get load balancer'+ error);
|
||||
});
|
||||
|
||||
//console.log("Load balancer ID " + JSON.stringify(loadBalancerGet.lbConfig.portRules));
|
||||
|
||||
var newRule = {
|
||||
"type": "portRule",
|
||||
"hostname": program.remote,
|
||||
"path": `/${program.name}`,
|
||||
"priority": 1,
|
||||
"protocol": "http",
|
||||
"serviceId": createService.id,
|
||||
"sourcePort": 80,
|
||||
"targetPort": 8080
|
||||
};
|
||||
|
||||
loadBalancerGet.lbConfig.portRules.push(newRule);
|
||||
|
||||
await asyncRequest({
|
||||
url: `${program.server}/v2-beta/projects/${environmentId}/loadbalancerservices/${loadBalancerId}`,
|
||||
method: 'PUT',
|
||||
json: true,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
"accept": "application/json",
|
||||
"Authorization": auth
|
||||
},
|
||||
body: loadBalancerGet
|
||||
}).catch((error) => {
|
||||
console.log('Error Update load balancer'+ error);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
main();
|
@@ -1,61 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
show_help() {
|
||||
echo "Usage: docker_publish.sh"
|
||||
echo ""
|
||||
echo "--access_key rancher access key"
|
||||
echo "--secret_key rancher secret key"
|
||||
echo "--url rancher_url"
|
||||
echo "--environment_name service name to replace in rancher"
|
||||
echo "--image image to gater and load in the service, example: docker:alfresco/demo-shell:latest"
|
||||
}
|
||||
|
||||
access_key(){
|
||||
ACCESSKEY=$1
|
||||
}
|
||||
|
||||
secret_key(){
|
||||
SECRETKEY=$1
|
||||
}
|
||||
|
||||
url(){
|
||||
RANCHERURL=$1
|
||||
}
|
||||
|
||||
environment_name(){
|
||||
ENVIRONMENTNAME=$1
|
||||
}
|
||||
|
||||
image_name(){
|
||||
IMAGE=$1
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
--access_key) access_key $2; shift 2;;
|
||||
--secret_key) secret_key $2; shift 2;;
|
||||
--url) url $2; shift 2;;
|
||||
--environment_name) environment_name $2; shift 2;;
|
||||
--image) image_name $2; shift 2;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
docker pull etlweather/gaucho:alpine
|
||||
|
||||
docker=$(which docker)
|
||||
|
||||
echo "getting the id"
|
||||
|
||||
ENVIRONMENTID=$($docker run --rm -e CATTLE_ACCESS_KEY=$ACCESSKEY \
|
||||
-e CATTLE_SECRET_KEY=$SECRETKEY \
|
||||
-e CATTLE_URL=$RANCHERURL \
|
||||
etlweather/gaucho:alpine id_of $ENVIRONMENTNAME)
|
||||
|
||||
echo "id retrieved! is $ENVIRONMENTID"
|
||||
|
||||
$docker run --rm -e CATTLE_ACCESS_KEY=$ACCESSKEY \
|
||||
-e CATTLE_SECRET_KEY=$SECRETKEY \
|
||||
-e CATTLE_URL=$RANCHERURL \
|
||||
etlweather/gaucho:alpine upgrade $ENVIRONMENTID --imageUuid $IMAGE --auto_complete true --timeout 600
|
@@ -22,7 +22,7 @@ fi;
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --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" --use-dist -b -m 4 || exit 1)
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
|
||||
echo "Run all e2e $CONTEXT_ENV"
|
||||
$RUN_CHECK
|
||||
|
@@ -9,7 +9,7 @@ cd $DIR/../../../
|
||||
|
||||
export CONTEXT_ENV="core"
|
||||
export PROVIDER='ALL'
|
||||
export AUTH_TYPE='BASIC'
|
||||
export AUTH_TYPE='OAUTH'
|
||||
|
||||
if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||
echo "Calculate affected e2e $BASE_HASH $HEAD_HASH"
|
||||
@@ -20,9 +20,9 @@ if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||
echo "Affected e2e ${AFFECTED_E2E}"
|
||||
fi;
|
||||
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli check-ps-env --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||
#./node_modules/@alfresco/adf-cli/bin/adf-cli check-ps-env --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1 TODO chanvge login check SSO
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --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 || exit 1)
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --use-dist -m 2 || exit 1)
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
|
||||
echo "Run all e2e $CONTEXT_ENV"
|
||||
|
@@ -5,7 +5,7 @@ echo "Start insight e2e"
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
export PROVIDER='BPM'
|
||||
export AUTH_TYPE='BASIC'
|
||||
export AUTH_TYPE='OAUTH'
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
@@ -20,5 +20,5 @@ fi;
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "insight" || "${TRAVIS_EVENT_TYPE}" == "push" ]];
|
||||
then
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli check-ps-env --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder insights --use-dist || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --folder insights --use-dist || exit 1;
|
||||
fi;
|
||||
|
@@ -19,10 +19,10 @@ if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||
echo "Affected e2e ${AFFECTED_E2E}"
|
||||
fi;
|
||||
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist -m 2 -save -b )
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -host_sso "$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 )
|
||||
|
||||
check_env(){
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env --host "$E2E_HOST" --oauth "$E2E_HOST" --modelerUsername "$E2E_MODELER_USERNAME" --modelerPassword "$E2E_MODELER_PASSWORD" --devopsUsername "$E2E_DEVOPS_USERNAME" --devopsPassword "$E2E_DEVOPS_PASSWORD" --clientId 'activiti' || exit 1
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env --host "$E2E_HOST" --oauth "$HOST_SSO" --modelerUsername "$E2E_MODELER_USERNAME" --modelerPassword "$E2E_MODELER_PASSWORD" --devopsUsername "$E2E_DEVOPS_USERNAME" --devopsPassword "$E2E_DEVOPS_PASSWORD" --clientId 'activiti' || exit 1
|
||||
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --host "$E2E_HOST" -u "$E2E_ADMIN_EMAIL_IDENTITY" -p "$E2E_ADMIN_PASSWORD_IDENTITY" || exit 1
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ cd $DIR/../../../
|
||||
|
||||
export CONTEXT_ENV="process-services"
|
||||
export PROVIDER='BPM'
|
||||
export AUTH_TYPE='BASIC'
|
||||
export AUTH_TYPE="OAUTH"
|
||||
|
||||
echo "Start process services e2e"
|
||||
|
||||
@@ -19,8 +19,9 @@ if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||
echo "Affected e2e ${AFFECTED_E2E}"
|
||||
fi;
|
||||
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli check-ps-env --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 || exit 1)
|
||||
#./node_modules/@alfresco/adf-cli/bin/adf-cli check-ps-env --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1 TODO chanvge login check SSO
|
||||
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -host_sso "$HOST_SSO" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --use-dist -m 2 -b || exit 1)
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
|
||||
echo "Run all e2e $CONTEXT_ENV"
|
||||
|
@@ -20,7 +20,7 @@ if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ];then
|
||||
fi;
|
||||
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --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 || exit 1)
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --use-dist -m 2 || exit 1)
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "content-services" || "${TRAVIS_EVENT_TYPE}" == "push" ]];
|
||||
then
|
||||
|
0
scripts/travis/deploy/get-docker-image-tag-name.sh → scripts/travis/release/get-docker-image-tag-name.sh
Executable file → Normal file
0
scripts/travis/deploy/get-docker-image-tag-name.sh → scripts/travis/release/get-docker-image-tag-name.sh
Executable file → Normal file
17
scripts/travis/release/release-docker.sh
Normal file
17
scripts/travis/release/release-docker.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [[ $TRAVIS_BRANCH == "develop" || $TRAVIS_BRANCH == "master" ]];
|
||||
then
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
# Get Tag Image
|
||||
TAG_VERSION=$(./scripts/travis/release/get-docker-image-tag-name.sh)
|
||||
echo "Running the docker with tag" $TAG_VERSION
|
||||
|
||||
# Publish Image to docker
|
||||
./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,$TRAVIS_BRANCH" --pathProject "$(pwd)"
|
||||
|
||||
fi;
|
Reference in New Issue
Block a user