mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[AAE-6455] use tpl format instead of json and replace values (#2374)
* Use the tpl instead of json and replace values for build start and e2e * Use different license file name to avoid conflicts * use the travis value * Use the general ng build and add doc
This commit is contained in:
@@ -1,5 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Validating replaced app.config.json
|
||||
# ---------------------------------------------------------------
|
||||
app_config_checker(){
|
||||
APP_CONFIG_FILE_PATH=$1;
|
||||
|
||||
echo -n " \_ Validating replaced config file ... ";
|
||||
$(npm bin)/ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d $APP_CONFIG_FILE_PATH --errors=text --verbose || exit 4
|
||||
|
||||
if grep -E -q '\$\{[A-Z0-9_]*\}' $APP_CONFIG_FILE_PATH; then
|
||||
echo -e "\e[31m \_ ERROR: Variables are still present in the app.config.json file. Some of them might not have default value set.\e[0m";
|
||||
exit 5;
|
||||
fi
|
||||
}
|
||||
|
||||
FROM=$1;
|
||||
TO=$2;
|
||||
PARAMS=$3;
|
||||
@@ -11,7 +26,13 @@ echo "====== Check content UP ====="
|
||||
echo "====== Download artifacts ====="
|
||||
# Download built application artifact from S3
|
||||
./scripts/ci/utils/artifact-from-s3.sh -a "$FROM" -o "$TO"
|
||||
node "./scripts/app-config-replace.js" --config="$TO/app.config.json" $PARAMS
|
||||
|
||||
APP_CONFIG_FILE_PATH="$TO/app.config.json"
|
||||
EXTRA_ENV_SETTINGS=""
|
||||
# Replace variables in app.config.json
|
||||
envsub $EXTRA_ENV_SETTINGS --all $APP_CONFIG_FILE_PATH $APP_CONFIG_FILE_PATH || exit 1
|
||||
|
||||
app_config_checker $APP_CONFIG_FILE_PATH
|
||||
|
||||
# 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"
|
||||
|
Reference in New Issue
Block a user