-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed deploy step in CI * Update pipeline * Reordered stages
- Loading branch information
Showing
9 changed files
with
263 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
jobs: | ||
- job: coverage_report_quality | ||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
steps: | ||
# checkout is needed for file-references | ||
#- checkout: none | ||
|
||
- task: DownloadPipelineArtifact@2 | ||
inputs: | ||
targetPath: './coverage' | ||
|
||
- task: PublishCodeCoverageResults@1 | ||
inputs: | ||
codeCoverageTool: Cobertura | ||
summaryFileLocation: 'coverage/**/Cobertura.xml' | ||
pathToSources: $(System.DefaultWorkingDirectory) | ||
|
||
# extension from Marketplace https://marketplace.visualstudio.com/acquisition?itemName=mspremier.BuildQualityChecks | ||
- task: BuildQualityChecks@6 | ||
displayName: 'Check build quality' | ||
inputs: | ||
checkCoverage: true | ||
coverageFailOption: 'build' | ||
coverageType: 'lines' | ||
allowCoverageVariance: true | ||
coverageVariance: '0.5' | ||
baseBranchRef: 'master' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,66 @@ | ||
jobs: | ||
- job: deploy_nuget | ||
pool: | ||
vmImage: 'windows-2019' | ||
vmImage: 'ubuntu-18.04' | ||
steps: | ||
- task: DownloadBuildArtifacts@0 | ||
- checkout: none | ||
|
||
- task: DownloadPipelineArtifact@2 | ||
inputs: | ||
buildType: current | ||
artifactName: 'NuGet-Packed' | ||
downloadPath: . | ||
targetPath: './' | ||
|
||
# Hack for file not found when using ./build.sh deploy | ||
# With ls -la the files are listed, but can't be found anyway. | ||
# I tried quite a lot, relative and absolute path, nothing worked. | ||
# This hack does the job. | ||
- bash: | | ||
chmod u+x ./build.sh | ||
echo "-------------------------------------------------" | ||
echo "Nuget-Packed:" | ||
ls -la "NuGet-Packed" | ||
echo "NuGet-Packed:" | ||
ls -la . | ||
if [[ "$TAG_NAME" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)(-(preview-[0-9]+))$ ]]; then | ||
mkdir deploy_myget | ||
for package in NuGet-Packed/*.nupkg; do | ||
mv $package deploy_myget | ||
done | ||
mkdir deploy_custom | ||
for package in ./*.nupkg; do | ||
mv $package deploy_custom | ||
done | ||
echo "##vso[task.setvariable variable=deploy_custom;]1" | ||
elif [[ "$TAG_NAME" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then | ||
mkdir deploy_nuget | ||
mkdir deploy_nuget | ||
for package in ./*.nupkg; do | ||
mv $package deploy_nuget | ||
done | ||
for package in NuGet-Packed/*.nupkg; do | ||
mv $package deploy_nuget | ||
done | ||
echo "##vso[task.setvariable variable=deploy_nuget;]1" | ||
else | ||
echo "no deploy, as $TAG_NAME does not match" | ||
echo ##vso[task.complete result=Skipped;]tag does not match for deploy | ||
echo "no deploy, as $TAG_NAME does not match" | ||
echo ##vso[task.complete result=Skipped;]tag does not match for deploy | ||
fi | ||
echo "-------------------------------------------------" | ||
echo "myget:" | ||
ls -la deploy_myget | ||
echo "custom:" | ||
ls -la deploy_custom | ||
echo "-------------------------------------------------" | ||
echo "nuget:" | ||
ls -la deploy_nuget | ||
echo "-------------------------------------------------" | ||
displayName: 'deploy to myget / nuget' | ||
displayName: 'deploy to nuget / custom' | ||
- task: NuGetAuthenticate@0 | ||
condition: eq(variables['deploy_custom'], '1') | ||
|
||
- task: NuGetCommand@2 | ||
condition: eq(variables['deploy_custom'], '1') | ||
inputs: | ||
command: push | ||
packagesToPush: deploy_myget/*.nupkg | ||
nuGetFeedType: external | ||
publishFeedCredentials: 'myget - gfoidl' | ||
displayName: deploy_myget | ||
packagesToPush: deploy_custom/*.nupkg | ||
nuGetFeedType: 'internal' | ||
publishVstsFeed: 'github-Projects/gfoidl-public' | ||
displayName: deploy to custom feed | ||
|
||
- task: NuGetCommand@2 | ||
condition: eq(variables['deploy_nuget'], '1') | ||
inputs: | ||
command: push | ||
packagesToPush: deploy_nuget/*.nupkg | ||
nuGetFeedType: external | ||
publishFeedCredentials: 'nuget - gfoidl' | ||
displayName: deploy_nuget | ||
displayName: deploy to nuget |
Oops, something went wrong.