.
This commit is contained in:
parent
a241e7ddd9
commit
9df463bd32
@ -25,8 +25,8 @@ RUN git clone https://git.knownelement.com/ExternalVendorCode/mo.git /app/vendor
|
||||
ENV MO_PATH=/app/vendor/mo/mo
|
||||
ENV PIPELINE_SERVER_SCRIPT=/app/vendor/MarkdownResume-Pipeline/build/build-pipeline-server-markdown.sh
|
||||
|
||||
# Set volumes for input and output
|
||||
VOLUME ["/ResumeInput", "/ResumeOutput"]
|
||||
# Set volumes for environment, input and output
|
||||
VOLUME ["/env", "/ResumeInput", "/ResumeOutput"]
|
||||
|
||||
# Set the default command to execute the client script
|
||||
CMD ["/app/build-pipeline-client-markdown.sh"]
|
||||
|
@ -14,38 +14,36 @@ fi
|
||||
# Load environment variables
|
||||
source "$ENV_FILE"
|
||||
|
||||
# Set up key variables for the build-pipeline-server-markdown.sh script
|
||||
export MO_PATH="/app/vendor/mo/mo"
|
||||
export BUILD_TEMP_DIR="/app/build-temp/MarkdownResume"
|
||||
export BUILD_OUTPUT_DIR="/app/build-output/MarkdownResume"
|
||||
export BUILDYAML_JOBBOARD="$BUILD_TEMP_DIR/JobBoard.yml"
|
||||
export BUILDYAML_CLIENTSUBMISSION="$BUILD_TEMP_DIR/ClientSubmission.yml"
|
||||
export BUILDYAML_CANDIDATEINFOSHEET="$BUILD_TEMP_DIR/CandidateInfoSheet.yml"
|
||||
export CandidateInfoSheetMarkdownOutputFile="$BUILD_OUTPUT_DIR/recruiter/CandidateInfoSheet.md"
|
||||
export CandidateInfoSheetPDFOutputFile="$BUILD_OUTPUT_DIR/recruiter/CandidateInfoSheet.pdf"
|
||||
export JobBoardMarkdownOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.md"
|
||||
export JobBoardPDFOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.pdf"
|
||||
export JobBoardMSWordOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.doc"
|
||||
export ClientSubmissionMarkdownOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-Resume.md"
|
||||
export ClientSubmissionPDFOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-Resume.pdf"
|
||||
export ClientSubmissionMSWordOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-Resume.doc"
|
||||
|
||||
# Clean up from previous runs
|
||||
echo "Cleaning up from previous runs..."
|
||||
rm -v -f "$BUILDYAML_CANDIDATEINFOSHEET" || true
|
||||
rm -v -f "$CandidateInfoSheetMarkdownOutputFile" || true
|
||||
rm -v -f "$CandidateInfoSheetPDFOutputFile" || true
|
||||
rm -v -f "$JobBoardMarkdownOutputFile" || true
|
||||
rm -v -f "$JobBoardPDFOutputFile" || true
|
||||
rm -v -f "$JobBoardMSWordOutputFile" || true
|
||||
rm -v -f "$ClientSubmissionMarkdownOutputFile" || true
|
||||
rm -v -f "$ClientSubmissionPDFOutputFile" || true
|
||||
rm -v -f "$ClientSubmissionMSWordOutputFile" || true
|
||||
# Define paths using Docker volumes with default fallbacks
|
||||
export INPUT_DIR="${ResumeInputDir:-/Resume-Input}" # Input directory
|
||||
export OUTPUT_DIR="${ResumeOutputDir:-/Resume-Output}" # Output directory
|
||||
export TEMP_DIR="${BuildTempDir:-$OUTPUT_DIR/Temp}" # Temporary files directory
|
||||
export FINAL_DIR="${FinalDir:-$OUTPUT_DIR/Final}" # Final output directory
|
||||
export CANDIDATE_INFO_DIR="${CandidateInfoDir:-$FINAL_DIR/candidate-info-sheet}" # Candidate info sheet directory
|
||||
export CLIENT_VERSION_DIR="${ClientVersionDir:-$FINAL_DIR/client-version}" # Client version directory
|
||||
export JOB_BOARD_VERSION_DIR="${JobBoardVersionDir:-$FINAL_DIR/job-board-version}" # Job board version directory
|
||||
|
||||
# Create necessary directories
|
||||
echo "Setting up directories..."
|
||||
mkdir -p "$BUILD_TEMP_DIR" "$BUILD_OUTPUT_DIR/recruiter" "$BUILD_OUTPUT_DIR/job-board" "$BUILD_OUTPUT_DIR/client-submit"
|
||||
mkdir -p "$TEMP_DIR" \
|
||||
"$CANDIDATE_INFO_DIR" \
|
||||
"$CLIENT_VERSION_DIR" \
|
||||
"$JOB_BOARD_VERSION_DIR"
|
||||
|
||||
# Clean up from previous runs
|
||||
echo "Cleaning up from previous runs..."
|
||||
rm -v -f "$TEMP_DIR/JobBoard.yml" || true
|
||||
rm -v -f "$TEMP_DIR/ClientSubmission.yml" || true
|
||||
rm -v -f "$TEMP_DIR/CandidateInfoSheet.yml" || true
|
||||
rm -v -f "$CANDIDATE_INFO_DIR/CandidateInfoSheet.md" || true
|
||||
rm -v -f "$CANDIDATE_INFO_DIR/CandidateInfoSheet.pdf" || true
|
||||
rm -v -f "$JOB_BOARD_VERSION_DIR/Candidate-Resume.md" || true
|
||||
rm -v -f "$JOB_BOARD_VERSION_DIR/Candidate-Resume.pdf" || true
|
||||
rm -v -f "$JOB_BOARD_VERSION_DIR/Candidate-Resume.doc" || true
|
||||
rm -v -f "$CLIENT_VERSION_DIR/Candidate-Resume.md" || true
|
||||
rm -v -f "$CLIENT_VERSION_DIR/Candidate-Resume.pdf" || true
|
||||
rm -v -f "$CLIENT_VERSION_DIR/Candidate-Resume.doc" || true
|
||||
|
||||
# Run the pipeline server script
|
||||
echo "Running the pipeline server script..."
|
||||
/app/vendor/MarkdownResume-Pipeline/build/build-pipeline-server-markdown.sh
|
||||
/app/vendor/MarkdownResume-Pipeline/build/build-pipeline-server-markdown.sh
|
@ -1,62 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
# This is a demo script for the MarkdownResumePipeline server
|
||||
# This script creates PDF/MSWord output from markdown/csv input
|
||||
|
||||
|
||||
############################################
|
||||
#Edit this file to reflect your information
|
||||
############################################
|
||||
|
||||
source "./CandidateVariables.env"
|
||||
|
||||
####################################################
|
||||
####################################################
|
||||
####################################################
|
||||
#DO NOT CHANGE ANYTHING BELOW THIS LINE
|
||||
####################################################
|
||||
####################################################
|
||||
####################################################
|
||||
|
||||
######################################################################################
|
||||
# Setup key variables that will be used by the build-pipeline-server-markdown.sh script
|
||||
######################################################################################
|
||||
|
||||
export MO_PATH="bash ../../vendor/git.knownelement.com/ExternalVendorCode/mo/mo"
|
||||
|
||||
export BUILD_TEMP_DIR="$PipelineClientWorkingDir/build-temp/MarkdownResume"
|
||||
export BUILD_OUTPUT_DIR="$PipelineClientWorkingDir/build-output/MarkdownResume"
|
||||
|
||||
export BUILDYAML_JOBBOARD="$BUILD_TEMP_DIR/JobBoard.yml"
|
||||
export BUILDYAML_CLIENTSUBMISSION="$BUILD_TEMP_DIR/ClientSubmission.yml"
|
||||
export BUILDYAML_CANDIDATEINFOSHEET="$BUILD_TEMP_DIR/CandidateInfoSheet.yml"
|
||||
|
||||
export CandidateInfoSheetMarkdownOutputFile="$BUILD_OUTPUT_DIR/recruiter/CandidateInfoSheet.md"
|
||||
export CandidateInfoSheetPDFOutputFile="$BUILD_OUTPUT_DIR/recruiter/CandidateInfoSheet.pdf"
|
||||
|
||||
export JobBoardMarkdownOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.md"
|
||||
export JobBoardPDFOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.pdf"
|
||||
export JobBoardMSWordOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.doc"
|
||||
|
||||
export ClientSubmissionMarkdownOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-Resume.md"
|
||||
export ClientSubmissionPDFOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-Resume.pdf"
|
||||
export ClientSubmissionMSWordOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-Resume.doc"
|
||||
|
||||
echo "Cleaning up from previous runs..."
|
||||
|
||||
rm $BUILDYAML_CANDIDATEINFOSHEET
|
||||
rm $CandidateInfoSheetMarkdownOutputFile
|
||||
rm $CandidateInfoSheetPDFOutputFile
|
||||
|
||||
rm $BUILDYAML_JOBBOARD
|
||||
rm $JobBoardMarkdownOutputFile
|
||||
rm $JobBoardPDFOutputFile
|
||||
rm $JobBoardMSWordOutputFile
|
||||
|
||||
rm $BUILDYAML_CLIENTSUBMISSION
|
||||
rm $ClientSubmissionMarkdownOutputFile
|
||||
rm $ClientSubmissionPDFOutputFile
|
||||
rm $ClientSubmissionMSWordOutputFile
|
||||
|
||||
bash ../../vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline/build/build-pipeline-server-markdown.sh
|
Loading…
Reference in New Issue
Block a user