Skip to content

Commit

Permalink
feat: dockerfile for CI, azure pipeline definition, signing only on r…
Browse files Browse the repository at this point in the history
…elease
  • Loading branch information
DenisBiondic committed Nov 16, 2018
1 parent e61506d commit 3cf735e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.dockerignore
.env
.git
.gitignore
.vs
.vscode
docker-compose.yml
docker-compose.*.yml
*/bin
*/Dockerfile
*/obj
14 changes: 14 additions & 0 deletions Dockerfile-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM microsoft/dotnet:2.1-sdk
WORKDIR /src

COPY FluentTimeSpan/FluentTimeSpan.sln ./
COPY FluentTimeSpan/FluentTimeSpan/*.csproj ./FluentTimeSpan/
COPY FluentTimeSpan/FluentTimeSpan.Test/*.csproj ./FluentTimeSpan.Test/

RUN dotnet restore

COPY . .
WORKDIR /src/FluentTimeSpan/FluentTimeSpan.Test

RUN dotnet build
RUN dotnet test
13 changes: 10 additions & 3 deletions FluentTimeSpan/FluentTimeSpan/FluentTimeSpan.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@
- Moved to .NET Core
- pure TimeSpan and number extensions
- new TimeSpan TimeValue Week</PackageReleaseNotes>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>FluentTimeSpan.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>

<Choose>
<When Condition=" '$(Configuration)'=='Release' ">
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>FluentTimeSpan.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
</When>
</Choose>

</Project>
14 changes: 14 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Docker image
# Build a Docker image to deploy, run, or push to a container registry.
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

pool:
vmImage: 'Ubuntu 16.04'

variables:
imageName: 'fluent-time-span-ci-image:$(build.buildId)'

steps:
- script: docker build -f Dockerfile-ci -t $(imageName) .
displayName: 'docker build'

0 comments on commit 3cf735e

Please sign in to comment.