Skip to content

Commit

Permalink
Replaces Cake with AZ-Pipeline using YAML and moves projects (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwertheim authored Jan 6, 2020
1 parent e0b19b9 commit 3c17f12
Show file tree
Hide file tree
Showing 108 changed files with 209 additions and 450 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
end_of_line = crlf
insert_final_newline = true
indent_style = space

[*.props, *.csproj, *.yml, *.json]
indent_size = 2

[*.cs]
indent_size = 4
20 changes: 5 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# node
node_modules/

# vs
.vs/
[Aa]pp_[Dd]ata/
[Bb]in/
[D]ebug/
[Aa]rtifacts/
Expand All @@ -15,12 +11,6 @@ node_modules/
*.vssscc
*.suo
*.cache
project.lock.json

# deploy
build/
tools/**
!tools/packages.config

# misc
*~
Expand All @@ -29,11 +19,11 @@ tools/**
*.orig
*.pfx

# nuget
[Pp]ackages/
# rider
.idea

# approvals#
*.received.txt
# vs-code
.vscode

# resharper
_ReSharper.*
Expand All @@ -42,4 +32,4 @@ _ReSharper.*
*.DotSettings.user

#windows stuff
Thumbs.db
Thumbs.db
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Structurizer
[![NuGet](https://img.shields.io/nuget/v/structurizer.svg?cacheSeconds=3600)](https://www.nuget.org/packages/structurizer)
[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)
[![Build Status](https://dev.azure.com/danielwertheim/structurizer/_apis/build/status/danielwertheim.structurizer-CI?branchName=master)](https://dev.azure.com/danielwertheim/structurizer/_build/latest?definitionId=31&branchName=master)

Structurizer is extracted from one of my other projects [PineCone](https://github.com/danielwertheim/pinecone), which was used for much of the underlying indexing stuff for another project of mine, SisoDB. Structurizer is reduced to only manage a key-value representation of an object-graph.

## Release notes
Expand Down
3 changes: 3 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#Release notes

## v4.0.1
From this version release notes are kept in [each release](https://github.com/danielwertheim/structurizer/releases) on GitHub.

## v4.0.0 - 2018-11-16
- *New*: .NET Standard 2.0 instead of .NET Standard 1.3. Also supports .NET4.5.1 for a while more.
- *Changed*: Support for anonymous types passed as object.
Expand Down
20 changes: 20 additions & 0 deletions azure-pipelines-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: $(SemVer)

variables:
SemVer: $[ variables['Build.SourceBranchName'] ]
CommitId: $(Build.SourceVersion)

trigger:
batch: true
branches:
include:
- refs/tags/*

pr: none

pool:
vmImage: windows-2019

stages:
- template: azure-templates/stage-build.yml
- template: azure-templates/stage-deploy.yml
24 changes: 24 additions & 0 deletions azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: $(SemVer)

variables:
BuildRev: $[counter(format('{0:yyyyMMdd}', pipeline.startTime), 1)]
SemVer: $[format('{0:yyyy}.{0:MM}.{0:dd}-pre{1}', pipeline.startTime, variables.BuildRev)]
CommitId: $(Build.SourceVersion)

trigger:
batch: true
branches:
include:
- master

pr:
autoCancel: true
branches:
include:
- master

pool:
vmImage: windows-2019

stages:
- template: azure-templates/stage-build.yml
42 changes: 42 additions & 0 deletions azure-templates/stage-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
stages:
- stage: Build
jobs:
- job: BuildTestPack
displayName: 'Build, test & pack'
timeoutInMinutes: 5
cancelTimeoutInMinutes: 2
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core 3.1.x'
inputs:
version: '3.1.x'
packageType: sdk

- task: DotNetCoreCLI@2
displayName: 'Build Solution'
inputs:
command: build
projects: 'src/*.sln'
arguments: '-c $(BuildConfiguration) --no-incremental --nologo -p:TreatWarningsAsErrors=true -p:Version=$(SemVer) -p:InformationalVersion=$(CommitId)'

- task: DotNetCoreCLI@2
displayName: 'UnitTests'
inputs:
command: test
projects: 'src/**/UnitTests.csproj'
arguments: '-c $(BuildConfiguration) --no-build'
testRunTitle: 'UnitTests'

- task: DotNetCoreCLI@2
displayName: 'Pack Nupkg'
inputs:
command: custom
custom: pack
projects: 'src/*.sln'
arguments: '-c $(BuildConfiguration) --no-build -o $(Build.ArtifactStagingDirectory) -p:Version=$(SemVer) -p:InformationalVersion=$(CommitId)'

- task: PublishPipelineArtifact@1
displayName: 'Publish Artifacts'
inputs:
path: '$(Build.ArtifactStagingDirectory)'
artifact: Artifacts
23 changes: 23 additions & 0 deletions azure-templates/stage-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
stages:
- stage: Deploy
condition: and (succeeded(), startsWith( variables['Build.SourceBranch'], 'refs/tags' ))
dependsOn: Build
jobs:
- deployment: DeployArtifacts
environment: 'Prod'
displayName: 'Deploys artifacts'
timeoutInMinutes: 4
cancelTimeoutInMinutes: 2
strategy:
runOnce:
deploy:
steps:
- checkout: none
- task: NuGetCommand@2
displayName: 'Push Nupkg to NuGet'
inputs:
command: push
nugetFeedType: external
publishFeedCredentials: nuget_push_new_versions
verbosityPush: Normal
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;!$(Pipeline.Workspace)/**/*.symbols.nupkg'
85 changes: 0 additions & 85 deletions build.cake

This file was deleted.

Loading

0 comments on commit 3c17f12

Please sign in to comment.