Skip to content

Commit

Permalink
Merge pull request #1 from sylvaingirardbe/master
Browse files Browse the repository at this point in the history
Set up CI with Azure Pipelines
  • Loading branch information
ArnoutBorn committed Jun 3, 2022
2 parents 3c00b4d + 03f9cde commit 545e16d
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
name: Default
demands:
- Agent.OS -equals linux

jobs:
- job: SetupGitVersion
displayName: Setup GitVersion
steps:
- task: gitversion/setup@0
displayName: Setup GitVersion
inputs:
versionSpec: '5.x'
- task: gitversion/execute@0
displayName: Execute GitVersion
- task: GitVersion@5
enabled: false
name: GitVersion
inputs:
runtime: 'core'
preferBundledVersion: false
- bash: |
echo "##vso[task.setvariable variable=GITVERSION;isOutput=true;]$(GitVersion.SemVer)"
echo "variable value is $(GitVersion.SemVer)"
name: JobGitVersion
# - job: BuildService
# displayName: Build
# condition: succeeded()
# dependsOn: SetupGitVersion
# variables:
# SemVer: $[ dependencies.SetupGitVersion.outputs['JobGitVersion.GITVERSION'] ]
# steps:
# - task: NuGetAuthenticate@0
# inputs:
# nuGetServiceConnections: 'Nuget Azure'
# forceReinstallCredentialProvider: true
# - task: DotNetCoreCLI@2
# displayName: Restore
# inputs:
# command: 'restore'
# projects: './Sieve/Sieve.csproj'
# feedsToUse: 'select'
# vstsFeed: 'dbaf1f5a-1651-4bc6-976e-a66c70b9fe73/1d924fcf-d598-441e-8542-8ef65d6f2470'
# includeNuGetOrg: false
# - task: DotNetCoreCLI@2
# displayName: Build Sieve
# inputs:
# command: 'build'
# projects: './Sieve/Sieve.csproj'
# arguments: '-o $(Build.ArtifactStagingDirectory)/binaries'
- job: PackAssemblies
displayName: Build and push to nuget
condition: succeeded()
dependsOn:
- SetupGitVersion
variables:
SemVer: $[ dependencies.SetupGitVersion.outputs['JobGitVersion.GITVERSION'] ]
steps:
- script: >
echo $(SemVer)
continueOnError: true
displayName: Display gitversion
- task: NuGetAuthenticate@0
inputs:
nuGetServiceConnections: 'Nuget Azure'
forceReinstallCredentialProvider: true
- task: DotNetCoreCLI@2
displayName: 'dotnet pack sieve'
inputs:
command: pack
packagesToPack: './Sieve/*.csproj'
versioningScheme: byEnvVar
versionEnvVar: 'SemVer'
feedsToUse: 'select'
nuGetFeedType: internal
vstsFeed: 'dbaf1f5a-1651-4bc6-976e-a66c70b9fe73/1d924fcf-d598-441e-8542-8ef65d6f2470'
- task: DotNetCoreCLI@2
displayName: 'dotnet nuget push'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'dbaf1f5a-1651-4bc6-976e-a66c70b9fe73/1d924fcf-d598-441e-8542-8ef65d6f2470'

0 comments on commit 545e16d

Please sign in to comment.