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>
|
<HostingDebianConfigTemplateFile>$(PackagingDir)hosting_debian_config.json</HostingDebianConfigTemplateFile>
|
||||||
<RPMChangelogTemplateFile>$(PackagingDir)changelog</RPMChangelogTemplateFile>
|
<RPMChangelogTemplateFile>$(PackagingDir)changelog</RPMChangelogTemplateFile>
|
||||||
<DotnetDebToolDirectory>$(ToolsDir)dotnet-deb-tool-consumer\</DotnetDebToolDirectory>
|
<DotnetDebToolDirectory>$(ToolsDir)dotnet-deb-tool-consumer\</DotnetDebToolDirectory>
|
||||||
<BuildDirectory>$(RepositoryRoot).build\</BuildDirectory>
|
|
||||||
<BuildTempDirectory>$(BuildDirectory)temp\</BuildTempDirectory>
|
|
||||||
<BuildDotnetDirectory>$(BuildDirectory)dotnet\</BuildDotnetDirectory>
|
|
||||||
<DockerRootDirectory>/opt/code/</DockerRootDirectory>
|
<DockerRootDirectory>/opt/code/</DockerRootDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
@ -207,8 +204,6 @@
|
||||||
<Delete Files="$(ZipFileName)" />
|
<Delete Files="$(ZipFileName)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="AddDiaSymReaderToPath" Condition="'$(OS)' == 'Windows_NT'" DependsOnTargets="_AddDiaSymReaderFromCurrentSharedFramework;_AddDiaSymReaderFromDownloadedSharedFramework" />
|
|
||||||
|
|
||||||
<Target Name="_ResolveCurrentSharedFrameworkVersion">
|
<Target Name="_ResolveCurrentSharedFrameworkVersion">
|
||||||
<!-- Parse framework version -->
|
<!-- Parse framework version -->
|
||||||
<Exec Command="powershell.exe $(ScriptsDir)GetSharedFrameworkVersion.ps1" ConsoleToMSBuild="true" Condition="'$(OS)' == 'Windows_NT'">
|
<Exec Command="powershell.exe $(ScriptsDir)GetSharedFrameworkVersion.ps1" ConsoleToMSBuild="true" Condition="'$(OS)' == 'Windows_NT'">
|
||||||
|
|
@ -219,7 +214,7 @@
|
||||||
</Exec>
|
</Exec>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_AddDiaSymReaderFromCurrentSharedFramework" DependsOnTargets="_ResolveCurrentSharedFrameworkVersion" Condition="'$(PACKAGE_CACHE_PLATFORM)' == 'x64'">
|
<Target Name="AddDiaSymReaderToPath" Condition="'$(OS)' == 'Windows_NT'" DependsOnTargets="_ResolveCurrentSharedFrameworkVersion">
|
||||||
<GetDotNetHost>
|
<GetDotNetHost>
|
||||||
<Output TaskParameter="DotNetDirectory" PropertyName="DotnetHomeDirectory" />
|
<Output TaskParameter="DotNetDirectory" PropertyName="DotnetHomeDirectory" />
|
||||||
</GetDotNetHost>
|
</GetDotNetHost>
|
||||||
|
|
@ -233,18 +228,6 @@
|
||||||
<SetEnvironmentVariable Variable="PATH" Value="$(PATH);$(DiaSymReaderDirectory)" />
|
<SetEnvironmentVariable Variable="PATH" Value="$(PATH);$(DiaSymReaderDirectory)" />
|
||||||
</Target>
|
</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">
|
<Target Name="_RemoveTimestampFromDepsFile">
|
||||||
<Exec Command="powershell.exe -command "(Get-Content $(DepsFile)).replace('$(TimestampVersion)', '$(NoTimestampVersion)') | Set-Content $(DepsFile)"" Condition="'$(OS)' == 'Windows_NT'"/>
|
<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'"/>
|
<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'"/>
|
<Error Text="Docker host must be using Linux containers." Condition="'$(DockerHostOS)' != 'linux'"/>
|
||||||
|
|
||||||
<!-- Download runtime store archives -->
|
<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)' == ''" />
|
||||||
<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)' == ''"/>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<RuntimeStoreTimestampArchive Include="$(RUNTIMESTORE_SIGNED_ARTIFACTS_PATH)**\Build.RS.linux-*.tar.gz"/>
|
<RuntimeStoreTimestampArchive Include="$(RUNTIMESTORE_SIGNED_ARTIFACTS_PATH)**\Build.RS.linux-*.tar.gz"/>
|
||||||
|
|
@ -748,11 +729,6 @@
|
||||||
OverwriteReadOnlyFiles="true"
|
OverwriteReadOnlyFiles="true"
|
||||||
SkipUnchangedFiles="false" />
|
SkipUnchangedFiles="false" />
|
||||||
|
|
||||||
<!-- Parse CLI version -->
|
|
||||||
<ReadLinesFromFile File="$(BuildDirectory)cli.version">
|
|
||||||
<Output TaskParameter="Lines" PropertyName="CLIVersionNumber" />
|
|
||||||
</ReadLinesFromFile>
|
|
||||||
|
|
||||||
<!-- Run installer tests -->
|
<!-- Run installer tests -->
|
||||||
<Exec Command="docker run
|
<Exec Command="docker run
|
||||||
--rm
|
--rm
|
||||||
|
|
@ -876,30 +852,18 @@
|
||||||
Command="docker build --build-arg USER_ID=%24(id -u) -t docker-image-$(InstallerPlatform) $(InstallerPlatform)"
|
Command="docker build --build-arg USER_ID=%24(id -u) -t docker-image-$(InstallerPlatform) $(InstallerPlatform)"
|
||||||
WorkingDirectory="$(DockerDir)" />
|
WorkingDirectory="$(DockerDir)" />
|
||||||
|
|
||||||
<!-- Parse CLI version -->
|
|
||||||
<ReadLinesFromFile File="$(BuildDirectory)cli.version">
|
|
||||||
<Output TaskParameter="Lines" PropertyName="CLIVersionNumber" />
|
|
||||||
</ReadLinesFromFile>
|
|
||||||
|
|
||||||
<!-- Build Runtime Store and Hosting Bundle Deb package -->
|
<!-- Build Runtime Store and Hosting Bundle Deb package -->
|
||||||
<Exec Command="docker run
|
<Exec Command="docker run
|
||||||
--rm
|
--rm
|
||||||
-v $(RepositoryRoot):$(DockerRootDirectory)
|
-v $(RepositoryRoot):$(DockerRootDirectory)
|
||||||
-e DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
-e DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
||||||
-e KOREBUILD_SKIP_RUNTIME_INSTALL=true
|
|
||||||
-e BuildNumber=$(BuildNumber)
|
-e BuildNumber=$(BuildNumber)
|
||||||
-e RUNTIMESTORE_TIMESTAMP_INSTALLERNAME=$(RuntimeStoreTimestampInstallerPackageName)
|
-e RUNTIMESTORE_TIMESTAMP_INSTALLERNAME=$(RuntimeStoreTimestampInstallerPackageName)
|
||||||
-e RUNTIMESTORE_NOTIMESTAMP_INSTALLERNAME=$(RuntimeStoreNoTimestampInstallerPackageName)
|
-e RUNTIMESTORE_NOTIMESTAMP_INSTALLERNAME=$(RuntimeStoreNoTimestampInstallerPackageName)
|
||||||
-e HOSTINGBUNDLE_TIMESTAMP_INSTALLERNAME=$(HostingBundleTimestampInstallerPackageName)
|
-e HOSTINGBUNDLE_TIMESTAMP_INSTALLERNAME=$(HostingBundleTimestampInstallerPackageName)
|
||||||
-e HOSTINGBUNDLE_NOTIMESTAMP_INSTALLERNAME=$(HostingBundleNoTimestampInstallerPackageName)
|
-e HOSTINGBUNDLE_NOTIMESTAMP_INSTALLERNAME=$(HostingBundleNoTimestampInstallerPackageName)
|
||||||
docker-image-$(InstallerPlatform)
|
docker-image-$(InstallerPlatform)
|
||||||
/bin/bash -c "
|
./build.sh /t:RunDebTool"
|
||||||
$(DockerRootDirectory).build/dotnet/dotnet-install.sh
|
|
||||||
--channel preview
|
|
||||||
--version $(CLIVersionNumber) &&
|
|
||||||
export PATH=$PATH:/home/code_executor/.dotnet &&
|
|
||||||
./build.sh /t:RunDebTool
|
|
||||||
""
|
|
||||||
ContinueOnError="WarnAndContinue" />
|
ContinueOnError="WarnAndContinue" />
|
||||||
|
|
||||||
<!-- Copy Runtime Store and Hosting Bundle packages to output -->
|
<!-- 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