Compare commits

...

3 Commits

Author SHA1 Message Date
f91f8290cd Update "DSR-Pipeline-Server" from "https://git.knownelement.com/reachableceo/DSR-Pipeline-Server.git@main"
git-vendor-name: DSR-Pipeline-Server
git-vendor-dir: vendor/git.knownelement.com/reachableceo/DSR-Pipeline-Server
git-vendor-repository: https://git.knownelement.com/reachableceo/DSR-Pipeline-Server.git
git-vendor-ref: main
2024-12-15 16:47:51 -06:00
761a9b12f7 Squashed 'vendor/git.knownelement.com/reachableceo/DSR-Pipeline-Server/' changes from 284d9ba..82b1c41
82b1c41 .

git-subtree-dir: vendor/git.knownelement.com/reachableceo/DSR-Pipeline-Server
git-subtree-split: 82b1c41c6ffaba48abcb10b822397c62f94a7645
2024-12-15 16:47:51 -06:00
d6c98f0c22 . 2024-12-15 16:47:33 -06:00
3 changed files with 30 additions and 27 deletions

View File

@@ -3,13 +3,14 @@
###################################################
#############################################################################
#SET THIS NEXT VARIABLE OR NOTHING WILL WORK!!!!
#SET THESE VARIABLES OR NOTHING WILL WORK!!!!
export PipelineClientWorkingDir="D:/tsys/@ReachableCEO/DSR-Pipeline-ClientExample/local"
export StakeholderOutputMarkdownInputFile="$1"
#SET THE PREVIOUS VARIABLE OR NOTHING WILL WORK!!!!
#############################################################################
##########################################
# Layout/title page /formatting options
##########################################
@@ -21,4 +22,24 @@ export SourceCode="https://git.knownelement.com/reachableceo/MarkdownResume-Pipe
export URLCOLOR="blue"
export PAGEBACKGROUND="$PipelineClientWorkingDir/build/background5.pdf"
export PANDOC_TEMPLATE="eisvogel"
export YamlInputTemplateFileStakeholderOutput="$PipelineClientWorkingDir/build/BuildTemplate-StakeholderOutput.yml"
export YamlInputTemplateFileStakeholderOutput="$PipelineClientWorkingDir/build/BuildTemplate-StakeholderOutput.yml"
###################################################################
# Output Artifact variables
###################################################################
export BUILD_TEMP_DIR="$PipelineClientWorkingDir/build-temp"
export BUILD_OUTPUT_DIR="$PipelineClientWorkingDir/build-output"
export BUILDYAML_STAKEHOLDER_OUTPUT="$BUILD_TEMP_DIR/StakeholderOutput.yml"
export StakeholderOutputMarkdownOutputFile="$BUILD_OUTPUT_DIR/StakeholderOutput.md"
export StakeholderOutputPDFOutputFile="$BUILD_OUTPUT_DIR/StakeholderOutput.pdf"
###################################################################
# Publish variables
###################################################################
export DISCOURSE_URL=""
export DISCOURSE_API_USERNAME=""
export DISCOURSE_CATEGORY_ID=""
export DISCOURSE_POST_TITLE=""

View File

@@ -5,36 +5,18 @@ set -euo pipefail
# This is a demo script for the DSR-Pipeline-Server
# This script creates PDF output from markdown input
###############@##################################
#Edit the below file to reflect your information
##################################################
source "../StakeholderOutputVariables.env"
####################################################
####################################################
####################################################
#DO NOT CHANGE ANYTHING BELOW THIS LINE
####################################################
####################################################
####################################################
############################################################################################
# Setup key variables that will be used by the create-stakeholder-output-server.sh script
############################################################################################
export MO_PATH="bash ../../vendor/git.knownelement.com/ExternalVendorCode/mo/mo"
export BUILD_TEMP_DIR="$PipelineClientWorkingDir/build-temp"
export BUILD_OUTPUT_DIR="$PipelineClientWorkingDir/build-output"
export BUILDYAML_STAKEHOLDER_OUTPUT="$BUILD_TEMP_DIR/StakeholderOutput.yml"
export StakeholderOutputMarkdownOutputFile="$BUILD_OUTPUT_DIR/StakeholderOutput.md"
export StakeholderOutputPDFOutputFile="$BUILD_OUTPUT_DIR/StakeholderOutput.pdf"
export StakeholderOutputMarkdownInputFile="$1"
echo "Cleaning up from previous runs..."
rm $BUILDYAML_STAKEHOLDER_OUTPUT || true

View File

@@ -12,8 +12,8 @@ fi
echo "Uploading file..."
upload_response=$(curl -s -X POST "$DISCOURSE_URL/uploads.json" \
-H "Content-Type: multipart/form-data" \
-H "Api-Key: $API_KEY" \
-H "Api-Username: $API_USERNAME" \
-H "Api-Key: $DISCOURSE_API_KEY" \
-H "Api-Username: $DISCOURSE_API_USERNAME" \
-F "file=@$FILE_PATH;type=application/pdf" \
-F "type=composer")
@@ -38,13 +38,13 @@ CONTENT="$CONTENT\n\n[Download todays report in PDF format]($short_url)"
echo "Creating new topic..."
post_response=$(curl -s -X POST "$DISCOURSE_URL/posts.json" \
-H "Content-Type: application/json" \
-H "Api-Key: $API_KEY" \
-H "Api-Username: $API_USERNAME" \
-H "Api-Key: $DISCOURSE_API_KEY" \
-H "Api-Username: $DISCOURSE_API_USERNAME" \
-d @- <<EOF
{
"title": "$TITLE",
"title": "$DISCOURSE_POST_TITLE",
"raw": "$CONTENT",
"category": $CATEGORY_ID
"category": $DISCOURSE_CATEGORY_ID
}
EOF
)