|
|
@@ -1,468 +0,0 @@
|
|
|
-<Project>
|
|
|
- <PropertyGroup>
|
|
|
- <_TemplatesDirectory>$(MSBuildThisFileDirectory)tools\templates\</_TemplatesDirectory>
|
|
|
- <_DockerDir>$(MSBuildThisFileDirectory)tools\docker\</_DockerDir>
|
|
|
- <_PackagingDir>$(MSBuildThisFileDirectory)tools\packaging\</_PackagingDir>
|
|
|
- <_DebToolDir>$(MSBuildThisFileDirectory)tools\dotnet-deb-tool-consumer\</_DebToolDir>
|
|
|
- <_RuntimeStoreSource>$(RepositoryRoot).deps\Signed\Store\</_RuntimeStoreSource>
|
|
|
- <_InstallerSource>$(RepositoryRoot).deps\Installers\</_InstallerSource>
|
|
|
- <_WorkRoot>$(RepositoryRoot).w\</_WorkRoot>
|
|
|
- <_WorkLayoutDir>$(_WorkRoot).l\</_WorkLayoutDir>
|
|
|
- <_WorkOutputDir>$(_WorkRoot).o\</_WorkOutputDir>
|
|
|
- <_DockerRootDirectory>/opt/code/</_DockerRootDirectory>
|
|
|
- <_InstallersOutputDir>$(ArtifactsDir)installers\</_InstallersOutputDir>
|
|
|
-
|
|
|
- <RSInstallerName>aspnetcore-store</RSInstallerName>
|
|
|
- <HostingInstallerName>dotnet-hosting</HostingInstallerName>
|
|
|
- <HostingArchiveName>$(HostingInstallerName)-$(PackageVersion)-linux-x64.tar.gz</HostingArchiveName>
|
|
|
- <RSDebConfigFile>$(_PackagingDir)store_debian_config.json</RSDebConfigFile>
|
|
|
- <HostingDebConfigFile>$(_PackagingDir)hosting_debian_config.json</HostingDebConfigFile>
|
|
|
-
|
|
|
- <PublicCoreFeedPrefix>https://dotnetcli.blob.core.windows.net/dotnet</PublicCoreFeedPrefix>
|
|
|
- <CoreFeedPrefix Condition="'$(KOREBUILD_DOTNET_FEED_UNCACHED)'!=''">$(KOREBUILD_DOTNET_FEED_UNCACHED)</CoreFeedPrefix>
|
|
|
- <CoreFeedPrefix Condition="'$(CoreFeedPrefix)'==''">$(PublicCoreFeedPrefix)</CoreFeedPrefix>
|
|
|
-
|
|
|
- <RuntimeStore200LinkPrefix>$(PublicCoreFeedPrefix)/aspnetcore/store/2.0.0-26452/Build.RS.</RuntimeStore200LinkPrefix>
|
|
|
- <RuntimeTargzLink>$(CoreFeedPrefix)/Runtime/$(MicrosoftNETCoreApp20PackageVersion)/dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)-linux-x64.tar.gz</RuntimeTargzLink>
|
|
|
- <RuntimeStoreArchivePrefix>$(_RuntimeStoreSource)aspnetcore-store-$(PackageVersion)-</RuntimeStoreArchivePrefix>
|
|
|
- <RuntimeStoreLinuxArchiveFilePath>$(RuntimeStoreArchivePrefix)linux-x64.tar.gz</RuntimeStoreLinuxArchiveFilePath>
|
|
|
- </PropertyGroup>
|
|
|
-
|
|
|
- <Target Name="BuildInstallers" DependsOnTargets="GenerateTargzs;GenerateRpms;GenerateDebs;GenerateRelabledInstallers" />
|
|
|
-
|
|
|
- <Target Name="_EnsureInstallerPrerequisites">
|
|
|
- <MakeDir Directories="$(_InstallersOutputDir)" />
|
|
|
-
|
|
|
- <!-- Check Docker server OS -->
|
|
|
- <Exec Command="docker version -f "{{.Server.Os}}"" StandardOutputImportance="Normal" ConsoleToMSBuild="true">
|
|
|
- <Output TaskParameter="ConsoleOutput" PropertyName="DockerHostOS" />
|
|
|
- </Exec>
|
|
|
-
|
|
|
- <Error Text="Docker host must be using Linux containers." Condition="'$(DockerHostOS)' != 'linux'"/>
|
|
|
-
|
|
|
- <Error
|
|
|
- Text="Linux archive not found. Expected it to exist in $(RuntimeStoreLinuxArchiveFilePath)."
|
|
|
- Condition="!Exists('$(RuntimeStoreLinuxArchiveFilePath)')" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_EnsureInstallerDirectory" >
|
|
|
- <!-- Download dotnet installers -->
|
|
|
- <MakeDir Directories="$(_InstallerSource)" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_DownloadInstallers" DependsOnTargets="_EnsureInstallerDirectory">
|
|
|
- <!-- Download dotnet installers -->
|
|
|
- <MakeDir Directories="$(_InstallerSource)" />
|
|
|
- <!--
|
|
|
- Note: KOREBUILD_DOTNET_FEED_CREDENTIAL is intentionally NOT an MSBuild variable.
|
|
|
- MSBuild doesn't to the substitution correctly because the string contains %,
|
|
|
- so we'll let bash do it instead.
|
|
|
- -->
|
|
|
- <Exec Command="curl --fail -sSL "$(RuntimeTargzLink)$KOREBUILD_DOTNET_FEED_CREDENTIAL" -o $(_InstallerSource)dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)-linux-x64.tar.gz" />
|
|
|
- <Exec Command="curl --fail -sSL "$(RuntimeStore200LinkPrefix)linux.tar.gz" -o $(_InstallerSource)Build.RS.linux.tar.gz" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_GenerateTargz">
|
|
|
- <!-- Clear working directory -->
|
|
|
- <RemoveDir Directories="$(_WorkRoot)" />
|
|
|
- <MakeDir Directories="$(_WorkRoot)" />
|
|
|
-
|
|
|
- <!-- Create layout: Aspnet Hosting Bundle -->
|
|
|
- <Exec Command="tar -xzf $(RSArchive) -C $(_WorkRoot)" />
|
|
|
-
|
|
|
- <ItemGroup>
|
|
|
- <Archives Include="$(DependentArchives)" />
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <Exec Command="tar -xzf %(Archives.Identity) -C $(_WorkRoot)" />
|
|
|
-
|
|
|
- <!-- Create Aspnet Hosting Bundle tar.gz -->
|
|
|
- <Exec Command="tar -czvf $(_InstallersOutputDir)$(OutputArchiveName) ." WorkingDirectory="$(_WorkRoot)"/>
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_GenerateZip">
|
|
|
- <!-- Clear working directory -->
|
|
|
- <RemoveDir Directories="$(_WorkRoot)" />
|
|
|
- <MakeDir Directories="$(_WorkRoot)" />
|
|
|
-
|
|
|
- <!-- Create layout -->
|
|
|
- <UnzipArchive File="$(RSArchive)" Destination="$(_WorkRoot)" />
|
|
|
-
|
|
|
- <ItemGroup>
|
|
|
- <Archives Include="$(DependentArchives)" />
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <UnzipArchive File="%(Archives.Identity)" Destination="$(_WorkRoot)" />
|
|
|
-
|
|
|
- <ItemGroup>
|
|
|
- <ArchiveFiles Include="$(_WorkRoot)**\*" />
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <!-- Create Zip -->
|
|
|
- <ZipArchive File="$(_InstallersOutputDir)$(OutputArchiveName)" SourceFiles="@(ArchiveFiles)" WorkingDirectory="$(_WorkRoot)" Overwrite="true" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="GenerateTargzs" DependsOnTargets="_EnsureInstallerPrerequisites;_DownloadInstallers">
|
|
|
- <ItemGroup>
|
|
|
- <_DependentArchives Include="$(_InstallerSource)dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)-linux-x64.tar.gz" />
|
|
|
- <_DependentArchives Include="$(_InstallerSource)Build.RS.linux.tar.gz" />
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <MSBuild
|
|
|
- Projects="$(MSBuildProjectFullPath)"
|
|
|
- Targets="_GenerateTargz"
|
|
|
- Properties="DependentArchives=@(_DependentArchives);RSArchive=$(RuntimeStoreLinuxArchiveFilePath);OutputArchiveName=$(HostingArchiveName)" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_DownloadAdditionalRSZips" DependsOnTargets="_EnsureInstallerDirectory;_DownloadInstallers">
|
|
|
- <Exec Command="curl --fail -sSL "$(RuntimeStore200LinkPrefix)osx.tar.gz" -o $(_InstallerSource)Build.RS.osx.tar.gz" />
|
|
|
- <Exec Command="curl --fail -sSL "$(RuntimeStore200LinkPrefix)winx64.zip" -o $(_InstallerSource)Build.RS.winx64.zip" />
|
|
|
- <Exec Command="curl --fail -sSL "$(RuntimeStore200LinkPrefix)winx86.zip" -o $(_InstallerSource)Build.RS.winx86.zip" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="GenerateCumulativeArchives" DependsOnTargets="_EnsureInstallerPrerequisites;_DownloadAdditionalRSZips">
|
|
|
- <!-- Temporary: Generate time stamp free cumulative zips with old naming scheme -->
|
|
|
-
|
|
|
- <ItemGroup>
|
|
|
- <TargzArchives Include="Build.RS.linux.tar.gz">
|
|
|
- <RSArchive>$(RuntimeStoreArchivePrefix)linux-x64.tar.gz</RSArchive>
|
|
|
- </TargzArchives>
|
|
|
- <TargzArchives Include="Build.RS.osx.tar.gz">
|
|
|
- <RSArchive>$(RuntimeStoreArchivePrefix)osx-x64.tar.gz</RSArchive>
|
|
|
- </TargzArchives>
|
|
|
- <ZipArchives Include="Build.RS.winx64.zip">
|
|
|
- <RSArchive>$(RuntimeStoreArchivePrefix)win7-x64.zip</RSArchive>
|
|
|
- </ZipArchives>
|
|
|
- <ZipArchives Include="Build.RS.winx86.zip">
|
|
|
- <RSArchive>$(RuntimeStoreArchivePrefix)win7-x86.zip</RSArchive>
|
|
|
- </ZipArchives>
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <!-- Targz -->
|
|
|
- <MSBuild
|
|
|
- Projects="$(MSBuildProjectFullPath)"
|
|
|
- Targets="_GenerateTargz"
|
|
|
- Properties="DependentArchives=$(_InstallerSource)%(TargzArchives.Identity);RSArchive=%(TargzArchives.RSArchive);OutputArchiveName=%(TargzArchives.Identity)" />
|
|
|
- <!-- Targz -->
|
|
|
- <MSBuild
|
|
|
- Projects="$(MSBuildProjectFullPath)"
|
|
|
- Targets="_GenerateZip"
|
|
|
- Properties="DependentArchives=$(_InstallerSource)%(ZipArchives.Identity);RSArchive=%(ZipArchives.RSArchive);OutputArchiveName=%(ZipArchives.Identity)" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_BuildDockerImage">
|
|
|
- <Exec
|
|
|
- Command="docker build --build-arg USER_ID=%24(id -u) -t docker-image-$(Image) $(Image)"
|
|
|
- WorkingDirectory="$(_DockerDir)" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_RemoveDockerImage">
|
|
|
- <Exec Command="docker rmi docker-image-$(Image)" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_GenerateRpm">
|
|
|
- <!-- Clear working directory -->
|
|
|
- <RemoveDir Directories="$(_WorkRoot)" />
|
|
|
- <MakeDir Directories="$(_WorkRoot)" />
|
|
|
-
|
|
|
- <!-- Create layout: Extract archive if given -->
|
|
|
- <MakeDir Directories="$(_WorkRoot)package_root\" />
|
|
|
- <Exec Command="tar -xzf $(RSArchive) -C $(_WorkRoot)package_root\" Condition="'$(RSArchive)'!=''" />
|
|
|
-
|
|
|
- <!-- Create layout: Place changelog -->
|
|
|
- <Copy
|
|
|
- SourceFiles="$(_PackagingDir)changelog"
|
|
|
- DestinationFiles="$(_WorkRoot)templates/changelog"
|
|
|
- OverwriteReadOnlyFiles="True"
|
|
|
- SkipUnchangedFiles="False"
|
|
|
- UseHardlinksIfPossible="False" />
|
|
|
-
|
|
|
- <ItemGroup>
|
|
|
- <ChangelogItems Include="DATE" Replacement="$([System.DateTime]::UtcNow.ToString(ddd MMM dd yyyy))" />
|
|
|
- <ChangelogItems Include="MAINTAINER_NAME" Replacement="$(MaintainerName)" />
|
|
|
- <ChangelogItems Include="MAINTAINER_EMAIL" Replacement="$(MaintainerEmail)" />
|
|
|
- <ChangelogItems Include="PACKAGE_VERSION" Replacement="$(RPMVersion)" />
|
|
|
- <ChangelogItems Include="PACKAGE_REVISION" Replacement="$(RPMRevision)" />
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <!-- Update Date, Maintainer, Version, Revision and Changelog Message -->
|
|
|
- <RepoTasks.ReplaceInFile Filename="$(_WorkRoot)templates/changelog" Items="@(ChangelogItems)" />
|
|
|
-
|
|
|
- <!-- Update Maintainer and Summary -->
|
|
|
- <PropertyGroup>
|
|
|
- <RPMMaintainer>$(MaintainerName) <$(MaintainerEmail)></RPMMaintainer>
|
|
|
- <RPMSummary>$(RPMSummary.Replace('DEB_VERSION','$(RPMVersion)'))</RPMSummary>
|
|
|
- </PropertyGroup>
|
|
|
-
|
|
|
- <!-- Run RPM -->
|
|
|
- <Exec Command="docker run
|
|
|
- --rm
|
|
|
- -v $(RepositoryRoot):$(_DockerRootDirectory)
|
|
|
- docker-image-$(Image)
|
|
|
- fpm
|
|
|
- --verbose
|
|
|
- -s dir
|
|
|
- -t rpm
|
|
|
- -n $(RPMInstallerPrefix)-$(RPMVersion)
|
|
|
- -p $(_DockerRootDirectory)artifacts/installers/$(RPMInstallerPrefix)-$(RPMVersion)-$(RPMFileSuffix)
|
|
|
- -v $(RPMVersion)
|
|
|
- --iteration $(RPMRevision)
|
|
|
- -a amd64
|
|
|
- $(RPMArguments)
|
|
|
- --rpm-changelog $(_DockerRootDirectory).w/templates/changelog
|
|
|
- --rpm-summary "$(RPMSummary)"
|
|
|
- --description "$(RPMDescription)"
|
|
|
- --maintainer "$(RPMMaintainer)"
|
|
|
- --vendor "$(RPMVendor)"
|
|
|
- --license "$(RPMLicense)"
|
|
|
- --url "$(RPMHomepage)"
|
|
|
- $(_DockerRootDirectory).w/package_root/="$(RPMInstallRoot)"" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="GenerateRpms" DependsOnTargets="_EnsureInstallerPrerequisites">
|
|
|
- <PropertyGroup>
|
|
|
- <Image>rhel.7</Image>
|
|
|
- <RPMVendor>.NET Foundation</RPMVendor>
|
|
|
- <RHInstallerInstallRoot>/opt/rh/rh-dotnet20/root/usr/lib64/dotnet/</RHInstallerInstallRoot>
|
|
|
- <GenericInstallerInstallRoot>/usr/share/dotnet/</GenericInstallerInstallRoot>
|
|
|
- </PropertyGroup>
|
|
|
-
|
|
|
- <!-- Build Docker Image -->
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_BuildDockerImage" Properties="Image=$(Image)" />
|
|
|
-
|
|
|
- <!-- Common installer parameters -->
|
|
|
- <JsonPeek Query="$.short_description" JsonInputPath="$(RSDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_RSInstallerSummary" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.long_description" JsonInputPath="$(RSDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_RSDescription" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.license.type" JsonInputPath="$(RSDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_RSLicense" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.release.package_revision" JsonInputPath="$(RSDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_RSPackageRevision" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.homepage" JsonInputPath="$(RSDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_RSHomepage" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.maintainer_name" JsonInputPath="$(RSDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_RSMaintainerName" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.maintainer_email" JsonInputPath="$(RSDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_RSMaintainerEmail" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.short_description" JsonInputPath="$(HostingDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_HostingSummary" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.long_description" JsonInputPath="$(HostingDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_HostingDescription" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.license.type" JsonInputPath="$(HostingDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_HostingLicense" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.release.package_revision" JsonInputPath="$(HostingDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_HostingRevision" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.homepage" JsonInputPath="$(HostingDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_HostingHomepage" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.maintainer_name" JsonInputPath="$(HostingDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_HostingMaintainerName" />
|
|
|
- </JsonPeek>
|
|
|
- <JsonPeek Query="$.maintainer_email" JsonInputPath="$(HostingDebConfigFile)">
|
|
|
- <Output TaskParameter="Result" ItemName="_HostingMaintainerEmail" />
|
|
|
- </JsonPeek>
|
|
|
-
|
|
|
- <ItemGroup>
|
|
|
- <RHStoreDirectories Include="$(RHInstallerInstallRoot)additionalDeps" />
|
|
|
- <RHStoreDirectories Include="$(RHInstallerInstallRoot)store" />
|
|
|
- <GenericStoreDirectories Include="$(GenericInstallerInstallRoot)additionalDeps" />
|
|
|
- <GenericStoreDirectories Include="$(GenericInstallerInstallRoot)store" />
|
|
|
- <RSDependencies Include="$(RSInstallerName)-2.0.0">
|
|
|
- <Version>2.0.0</Version>
|
|
|
- </RSDependencies>
|
|
|
- <HostingDependencies Include="$(RSInstallerName)-$(PackageVersion)">
|
|
|
- <Version>$(PackageVersion)</Version>
|
|
|
- </HostingDependencies>
|
|
|
- <HostingDependencies Include="dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)">
|
|
|
- <Version>$(MicrosoftNETCoreApp20PackageVersion)</Version>
|
|
|
- </HostingDependencies>
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <PropertyGroup>
|
|
|
- <HostingFPMArguments>@(HostingDependencies->' -d "%(Identity) >= %(Version)"', ' ')</HostingFPMArguments>
|
|
|
- <RSDependencyArguments>@(RSDependencies->' -d "%(Identity) >= %(Version)"', ' ')</RSDependencyArguments>
|
|
|
- <RHRSArguments>$(RSDependencyArguments) @(RHStoreDirectories->' --directories "%(FullPath)"', ' ')</RHRSArguments>
|
|
|
- <GenericRSArguments>$(RSDependencyArguments) @(GenericStoreDirectories->' --directories "%(FullPath)"', ' ')</GenericRSArguments>
|
|
|
-
|
|
|
- <CommonArguments>Image=$(Image);RPMVendor=$(RPMVendor)</CommonArguments>
|
|
|
- <CommonGenericArguments>RPMFileSuffix=rhel.7-x64.rpm;RPMInstallRoot=$(GenericInstallerInstallRoot)</CommonGenericArguments>
|
|
|
- <CommonRHArguments>RPMFileSuffix=rh.rhel.7-x64.rpm;RPMInstallRoot=$(RHInstallerInstallRoot)</CommonRHArguments>
|
|
|
-
|
|
|
- <CommonRSArguments>MaintainerName=@(_RSMaintainerName);MaintainerEmail=@(_RSMaintainerEmail)</CommonRSArguments>
|
|
|
- <CommonRSArguments>$(CommonRSArguments);RPMInstallerPrefix=$(RSInstallerName);RPMRevision=@(_RSPackageRevision)</CommonRSArguments>
|
|
|
- <CommonRSArguments>$(CommonRSArguments);RPMSummary=@(_RSInstallerSummary);RPMDescription=@(_RSDescription)</CommonRSArguments>
|
|
|
- <CommonRSArguments>$(CommonRSArguments);RPMLicense=@(_RSLicense);RPMHomepage=@(_RSHomepage)</CommonRSArguments>
|
|
|
-
|
|
|
- <CommonHostingArguments>$(CommonArguments);MaintainerName=@(_HostingMaintainerName);MaintainerEmail=@(_HostingMaintainerEmail)</CommonHostingArguments>
|
|
|
- <CommonHostingArguments>$(CommonHostingArguments);RPMInstallerPrefix=$(HostingInstallerName);RPMRevision=@(_HostingRevision)</CommonHostingArguments>
|
|
|
- <CommonHostingArguments>$(CommonHostingArguments);RPMSummary=@(_HostingSummary);RPMDescription=@(_HostingDescription)</CommonHostingArguments>
|
|
|
- <CommonHostingArguments>$(CommonHostingArguments);RPMLicense=@(_HostingLicense);RPMHomepage=@(_HostingHomepage)</CommonHostingArguments>
|
|
|
-
|
|
|
- <RS_RPM_Arguments>$(CommonArguments);$(CommonGenericArguments);$(CommonRSArguments)</RS_RPM_Arguments>
|
|
|
- <RS_RPM_Arguments>$(RS_RPM_Arguments);RSArchive=$(RuntimeStoreLinuxArchiveFilePath);RPMVersion=$(PackageVersion);RPMArguments=$(GenericRSArguments)</RS_RPM_Arguments>
|
|
|
-
|
|
|
- <Hosting_RPM_RedHat_Arguments>$(CommonArguments);$(CommonGenericArguments);$(CommonHostingArguments)</Hosting_RPM_RedHat_Arguments>
|
|
|
- <Hosting_RPM_RedHat_Arguments>$(Hosting_RPM_RedHat_Arguments);RPMVersion=$(PackageVersion);RPMArguments=$(HostingFPMArguments)</Hosting_RPM_RedHat_Arguments>
|
|
|
-
|
|
|
- <RS_RPM_RedHat_Arguments>$(CommonArguments);$(CommonRHArguments);$(CommonRSArguments)</RS_RPM_RedHat_Arguments>
|
|
|
- <RS_RPM_RedHat_Arguments>$(RS_RPM_RedHat_Arguments);RSArchive=$(RuntimeStoreLinuxArchiveFilePath);RPMVersion=$(PackageVersion);RPMArguments=$(RHRSArguments)</RS_RPM_RedHat_Arguments>
|
|
|
-
|
|
|
- <Hosting_RPM_Arguments>$(CommonArguments);$(CommonRHArguments);$(CommonHostingArguments)</Hosting_RPM_Arguments>
|
|
|
- <Hosting_RPM_Arguments>$(Hosting_RPM_Arguments);RPMVersion=$(PackageVersion);RPMArguments=$(HostingFPMArguments)</Hosting_RPM_Arguments>
|
|
|
- </PropertyGroup>
|
|
|
-
|
|
|
- <!-- General runtime store -->
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RS_RPM_Arguments)" />
|
|
|
- <!-- General hosting bundle -->
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(Hosting_RPM_RedHat_Arguments)" />
|
|
|
-
|
|
|
- <!-- RH runtime store -->
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RS_RPM_RedHat_Arguments)" />
|
|
|
- <!-- RH hosting bundle -->
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(Hosting_RPM_Arguments)" />
|
|
|
-
|
|
|
- <!-- Remove Docker Image to save disk space -->
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_GenerateDeb">
|
|
|
- <!-- Create layout: Clear work directory -->
|
|
|
- <RemoveDir Directories="$(_WorkRoot)" />
|
|
|
- <MakeDir Directories="$(_WorkRoot)" />
|
|
|
-
|
|
|
- <!-- Create layout: Extract archive if given -->
|
|
|
- <MakeDir Directories="$(_WorkLayoutDir)package_root\" />
|
|
|
- <Exec Command="tar -xzf $(RSArchive) -C $(_WorkLayoutDir)package_root/" Condition="'$(RSArchive)'!=''" />
|
|
|
-
|
|
|
- <!-- Create layout: Generate and Place debian_config.json -->
|
|
|
- <Copy
|
|
|
- SourceFiles="$(DebConfig)"
|
|
|
- DestinationFiles="$(_WorkLayoutDir)debian_config.json"
|
|
|
- OverwriteReadOnlyFiles="True"
|
|
|
- SkipUnchangedFiles="False"
|
|
|
- UseHardlinksIfPossible="False" />
|
|
|
-
|
|
|
- <ItemGroup>
|
|
|
- <DebConfigItems Include="DOTNET_VERSION" Replacement="$(DotnetVersion)" />
|
|
|
- <DebConfigItems Include="DEB_VERSION" Replacement="$(DebVersion)" />
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <!-- Update versions -->
|
|
|
- <RepoTasks.ReplaceInFile Filename="$(_WorkLayoutDir)debian_config.json" Items="@(DebConfigItems)" />
|
|
|
-
|
|
|
- <!-- Build Runtime Store and Hosting Bundle Deb package -->
|
|
|
-
|
|
|
- <!--
|
|
|
- Note: KOREBUILD_DOTNET_FEED_CREDENTIAL is intentionally NOT an MSBuild variable.
|
|
|
- MSBuild doesn't to the substitution correctly because the string contains %,
|
|
|
- so we'll let bash do it instead.
|
|
|
- -->
|
|
|
-
|
|
|
- <Exec Command="docker run
|
|
|
- --rm
|
|
|
- -v $(RepositoryRoot):$(_DockerRootDirectory)
|
|
|
- -e DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
|
|
- -e INSTALLER_NAME=$(DebPrefix)-$(DebVersion)
|
|
|
- -e INSTALLER_VERSION=$(DebVersion)
|
|
|
- -e 'KOREBUILD_DOTNET_VERSION=$(KOREBUILD_DOTNET_VERSION)'
|
|
|
- -e 'KOREBUILD_DOTNET_SHARED_RUNTIME_VERSION=$(KOREBUILD_DOTNET_SHARED_RUNTIME_VERSION)'
|
|
|
- -e 'KOREBUILD_DOTNET_FEED_CDN=$(KOREBUILD_DOTNET_FEED_CDN)'
|
|
|
- -e 'KOREBUILD_DOTNET_FEED_UNCACHED=$(KOREBUILD_DOTNET_FEED_UNCACHED)'
|
|
|
- -e "KOREBUILD_DOTNET_FEED_CREDENTIAL=$KOREBUILD_DOTNET_FEED_CREDENTIAL"
|
|
|
- docker-image-$(Image)
|
|
|
- ./build.sh /t:RunDebTool"
|
|
|
- ContinueOnError="WarnAndContinue" />
|
|
|
-
|
|
|
- <!-- Copy Runtime Store and Hosting Bundle packages to output -->
|
|
|
- <ItemGroup>
|
|
|
- <GeneratedDebFiles Include="$(_WorkOutputDir)/*.deb" />
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <Error Text="@(GeneratedDebFiles->Count()) deb installer files generated." Condition="'@(GeneratedDebFiles->Count())' != 1" />
|
|
|
-
|
|
|
- <Copy
|
|
|
- DestinationFiles="$(_InstallersOutputDir)$(DebPrefix)-$(DebVersion)-$(Image)-x64.deb"
|
|
|
- SourceFiles="@(GeneratedDebFiles)"
|
|
|
- OverwriteReadOnlyFiles="True"
|
|
|
- SkipUnchangedFiles="False"
|
|
|
- UseHardlinksIfPossible="False" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="_GenerateDebOnPlatform">
|
|
|
- <PropertyGroup>
|
|
|
- <CommonRSArguments>Image=$(Image);DebConfig=$(RSDebConfigFile);DebPrefix=$(RSInstallerName)</CommonRSArguments>
|
|
|
- <CommonHostingArguments>Image=$(Image);DebConfig=$(HostingDebConfigFile);DotnetVersion=$(MicrosoftNETCoreApp20PackageVersion);DebPrefix=$(HostingInstallerName)</CommonHostingArguments>
|
|
|
- </PropertyGroup>
|
|
|
-
|
|
|
- <!-- Build Docker Image -->
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_BuildDockerImage" Properties="Image=$(Image)" />
|
|
|
-
|
|
|
- <MSBuild
|
|
|
- Projects="$(MSBuildProjectFullPath)"
|
|
|
- Targets="_GenerateDeb"
|
|
|
- Properties="$(CommonRSArguments);RSArchive=$(RuntimeStoreLinuxArchiveFilePath);DebVersion=$(Version)" />
|
|
|
- <MSBuild
|
|
|
- Projects="$(MSBuildProjectFullPath)"
|
|
|
- Targets="_GenerateDeb"
|
|
|
- Properties="$(CommonHostingArguments);DebVersion=$(Version)" />
|
|
|
-
|
|
|
- <!-- Remove Docker Image to save disk space -->
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="GenerateDebs" DependsOnTargets="_EnsureInstallerPrerequisites">
|
|
|
- <PropertyGroup>
|
|
|
- <CommonArguments>Version=$(Version)</CommonArguments>
|
|
|
- </PropertyGroup>
|
|
|
-
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=debian.8" />
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.14.04" />
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.16.04" />
|
|
|
- <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.16.10" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="RunDebTool">
|
|
|
- <!-- Install dotnet-deb tool -->
|
|
|
- <MSBuild Projects="$(_DebToolDir)dotnet-deb-tool-consumer.csproj" Targets="Restore" />
|
|
|
-
|
|
|
- <!-- Build deb package -->
|
|
|
- <Exec
|
|
|
- Command="dotnet deb-tool -i $(_WorkLayoutDir) -o $(_WorkOutputDir) -n $(INSTALLER_NAME) -v $(INSTALLER_VERSION)"
|
|
|
- WorkingDirectory="$(_DebToolDir)" />
|
|
|
- </Target>
|
|
|
-
|
|
|
- <Target Name="GenerateRelabledInstallers">
|
|
|
- <ItemGroup>
|
|
|
- <Debian8Installers Include="$(_InstallersOutputDir)*debian.8*" />
|
|
|
- <Ubuntu1604Installers Include="$(_InstallersOutputDir)*ubuntu.16.04*" />
|
|
|
- </ItemGroup>
|
|
|
-
|
|
|
- <!-- Create debian.9 installers by renaming debian.8 installers -->
|
|
|
- <Copy
|
|
|
- SourceFiles="%(Debian8Installers.FullPath)"
|
|
|
- DestinationFiles="$([System.String]::Copy('%(Debian8Installers.FullPath)').Replace('debian.8','debian.9'))"
|
|
|
- OverwriteReadOnlyFiles="True"
|
|
|
- SkipUnchangedFiles="False"
|
|
|
- UseHardlinksIfPossible="False" />
|
|
|
-
|
|
|
- <!-- Create ubuntu.17.04 installers by renaming ubuntu.16.04 installers -->
|
|
|
- <Copy
|
|
|
- SourceFiles="%(Ubuntu1604Installers.FullPath)"
|
|
|
- DestinationFiles="$([System.String]::Copy('%(Ubuntu1604Installers.FullPath)').Replace('ubuntu.16.04','ubuntu.17.04'))"
|
|
|
- OverwriteReadOnlyFiles="True"
|
|
|
- SkipUnchangedFiles="False"
|
|
|
- UseHardlinksIfPossible="False" />
|
|
|
- </Target>
|
|
|
-</Project>
|