Remove KoreBuild dependent build steps
- remove references to .build directory - dotnet cli is not automatically installed on docker images - install x86 dotnet cli using environment variable
This commit is contained in:
parent
bc8eebf67a
commit
90503c097d
|
|
@ -67,9 +67,6 @@
|
|||
<HostingDebianConfigTemplateFile>$(PackagingDir)hosting_debian_config.json</HostingDebianConfigTemplateFile>
|
||||
<RPMChangelogTemplateFile>$(PackagingDir)changelog</RPMChangelogTemplateFile>
|
||||
<DotnetDebToolDirectory>$(ToolsDir)dotnet-deb-tool-consumer\</DotnetDebToolDirectory>
|
||||
<BuildDirectory>$(RepositoryRoot).build\</BuildDirectory>
|
||||
<BuildTempDirectory>$(BuildDirectory)temp\</BuildTempDirectory>
|
||||
<BuildDotnetDirectory>$(BuildDirectory)dotnet\</BuildDotnetDirectory>
|
||||
<DockerRootDirectory>/opt/code/</DockerRootDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -207,8 +204,6 @@
|
|||
<Delete Files="$(ZipFileName)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="AddDiaSymReaderToPath" Condition="'$(OS)' == 'Windows_NT'" DependsOnTargets="_AddDiaSymReaderFromCurrentSharedFramework;_AddDiaSymReaderFromDownloadedSharedFramework" />
|
||||
|
||||
<Target Name="_ResolveCurrentSharedFrameworkVersion">
|
||||
<!-- Parse framework version -->
|
||||
<Exec Command="powershell.exe $(ScriptsDir)GetSharedFrameworkVersion.ps1" ConsoleToMSBuild="true" Condition="'$(OS)' == 'Windows_NT'">
|
||||
|
|
@ -219,7 +214,7 @@
|
|||
</Exec>
|
||||
</Target>
|
||||
|
||||
<Target Name="_AddDiaSymReaderFromCurrentSharedFramework" DependsOnTargets="_ResolveCurrentSharedFrameworkVersion" Condition="'$(PACKAGE_CACHE_PLATFORM)' == 'x64'">
|
||||
<Target Name="AddDiaSymReaderToPath" Condition="'$(OS)' == 'Windows_NT'" DependsOnTargets="_ResolveCurrentSharedFrameworkVersion">
|
||||
<GetDotNetHost>
|
||||
<Output TaskParameter="DotNetDirectory" PropertyName="DotnetHomeDirectory" />
|
||||
</GetDotNetHost>
|
||||
|
|
@ -233,18 +228,6 @@
|
|||
<SetEnvironmentVariable Variable="PATH" Value="$(PATH);$(DiaSymReaderDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_AddDiaSymReaderFromDownloadedSharedFramework" DependsOnTargets="_ResolveCurrentSharedFrameworkVersion" Condition="'$(PACKAGE_CACHE_PLATFORM)' == 'x86'">
|
||||
<Exec Command="powershell.exe $(ScriptsDir)InstallSharedFrameworkx86.ps1 $(SharedFrameworkVersion) $(BuildTempDirectory)"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<DiaSymReaderDirectory>$(BuildTempDirectory)shared\Microsoft.NETCore.App\$(SharedFrameworkVersion)</DiaSymReaderDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Text="Adding DiaSymReader to PATH by appending: $(DiaSymReaderDirectory)" Importance="high" />
|
||||
|
||||
<SetEnvironmentVariable Variable="PATH" Value="$(PATH);$(DiaSymReaderDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_RemoveTimestampFromDepsFile">
|
||||
<Exec Command="powershell.exe -command "(Get-Content $(DepsFile)).replace('$(TimestampVersion)', '$(NoTimestampVersion)') | Set-Content $(DepsFile)"" Condition="'$(OS)' == 'Windows_NT'"/>
|
||||
<Exec Command="sed -i -e "s/$(TimestampVersion)/$(NoTimestampVersion)/g" $(DepsFile)" Condition="'$(OS)' != 'Windows_NT'"/>
|
||||
|
|
@ -341,9 +324,7 @@
|
|||
|
||||
<Error Text="Docker host must be using Linux containers." Condition="'$(DockerHostOS)' != 'linux'"/>
|
||||
|
||||
<!-- Download runtime store archives -->
|
||||
<Message Text="Local runtime store signed artifacts not specified via RUNTIMESTORE_SIGNED_ARTIFACTS_PATH, falling back to artifacts availabe on myget." Importance="high" Condition="'$(RUNTIMESTORE_SIGNED_ARTIFACTS_PATH)' == ''"/>
|
||||
<MSBuild Projects="$(RestoreRuntimeStoreDirectory)\RestoreRuntimeStore.csproj" Targets="Restore" Properties="RestorePackagesPath=$(RuntimeStoreArchiveDirectory)" Condition="'$(RUNTIMESTORE_SIGNED_ARTIFACTS_PATH)' == ''"/>
|
||||
<Error Text="RUNTIMESTORE_SIGNED_ARTIFACTS_PATH is not specified. The path containing the linux archives files must be must not be empty." Condition="'$(RUNTIMESTORE_SIGNED_ARTIFACTS_PATH)' == ''" />
|
||||
|
||||
<ItemGroup>
|
||||
<RuntimeStoreTimestampArchive Include="$(RUNTIMESTORE_SIGNED_ARTIFACTS_PATH)**\Build.RS.linux-*.tar.gz"/>
|
||||
|
|
@ -748,11 +729,6 @@
|
|||
OverwriteReadOnlyFiles="true"
|
||||
SkipUnchangedFiles="false" />
|
||||
|
||||
<!-- Parse CLI version -->
|
||||
<ReadLinesFromFile File="$(BuildDirectory)cli.version">
|
||||
<Output TaskParameter="Lines" PropertyName="CLIVersionNumber" />
|
||||
</ReadLinesFromFile>
|
||||
|
||||
<!-- Run installer tests -->
|
||||
<Exec Command="docker run
|
||||
--rm
|
||||
|
|
@ -876,30 +852,18 @@
|
|||
Command="docker build --build-arg USER_ID=%24(id -u) -t docker-image-$(InstallerPlatform) $(InstallerPlatform)"
|
||||
WorkingDirectory="$(DockerDir)" />
|
||||
|
||||
<!-- Parse CLI version -->
|
||||
<ReadLinesFromFile File="$(BuildDirectory)cli.version">
|
||||
<Output TaskParameter="Lines" PropertyName="CLIVersionNumber" />
|
||||
</ReadLinesFromFile>
|
||||
|
||||
<!-- Build Runtime Store and Hosting Bundle Deb package -->
|
||||
<Exec Command="docker run
|
||||
--rm
|
||||
-v $(RepositoryRoot):$(DockerRootDirectory)
|
||||
-e DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
||||
-e KOREBUILD_SKIP_RUNTIME_INSTALL=true
|
||||
-e BuildNumber=$(BuildNumber)
|
||||
-e RUNTIMESTORE_TIMESTAMP_INSTALLERNAME=$(RuntimeStoreTimestampInstallerPackageName)
|
||||
-e RUNTIMESTORE_NOTIMESTAMP_INSTALLERNAME=$(RuntimeStoreNoTimestampInstallerPackageName)
|
||||
-e HOSTINGBUNDLE_TIMESTAMP_INSTALLERNAME=$(HostingBundleTimestampInstallerPackageName)
|
||||
-e HOSTINGBUNDLE_NOTIMESTAMP_INSTALLERNAME=$(HostingBundleNoTimestampInstallerPackageName)
|
||||
docker-image-$(InstallerPlatform)
|
||||
/bin/bash -c "
|
||||
$(DockerRootDirectory).build/dotnet/dotnet-install.sh
|
||||
--channel preview
|
||||
--version $(CLIVersionNumber) &&
|
||||
export PATH=$PATH:/home/code_executor/.dotnet &&
|
||||
./build.sh /t:RunDebTool
|
||||
""
|
||||
./build.sh /t:RunDebTool"
|
||||
ContinueOnError="WarnAndContinue" />
|
||||
|
||||
<!-- Copy Runtime Store and Hosting Bundle packages to output -->
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
param (
|
||||
[string]$sharedRuntimeVersion,
|
||||
[string]$installationDirectory
|
||||
)
|
||||
|
||||
$sharedRuntimeChannel = "master"
|
||||
if ($env:KOREBUILD_DOTNET_SHARED_RUNTIME_CHANNEL)
|
||||
{
|
||||
$sharedRuntimeChannel = $env:KOREBUILD_DOTNET_SHARED_RUNTIME_CHANNEL
|
||||
}
|
||||
|
||||
function InstallSharedRuntime([string] $version, [string] $channel, [string] $installDir)
|
||||
{
|
||||
$sharedRuntimePath = [IO.Path]::Combine($installDir, 'shared', 'Microsoft.NETCore.App', $version)
|
||||
# Avoid redownloading the CLI if it's already installed.
|
||||
if (!(Test-Path $sharedRuntimePath))
|
||||
{
|
||||
& "$PSScriptRoot\..\.build\dotnet\dotnet-install.ps1" `
|
||||
-Channel $channel `
|
||||
-SharedRuntime `
|
||||
-Version $version `
|
||||
-Architecture 'x86' `
|
||||
-InstallDir $installDir `
|
||||
-NoPath
|
||||
}
|
||||
}
|
||||
|
||||
InstallSharedRuntime -version $sharedRuntimeVersion -channel $sharedRuntimeChannel -installDir $installationDirectory
|
||||
Loading…
Reference in New Issue