This commit is contained in:
clemensv 2019-12-04 17:49:01 +01:00
Родитель 7e465f5985
Коммит 4444510cfc
17 изменённых файлов: 15 добавлений и 119 удалений

Просмотреть файл

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreApp30PackageVersion)</RuntimeFrameworkVersion>
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.1' ">$(NETStandardLibrary21PackageVersion)</NETStandardImplicitPackageVersion>
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(NETStandardLibrary21PackageVersion)</NETStandardImplicitPackageVersion>
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
</PropertyGroup>

Просмотреть файл

@ -3,11 +3,7 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<PropertyGroup Label="Package Versions">
<PackagingTargetsPackageVersion>0.1.121</PackagingTargetsPackageVersion>
<DotnetDebPackageVersion>0.1.121</DotnetDebPackageVersion>
<DotnetRpmPackageVersion>0.1.121</DotnetRpmPackageVersion>
<DotnetZipPackageVersion>0.1.121</DotnetZipPackageVersion>
<DotnetTarballPackageVersion>0.1.121</DotnetTarballPackageVersion>
<PackagingTargetsPackageVersion>0.1.129</PackagingTargetsPackageVersion>
<WixPackageVersion>3.11.2</WixPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>2.1.1</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftDiagnosticsTracingEventSourcePackageVersion>1.1.28</MicrosoftDiagnosticsTracingEventSourcePackageVersion>

Просмотреть файл

@ -37,17 +37,20 @@
<Content Include="azbridge_config.machine.yml" CopyToPublishDirectory="PreserveNewest" Condition="! $(RuntimeIdentifier.StartsWith('win'))">
<LinuxPath>/etc/azbridge/azbridge_config.machine.yml</LinuxPath>
</Content>
<LinuxFolder Include="/etc/profile.d" Group="azbridge" Owner="azbridge" RemoveOnUninstall="false" Condition="! $(RuntimeIdentifier.StartsWith('win'))"/>
<Content Include="azbridge.sh" CopyToPublishDirectory="PreserveNewest" Condition="! $(RuntimeIdentifier.StartsWith('win'))" RemoveOnUninstall="true">
<LinuxPath>/etc/profile.d/azbridge.sh</LinuxPath>
<LinuxFileMode>0555</LinuxFileMode>
<LinuxFileMode Condition="!($(RuntimeIdentifier.StartsWith('rhel')) OR $(RuntimeIdentifier.StartsWith('fedora')) OR $(RuntimeIdentifier.StartsWith('ol')) OR $(RuntimeIdentifier.StartsWith('centos')))" >0555</LinuxFileMode>
</Content>
<Content Include="../tools/Powershell/add-hostname.ps1" CopyToPublishDirectory="PreserveNewest" Condition="$(RuntimeIdentifier.StartsWith('win'))" />
<Content Include="../tools/Powershell/remove-hostname.ps1" CopyToPublishDirectory="PreserveNewest" Condition="$(RuntimeIdentifier.StartsWith('win'))" />
<Content Include="../tools/Powershell/get-hostname.ps1" CopyToPublishDirectory="PreserveNewest" Condition="$(RuntimeIdentifier.StartsWith('win'))" />
</ItemGroup>
<PropertyGroup>
<PostInstallScript>ln -sf /usr/share/azbridge/azbridge /usr/local/bin/azbridge</PostInstallScript>
<PostRemoveScript>rm /usr/local/bin/azbridge</PostRemoveScript>
</PropertyGroup>
<Choose>
<When Condition="'$(TargetFramework)' == 'net462'">
<ItemGroup>
@ -153,9 +156,10 @@
<!-- Linux Daemon install properties -->
<PropertyGroup Condition="$(UnixRuntimeIdentifiers.Contains($(RuntimeIdentifier)))">
<CreateUser>false</CreateUser>
<CreateUser>true</CreateUser>
<UserName>azbridge</UserName>
<InstallService>false</InstallService>
<SymlinkAppHostInBin>true</SymlinkAppHostInBin>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -1,12 +0,0 @@
FROM centos AS build
ARG rpm_package
WORKDIR /tmp
COPY ./tmp/$rpm_package .
USER root
# temporary workaround for RPM packaging issue
RUN sed -i '/tsflags=nodocs/d' /etc/yum.conf
RUN yum update -y
RUN useradd -ms /bin/bash azbridge
RUN yum install -y $rpm_package
RUN yum install -y nc findutils
USER azbridge

Просмотреть файл

@ -1,19 +0,0 @@
<Project>
<Import Project="..\..\..\version.props" />
<PropertyGroup>
<OutputType>None</OutputType>
</PropertyGroup>
<Target Name="Build">
<Exec Command="build.cmd $(VersionPrefix) $(VersionSuffix) $(TargetFramework)" Condition="'$(OS)'=='Windows_NT'"/>
<Exec Command="bash ./build.sh $(VersionPrefix) $(VersionSuffix) $(TargetFramework)" Condition="'$(OS)'=='Unix'"/>
</Target>
<Target Name="VSTest">
<Exec Command="test.cmd $(VersionPrefix) $(VersionSuffix) $(TargetFramework)" Condition="'$(OS)'=='Windows_NT'"/>
<Exec Command="bash ./test.sh $(VersionPrefix) $(VersionSuffix) $(TargetFramework)" Condition="'$(OS)'=='Unix'"/>
</Target>
<Target Name="Clean">
<Exec Command="clean.cmd $(VersionPrefix) $(VersionSuffix) $(TargetFramework)" Condition="'$(OS)'=='Windows_NT'"/>
<Exec Command="bash ./clean.sh $(VersionPrefix) $(VersionSuffix) $(TargetFramework)" Condition="'$(OS)'=='Unix'"/>
</Target>
</Project>

Просмотреть файл

@ -1,17 +0,0 @@
@echo off
if not "%1" == "" set VersionPrefix=%2
if not "%2" == "" set VersionSuffix=%3
if not "%3" == "" set TargetFramework=%4
if "%VersionSuffix%"=="" set VersionSuffix=preview
if "%VersionPrefix%"=="" set VersionPrefix=1.0.0
if "%TargetFramework%"=="" set TargetFramework=netcoreapp3.0
pushd "%~dp0"
if not exist "tmp" mkdir tmp
set RpmFile=azbridge.%VersionPrefix%-%VersionSuffix%.centos-x64.rpm
copy /y ..\..\..\artifacts\build\%TargetFramework%\%RpmFile% tmp > NUL
docker build -f Dockerfile . --tag azbridge_centos_test --build-arg rpm_package=%RpmFile%
rd /s /q tmp
popd

Просмотреть файл

@ -1,19 +0,0 @@
#!/bin/bash
if [ ! -z $1 ]; then VersionPrefix=$1; fi
if [ ! -z $2 ]; then VersionSuffix=$2; fi
if [ ! -z $3 ]; then TargetFramework=$3; fi
if [ -z ${VersionSuffix+x} ]; then VersionSuffix='preview'; fi
if [ -z ${VersionPrefix+x} ]; then VersionPrefix='1.0.0'; fi
if [ -z ${TargetFramework+x} ]; then TargetFramework='netcoreapp3.0'; fi
pushd "${0%/*}" > /dev/null
if [ ! -d "tmp" ]; then mkdir tmp; fi
RpmFile=azbridge.$VersionPrefix-$VersionSuffix.centos-x64.rpm
cp ../../../artifacts/build/$TargetFramework/$RpmFile tmp/ > /dev/null
docker build -f Dockerfile . --tag azbridge_centos_test --build-arg rpm_package=$RpmFile
rm -rf tmp
popd

Просмотреть файл

@ -1,3 +0,0 @@
@echo off
set IMAGE_NAME=azbridge_centos_test
call ../_scripts/removeimage.cmd

Просмотреть файл

@ -1,4 +0,0 @@
#!/bin/bash
IMAGE_NAME=azbridge_centos_test
source ../_scripts/removeimage.sh

Просмотреть файл

@ -1,7 +0,0 @@
@echo off
pushd "%~dp0"
SET IMAGE_NAME=azbridge_centos_test
call ../_scripts/imagetests.cmd %*
popd
exit /b %ERRORLEVEL%

Просмотреть файл

@ -1,16 +0,0 @@
#!/bin/bash
if [ ! -z $1 ]; then VersionPrefix=$1; fi
if [ ! -z $2 ]; then VersionSuffix=$2; fi
if [ ! -z $3 ]; then TargetFramework=$3; fi
if [ -z ${VersionSuffix+x} ]; then VersionSuffix='preview'; fi
if [ -z ${VersionPrefix+x} ]; then VersionPrefix='1.0.0'; fi
if [ -z ${TargetFramework+x} ]; then TargetFramework='netcoreapp3.0'; fi
pushd "${0%/*}" > /dev/null
IMAGE_NAME=azbridge_centos_test
source ../_scripts/imagetests.sh
popd
exit $_RESULT

Просмотреть файл

@ -2,13 +2,6 @@ FROM fedora AS build
ARG rpm_package
WORKDIR /tmp
COPY ./tmp/$rpm_package .
USER root
# temporary workaround for RPM packaging issue
RUN sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf
RUN yum update -y
#RUN yum install -y nc libstdc++ libunwind libicu compat-openssl10
RUN useradd -ms /bin/bash azbridge
#RUN rpm -i $rpm_package
RUN yum install -y $rpm_package
RUN yum install -y nc findutils
USER azbridge

Просмотреть файл

@ -1,4 +1,4 @@
FROM ubuntu:xenial AS build
FROM ubuntu:bionic AS build
ARG deb_package
WORKDIR /tmp
COPY ./tmp/$deb_package .

Просмотреть файл

@ -11,6 +11,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" />
<PackageReference Include="xunit" Version="$(XunitPackageVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
<PackageReference Condition="'$(OS)' == 'Windows_NT' AND '$(TargetFramework)' == 'net462'" Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -13,7 +13,7 @@
<PackageReference Include="System.Memory" Version="$(SystemMemoryPackageVersion)" />
<PackageReference Include="System.Net.NameResolution" Version="$(SystemNetNameResolutionPackageVersion)" />
<PackageReference Include="xunit" Version="$(XunitPackageVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
<PackageReference Condition="'$(OS)' == 'Windows_NT' AND '$(TargetFramework)' == 'net462'" Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
<PackageReference Include="YamlDotNet.Signed" Version="$(YamlDotnetSignedPackageVersion)" />
<!--<DotNetCliToolReference Include="dotnet-xunit" Version="$(DotnetXunitPackageVersion)" />-->
</ItemGroup>

Просмотреть файл

@ -2,7 +2,7 @@
if [ ! -z $APPVEYOR_BUILD_VERSION ]; then _VersionProp="/p:VersionPrefix=$APPVEYOR_BUILD_VERSION"; fi
dotnet test --verbosity=normal
dotnet test --verbosity=normal /p:SelfContained=false
#cd test/docker
#dotnet clean --verbosity=normal /p:Configuration=Debug /p:TargetFramework=netcoreapp3.0 $_BuildProp $_VersionProp $@
#dotnet build --verbosity=normal /p:Configuration=Debug /p:TargetFramework=netcoreapp3.0 $_BuildProp $_VersionProp $@

Просмотреть файл

@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>0.2.1</VersionPrefix>
<VersionPrefix>0.2.9</VersionPrefix>
<VersionSuffix>rtm</VersionSuffix>
</PropertyGroup>
</Project>