-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from tintoy/develop
Add DI registration methods for named KubeClientOptions from pod service account
- Loading branch information
Showing
6 changed files
with
260 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
trigger: | ||
branches: | ||
include: | ||
- master | ||
- develop | ||
- release/* | ||
|
||
tags: | ||
include: | ||
- 'v*' | ||
|
||
pr: | ||
branches: | ||
include: | ||
- master | ||
|
||
pool: | ||
vmImage: ubuntu-latest | ||
|
||
variables: | ||
buildConfiguration: 'Release' | ||
|
||
steps: | ||
- task: gitversion/setup@0 | ||
displayName: 'Install GitVersion' | ||
|
||
inputs: | ||
versionSpec: 5.x | ||
|
||
- task: GitVersion/execute@0 | ||
displayName: 'Determine build version' | ||
name: GitVersion | ||
|
||
- script: | | ||
BUILD_SEMVER="$(GitVersion.FullSemVer)" | ||
echo "##vso[task.setvariable variable=BUILD_SEMVER]$BUILD_SEMVER" | ||
echo "BUILD_SEMVER='$BUILD_SEMVER'" | ||
displayName: Set environment variables from build version | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Restore packages' | ||
|
||
inputs: | ||
command: 'restore' | ||
projects: '$(Build.SourcesDirectory)/KubeClient.sln' | ||
restoreArguments: '/p:VersionPrefix="$(GitVersion.MajorMinorPatch)" /p:VersionSuffix="$(GitVersion.PreReleaseTag)"' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Build solution' | ||
|
||
inputs: | ||
command: 'build' | ||
projects: '$(Build.SourcesDirectory)/KubeClient.sln' | ||
arguments: '--configuration "$(buildConfiguration)" /p:VersionPrefix="$(GitVersion.MajorMinorPatch)" /p:VersionSuffix="$(GitVersion.PreReleaseTag)"' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run tests' | ||
|
||
inputs: | ||
command: 'test' | ||
projects: '$(Build.SourcesDirectory)/test/KubeClient.*.Tests/*.csproj' | ||
arguments: '--configuration "$(buildConfiguration)" /p:VersionPrefix="$(GitVersion.MajorMinorPatch)" /p:VersionSuffix="$(GitVersion.PreReleaseTag)"' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Create packages' | ||
|
||
inputs: | ||
command: 'pack' | ||
projects: '$(Build.SourcesDirectory)/KubeClient.sln' | ||
|
||
arguments: '--configuration "$(buildConfiguration)"' | ||
outputDir: '$(Build.ArtifactStagingDirectory)/packages' | ||
versioningScheme: byEnvVar | ||
versionEnvVar: BUILD_SEMVER | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish packages as artifact' | ||
|
||
inputs: | ||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/packages' | ||
ArtifactName: 'packages' | ||
publishLocation: 'Container' | ||
|
||
- task: GitHubRelease@1 | ||
displayName: 'Create GitHub release from tag' | ||
|
||
condition: contains(variables['Build.SourceBranch'], 'refs/tags/v') | ||
|
||
inputs: | ||
gitHubConnection: 'tintoy' | ||
repositoryName: '$(Build.Repository.Name)' | ||
action: 'create' | ||
target: '$(Build.SourceVersion)' | ||
tagSource: 'gitTag' | ||
tagPattern: '^v\d+\.\d+.\d+(-[A-Za-z0-9%\.]+)?$' | ||
addChangeLog: true | ||
assets: '$(Build.ArtifactStagingDirectory)/packages/*.nupkg' | ||
assetUploadMode: replace |
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