Skip to content
Open
Show file tree
Hide file tree
Changes from 10 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
6 changes: 5 additions & 1 deletion documentation/azure-devops/setup-build-pipeline.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,8 @@ NOTE: The config file for the build pipeline is located at `/scripts/pipelines/a
==== Angular project
```
./pipeline_generator.sh -c ./templates/build/build-pipeline.cfg -n angular-project-build -l angular -d C:/Users/$USERNAME/Desktop/angular-project -b develop -w
```
```
==== .Net project
```
./pipeline_generator.sh -c ./templates/build/build-pipeline.cfg -n dotnet-project-build -l dotnet -d C:/Users/$USERNAME/Desktop/dotnet-project -b develop -w
```
1 change: 0 additions & 1 deletion scripts/pipelines/azure-devops/pipeline_generator.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
set -e

FLAGS=$(getopt -a --options c:n:d:a:b:l:t:i:u:p:hw --long "config-file:,pipeline-name:,local-directory:,artifact-path:,target-branch:,language:,target-directory:,build-pipeline-name:,sonar-url:,sonar-token:,image-name:,registry-user:,registry-password:,resource-group:,storage-account:,storage-container:,cluster-name:,s3-bucket:,s3-key-path:,quality-pipeline-name:,dockerfile:,test-pipeline-name:,aws-access-key:,aws-secret-access-key:,aws-region:,help" -- "$@")

eval set -- "$FLAGS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ function addPipelineVariables {
then
case $language in
node | angular) targetDirectory="." ;;
quarkus*) targetDirectory="./target/" ;;
quarkus*) targetDirectory="./target/" ;;
dotnet) targetDirectory="./build/" ;;
*) echo -e "${red}Error: Specified language '${language}' is not supported." >&2; exit 1
esac
fi

az pipelines variable create --name "targetPath" --pipeline-name "${pipelineName}" --value "${targetDirectory}"
az pipelines variable create --name "buildTargetPath" --pipeline-name "${pipelineName}" --value "${targetDirectory}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ steps:
displayName: "Copying build artifact to the ArtifactStagingDirectory"
inputs:
targetType: inline
script: 'cp -a $(Build.Repository.LocalPath)/$(targetPath) $(Build.ArtifactStagingDirectory)'
script: 'cp -a $(Build.Repository.LocalPath)/$(buildTargetPath) $(Build.ArtifactStagingDirectory)'

- publish: $(Build.ArtifactStagingDirectory)
displayName: "Publish Artifact"
artifact: BuildOutput
artifact: BuildOutput
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
dotnet build -c Release -o $BUILDTARGETPATH
Comment thread
patricpoba marked this conversation as resolved.
Outdated