Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
13 changes: 13 additions & 0 deletions scripts/pipelines/azure-devops/pipeline_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ function obtainHangarPath {
hangarPath=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd ../../.. && pwd )
}

function addAdditionalArtifact {
# Check if an extra artifact to store is supplied.
if test ! -z "$artifactPath"
then
# Add the extra step to the YAML.
cat "${hangarPath}/${commonTemplatesPath}/store-extra-path.yml" >> "${localDirectory}/${pipelinePath}/${yamlFile}"
else
echo "The '-a' flag has not been set, skipping the step to add additional artifact."
fi
}

function createPipeline {
echo -e "${green}Generating the pipeline from the YAML template..."
echo -ne ${white}
Expand Down Expand Up @@ -156,6 +167,8 @@ createNewBranch

copyYAMLFile

addAdditionalArtifact

copyCommonScript

type copyScript &> /dev/null && copyScript
Expand Down
Loading