Skip to content

Commit

Permalink
[Build and Release] Deployment Pipeline to the Demo Website (#545)
Browse files Browse the repository at this point in the history
* Add Build-Demo YAML file

* Try to use the template

* Test

* Step under extends

* Using buildSteps

* Correct align

* Fix align2

* Add a parameter in the Template

* Add Variable Group

* Update variable group name

* Use the Group Variable `Versioning`

* Update projects attribute

* Set project hardcoded

* Set publishWebProjects: false

* Fix Task comment

* Add Build and Publish

* Remove the Source folder

* Remove the "source" ItemGroup in csproj

---------

Co-authored-by: Vincent Baaij <[email protected]>
  • Loading branch information
dvoituron and vnbaaij authored Jul 17, 2023
1 parent 91193c7 commit 3fa92f0
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 8 deletions.
78 changes: 78 additions & 0 deletions .azure-devops/build-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Build and test projects.

pr: none # Disable pull request triggers.
trigger: none # Disable push triggers.

# Build.BuildNumber
name: $(VersionMajor).$(Year:yy)$(DayOfYear).$(Rev:r)

pool:
vmImage: 'windows-2022'

variables:
- group: Versioning # These variables are in Azure DevOps / Pipelines / Library

- name: Projects
value: |
**/FluentUI.Demo.Client.csproj
steps:
- task: NuGetToolInstaller@1
displayName: Install NuGet tools

- task: UseDotNet@2
displayName: 'Install .NET 8.0'
inputs:
version: 8.0.x
includePreviewVersions: true

# Set version number
- task: Assembly-Info-NetCore@3
displayName: 'Versioning $(Build.BuildNumber)'
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: '**/*.csproj'
InsertAttributes: true
FileEncoding: 'auto'
WriteBOM: false
VersionNumber: '$(Build.BuildNumber)'
FileVersionNumber: '$(Build.BuildNumber)'
InformationalVersion: '$(Build.BuildNumber)'
PackageVersion: '$(Build.BuildNumber)'
LogLevel: 'verbose'
FailOnWarning: false
DisableTelemetry: false

# Install dependencies
- task: DotNetCoreCLI@2
displayName: Install dependencies
inputs:
command: 'restore'
projects: $(Projects)

# Build the projects
- task: DotNetCoreCLI@2
displayName: 'Build $(Build.BuildNumber)'
inputs:
command: 'build'
publishWebProjects: false # True to build all Web Projects
projects: $(Projects)
arguments: '--configuration Release --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: false
workingDirectory: '$(Build.SourcesDirectory)'

# Publish the projects
- task: DotNetCoreCLI@2
displayName: 'Publish $(Build.BuildNumber)'
inputs:
command: 'publish'
publishWebProjects: false # True to build all Web Projects
projects: $(Projects)
arguments: '--configuration Release --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: false
workingDirectory: '$(Build.SourcesDirectory)'

# Publish the Artifacts
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
3 changes: 1 addition & 2 deletions .azure-devops/common/template-to-build-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ parameters:
default: false

variables:
VersionMajor: '3.0' # Major version of the projects - Ex. 3.1.23280.4
VersionPreview: '6' # Preview number of the projects - Ex. 3.1.0-preview.5.23280.4
- group: Versioning # These variables are in Azure DevOps / Pipelines / Library

steps:

Expand Down
3 changes: 1 addition & 2 deletions .azure-devops/test-sign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ parameters:
**/Microsoft.Fast.Components.FluentUI.Emojis.csproj
variables:
VersionMajor: '3.0' # Major version of the projects - Ex. 3.1.23280.4
VersionPreview: '5' # Preview number of the projects - Ex. 3.1.0-preview.5.23280.4
- group: Versioning # These variables are in Azure DevOps / Pipelines / Library

steps:

Expand Down
4 changes: 0 additions & 4 deletions examples/Demo/Shared/FluentUI.Demo.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@
<AdditionalFiles Include="$(ProjectDir)/*.xml" />
</ItemGroup>

<ItemGroup>
<None Include="wwwroot\sources\**" />
</ItemGroup>

<Target Name="CopySources" BeforeTargets="BeforeBuild">
<ItemGroup>
<Sources Include="$(ProjectDir)\Pages\**\Examples\*" />
Expand Down

0 comments on commit 3fa92f0

Please sign in to comment.