Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions content-repo/create-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,34 @@ echo "Content git dir [${CONTENT_GIT_DIR}] size: $(du -sh ${CONTENT_GIT_DIR})"

cd ${SCRIPT_DIR}

# Path where GitLab stored content-test-conf artifacts
CONTENT_TEST_CONF_DIR="/builds/xdr/cortex-content/content-docs/artifacts/repositories/content-test-conf"

if [ -d "${CONTENT_TEST_CONF_DIR}" ]; then
echo "Syncing private packs into existing content packs..."

PRIVATE_PACKS_DIR="${CONTENT_TEST_CONF_DIR}/content/PrivatePacks"
CONTENT_PACKS_DIR="${CONTENT_GIT_DIR}/Packs"

for pack in "${PRIVATE_PACKS_DIR}"/*; do
pack_name=$(basename "$pack")
echo "Processing pack: ${pack_name}"
target_pack="${CONTENT_PACKS_DIR}/${pack_name}"

if [ -d "$target_pack" ]; then
echo "Pack ${pack_name} exists in content. Copying files..."
# Copy files into existing pack without overwriting existing ones
cp -rn "$pack/"* "$target_pack/"
Comment thread
jbabazadeh marked this conversation as resolved.
else
echo "Pack ${pack_name} does not exist in content. Skipping."
fi
done

echo "Finished syncing packs."
else
echo "content-test-conf directory not found at ${CONTENT_TEST_CONF_DIR}, skipping pack sync."
fi

if [[ ( "$PULL_REQUEST" == "true" || -n "$CI_PULL_REQUEST" ) && "$CONTENT_BRANCH" == "master" ]]; then
echo "Checking if only doc files where modified and we can do a limited preview build..."
if [ -n "$CIRCLE_COMPARE_URL" ]; then
Expand Down
Loading