This commit is contained in:
2025-01-01 09:52:04 -06:00
parent 8720564ede
commit 82ace48ecf
6 changed files with 195 additions and 13 deletions

View File

@@ -1,9 +1,31 @@
#!/bin/bash
# A client script to setup variables for and execute:
#../vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline/build/build-pipeline-server.sh
# Exit on error
set -e
source ./ConsultantVariables.env
# A client script to setup variables for and execute the consultant profile pipeline
# Executes: ../../vendor/git.knownelement.com/reachableceo/ConsultantProfile-Pipeline-Server/build/build-pipeline-server-markdown.sh
# Check if ConsultantVariables.env exists
if [ ! -f "./ConsultantVariables.env" ]; then
echo "Error: ConsultantVariables.env not found"
exit 1
fi
# Source the environment file with error handling
if ! source ./ConsultantVariables.env; then
echo "Error: Failed to source ConsultantVariables.env. Please check the file for syntax errors."
exit 1
fi
# Verify required environment variables
required_vars=("PipelineClientWorkingDir" "BUILD_OUTPUT_DIR")
for var in "${required_vars[@]}"; do
if [ -z "${!var}" ]; then
echo "Error: Required environment variable $var is not set"
exit 1
fi
done
####################################################
#DO NOT CHANGE ANYTHING BELOW THIS LINE
@@ -18,12 +40,20 @@ export BUILD_TEMP_DIR="$PipelineClientWorkingDir/build-temp/ConsultantProfile"
export BUILDYAML_CONSULTANT_INFOSHEET="$BUILD_TEMP_DIR/ConsultantInfoSheet.yml"
export BUILDYAML_CONSULTANT_PROFILE="$BUILD_TEMP_DIR/ConsultantProfile.yml"
# Cleanup previous intermediatge and final output artifacts
# Create necessary directories if they don't exist
mkdir -p "$BUILD_TEMP_DIR"
mkdir -p "$BUILD_OUTPUT_DIR"
rm -vf $BUILD_TEMP_DIR/*.yml
# Cleanup previous intermediate and final output artifacts
rm -vf "$BUILD_TEMP_DIR"/*.yml
rm -vf "$BUILD_OUTPUT_DIR"/*
rm -vf $BUILD_OUTPUT_DIR/*
# Verify pipeline server script exists
PIPELINE_SERVER="../../vendor/git.knownelement.com/reachableceo/ConsultantProfile-Pipeline-Server/build/build-pipeline-server-markdown.sh"
if [ ! -f "$PIPELINE_SERVER" ]; then
echo "Error: Pipeline server script not found at: $PIPELINE_SERVER"
exit 1
fi
# Call the build-pipeline-server in the vendored repository to produce updated output artifacts
bash ../../vendor/git.knownelement.com/reachableceo/ConsultantProfile-Pipeline-Server/build/build-pipeline-server-markdown.sh
bash "$PIPELINE_SERVER"