Skip to content

Commit c7d9304

Browse files
authored
Onboard to Arcade (#1868)
1 parent 9fd871d commit c7d9304

190 files changed

Lines changed: 13654 additions & 28 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ dotnet_code_quality.ca2208.api_surface = public
159159

160160
# License header
161161
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.
162+
dotnet_diagnostic.IDE0073.severity = warning # IDE0073: The file header is missing or not located at the top of the file
162163

163164
# Xml project files
164165
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj,slnx}]

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
[Bb]in/
33
[Oo]bj/
44
[Oo]ut/
5+
[Dd]ebug/
6+
[Rr]elease/
7+
artifacts/
8+
artifacts_stage_1/
9+
x64/ !eng/common/cross/x64/
10+
x86/ !eng/common/cross/x86/
11+
msbuild.log
12+
msbuild.err
13+
msbuild.wrn
14+
*.binlog
515

616
# Visual Studio Code cache/options directory
717
.vscode/
@@ -14,8 +24,10 @@
1424
# ImageBuilder directory
1525
.Microsoft.DotNet.ImageBuilder
1626

17-
# dotnet install directory
27+
# .NET and tools directories
1828
.dotnet/
29+
.packages/
30+
.tools/
1931

2032
# Test files
2133
*.trx

Directory.Build.props

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Project>
2+
3+
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4+
5+
<PropertyGroup Label="Build Settings">
6+
<LangVersion>latest</LangVersion>
7+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8+
</PropertyGroup>
9+
10+
<PropertyGroup Label="Packaging Settings">
11+
<Copyright>$(CopyrightNetFoundation)</Copyright>
12+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
13+
<PackageProjectUrl>https://github.com/dotnet/docker-tools</PackageProjectUrl>
14+
<RepositoryUrl>https://github.com/dotnet/docker-tools</RepositoryUrl>
15+
<DebugType>embedded</DebugType>
16+
<DebugSymbols>true</DebugSymbols>
17+
</PropertyGroup>
18+
19+
</Project>

Directory.Build.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
3+
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4+
5+
<PropertyGroup>
6+
<RestoreEnablePackagePruning>true</RestoreEnablePackagePruning>
7+
</PropertyGroup>
8+
9+
</Project>

LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
MIT License
1+
The MIT License (MIT)
22

33
Copyright (c) 2017 .NET Foundation
44

5+
All rights reserved.
6+
57
Permission is hereby granted, free of charge, to any person obtaining a copy
68
of this software and associated documentation files (the "Software"), to deal
79
in the Software without restriction, including without limitation the rights

Microsoft.DotNet.DockerTools.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
<Project Path="eng/src/file-pusher/file-pusher.csproj" />
88
<Project Path="eng/src/yaml-updater/yaml-updater.csproj" />
99
<Project Path="src/ImageBuilder/Microsoft.DotNet.ImageBuilder.csproj" />
10+
<Project Path="src/ImageBuilder.Models/Microsoft.DotNet.ImageBuilder.Models.csproj" />
1011
<Project Path="src/ImageBuilder.Tests/Microsoft.DotNet.ImageBuilder.Tests.csproj" />
1112
</Solution>

NuGet.config

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
<configuration>
33
<packageSources>
44
<clear />
5-
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
65
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
6+
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
7+
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
8+
<add key="dotnet-8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
9+
<add key="dotnet-9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
10+
<add key="dotnet-10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
711
</packageSources>
812
</configuration>

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,13 @@
22

33
This is a repo to house some common tools for use in the various .NET Docker repos.
44

5-
## Image Builder
5+
## Tools
66

7-
A tool used to build and publish Docker images.
7+
- [ImageBuilder](./src/README.md) is a tool used to build and publish Docker images.
88

9-
The Image Builder tool can be acquired via a Docker image available at [mcr.microsoft.com/dotnet-buildtools/image-builder](https://mcr.microsoft.com/v2/dotnet-buildtools/image-builder/tags/list) or built from source via the instructions in its [readme](./src/README.md).
9+
## Building locally
1010

11-
The Image Builder tool relies on metadata which defines various information needed to build and tag Docker images. The metadata is stored in a manifest.json file ([sample](https://github.com/dotnet/dotnet-docker/blob/main/manifest.json)). The metadata schema is defined in [source](./src/ImageBuilder/Models/Manifest/Manifest.cs).
11+
To build, test, and pack all projects in the repo, run one of the following scripts:
1212

13-
The full list of supported commands can be seen by running the tool.
14-
15-
```console
16-
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock mcr.microsoft.com/dotnet-buildtools/image-builder --help
17-
```
18-
19-
The list of supported options for each command can be seen by specifying the `--help` option:
20-
21-
```console
22-
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock mcr.microsoft.com/dotnet-buildtools/image-builder build --help
23-
```
13+
- **Windows**: `build.cmd`
14+
- **Linux/Mac**: `./build.sh`

build.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -build -restore -test -pack %*"
3+
exit /b %ErrorLevel%

build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
source="${BASH_SOURCE[0]}"
4+
5+
# resolve $SOURCE until the file is no longer a symlink
6+
while [[ -h $source ]]; do
7+
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
8+
source="$(readlink "$source")"
9+
10+
# if $source was a relative symlink, we need to resolve it relative to the path where the
11+
# symlink file was located
12+
[[ $source != /* ]] && source="$scriptroot/$source"
13+
done
14+
15+
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
16+
"$scriptroot/eng/common/build.sh" --restore --build --test --pack $@

0 commit comments

Comments
 (0)