mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-4625] ADF linking in ACA (#2841)
* [ACA-4625] ADF linking in ACA * [ACA-4625] ADF linking docs * [ACA-4625] Move adf linking to before install script * [ACA-4625] Move ADF linking to before_install script * [ACA-4625] Delete unused stage from Travis
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
PARENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
||||
# Build options -----------------------------------------------------------------------
|
||||
export BUILD_OPTS="--configuration=production,e2e"
|
||||
|
||||
# Commit settings for ADF linking -----------------------------------------------------
|
||||
export HEAD_COMMIT_HASH=${TRAVIS_PULL_REQUEST_SHA:-${TRAVIS_COMMIT}}
|
||||
export COMMIT_MESSAGE=`git log --format=%B -n 1 $HEAD_COMMIT_HASH`
|
||||
|
||||
# Settings for Angular builder --------------------------------------------------------
|
||||
export NODE_OPTIONS="--max_old_space_size=30000"
|
||||
@@ -19,6 +26,7 @@ if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
|
||||
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||
export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$TRAVIS_PULL_REQUEST"
|
||||
export BASE_HASH="origin/$TRAVIS_BRANCH"
|
||||
source $PARENT_DIR/partials/_adf-linking.sh
|
||||
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
|
||||
export S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/cron"
|
||||
else
|
||||
|
5
scripts/ci/jobs/check-link-adf.sh
Executable file
5
scripts/ci/jobs/check-link-adf.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BRANCH=`echo $COMMIT_MESSAGE | grep -o "\[link-adf\:[^]]*\]" | sed -e 's#\[link-adf:##g' | sed -e 's#\]##g'`
|
||||
echo -e "\e[31mPRs are not mergeable with conditional build. This build was run with custom ADF branch: $BRANCH \e[0m"
|
||||
exit 1
|
19
scripts/ci/partials/_adf-linking.sh
Executable file
19
scripts/ci/partials/_adf-linking.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
# Note no #!/bin/sh as this should not spawn
|
||||
# an extra shell, since this partial shell script
|
||||
# is supposed to be invoked as part of another.
|
||||
# ---------------------------------------------------------------
|
||||
# ADF linking
|
||||
# ---------------------------------------------------------------
|
||||
if [[ $COMMIT_MESSAGE == *"[link-adf:"* ]]; then
|
||||
export BUILD_OPTS="--configuration=adfprod,e2e"
|
||||
BRANCH=`echo $COMMIT_MESSAGE | grep -o "\[link-adf\:[^]]*\]" | sed -e 's#\[link-adf:##g' | sed -e 's#\]##g'`
|
||||
echo "Checking out ADF's branch: ${BRANCH}" && \
|
||||
git clone https://github.com/Alfresco/alfresco-ng2-components.git --depth=1 --branch ${BRANCH} ../alfresco-ng2-components
|
||||
# ADF theming needs it the styling
|
||||
CWD=`pwd`
|
||||
cd ../alfresco-ng2-components
|
||||
npm install @angular/material
|
||||
cd $CWD
|
||||
else
|
||||
echo -e "\e[32mUsing ADF from installed node_modules.\e[0m"
|
||||
fi ;
|
Reference in New Issue
Block a user