Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dist-dotnet-4.5.props.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<PropUsingMono>@USINGMONO@</PropUsingMono>
<PropLaunchExe Condition="'$(PropUsingMono)' == 'true'">mono </PropLaunchExe>
<PropBuildWinRT>@BUILDWINRT@</PropBuildWinRT>
<PropBuildWcf Condition="'$(PropUsingMono)' != 'true'">true</PropBuildWcf>
<PropAssemblyVersion>@VERSION@</PropAssemblyVersion>
<PropKeyfile>$(MSBuildProjectDirectory)\..\..\..\@KEYFILE@</PropKeyfile>
</PropertyGroup>
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ ensure-deliverables: rabbit-vsn
file ${RELEASE_DIR}/${NAME_VSN}-client-htmldoc.zip
file ${RELEASE_DIR}/${NAME_VSN}-client-htmldoc
file ${RELEASE_DIR}/${NAME_VSN}-dotnet-4.5.zip
file ${RELEASE_DIR}/${NAME_VSN}-wcf-htmldoc.zip
file ${RELEASE_DIR}/${NAME_VSN}-wcf-htmldoc

ensure-release-dir: rabbit-vsn
touch ${RELEASE_DIR}/
Expand All @@ -49,9 +47,7 @@ doc: rabbit-vsn ensure-release-dir ensure-docs
unzip -q -j ${RELEASE_DIR}/${NAME_VSN}-tmp-xmldoc.zip -d build/tmpdoc/xml
cd ${RELEASE_DIR} && \
rm -rf ${NAME_VSN}-htmldoc && \
unzip -q ${NAME_VSN}-client-htmldoc.zip -d ${NAME_VSN}-client-htmldoc && \
rm -rf ${NAME_VSN}-wcf-htmldoc && \
unzip -q ${NAME_VSN}-wcf-htmldoc.zip -d ${NAME_VSN}-wcf-htmldoc
unzip -q ${NAME_VSN}-client-htmldoc.zip -d ${NAME_VSN}-client-htmldoc

clean:
rm -rf $(GENSRC_DIR) $(RELEASE_DIR)/*
52 changes: 12 additions & 40 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,37 @@
version: "4.1.0.{build}"
version: "5.1.0.{build}"

platform: Any CPU
configuration: Release
skip_tags: true
image: Visual Studio 2017

environment:
BUILDWINRT: true
USINGMONO: false
SNKSECRET:
secure: C8FL0UTKVN8YcMW1wdssabbkSWMIrpJTqgUNeI2NfQw=

init:
- appveyor DownloadFile https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1
- ps: |
& .\dotnet-install.ps1 -Channel "preview" -Version "1.0.0-preview2-003121"
Remove-Item .\dotnet-install.ps1
- echo %APPVEYOR_BUILD_VERSION%
- choco install -y rabbitmq
cache:
# Note: this must match the $rabbitmq_installer_path value in
# tools\appveyor\install.ps1
- "%HOMEDRIVE%%HOMEPATH%\rabbitmq-server-3.7.4.exe"

install:
- IF DEFINED SNKSECRET (nuget install secure-file -ExcludeVersion)
- IF DEFINED SNKSECRET (secure-file\tools\secure-file -decrypt %APPVEYOR_BUILD_FOLDER%\rabbit.snk.enc -secret %SNKSECRET%) ELSE (ECHO This Is A Pull Request Build)
- IF NOT DEFINED SNKSECRET (copy "rabbit.snk.prbuilds" "rabbit.snk") ELSE (ECHO Using The Release Key File)
- ps: |
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
if (Test-Path "HKLM:\SOFTWARE\Wow6432Node\") { $regPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" }
$path = Split-Path -Parent (Get-ItemProperty $regPath "UninstallString").UninstallString
$version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion
[Environment]::SetEnvironmentVariable("RABBITMQ_HOME", "$path\rabbitmq_server-$version", "Machine")
$env:RABBITMQ_HOME = "$path\rabbitmq_server-$version"
[Environment]::SetEnvironmentVariable("RABBITMQ_RABBITMQCTL_PATH", "$path\rabbitmq_server-$version\sbin\rabbitmqctl.bat", "Machine")
$env:RABBITMQ_RABBITMQCTL_PATH = "$path\rabbitmq_server-$version\sbin\rabbitmqctl.bat"

before_build:
- ps: .\tools\appveyor\install.ps1

build_script:
- cmd: .\build.bat
- cmd: .\run-test.bat
- ps: |
$suffix = Get-Date -format "yyyyMMddhhss"
Write-Host $suffix
dotnet pack "projects\client\RabbitMQ.Client" -c Release --version-suffix=ci-$suffix

test: off

after_build:

artifacts:
- path: '*.nupkg'
- path: 'projects\client\RabbitMQ.Client\bin\Release\*.nupkg'
- path: '*.log'
name: Logs
- cmd: .\build.bat

deploy: off
test_script:
- cmd: .\run-test.bat

nuget:
account_feed: true
project_feed: true
disable_publish_on_pr: true

branches:
only:
- master
- stable
- master
- stable
1 change: 0 additions & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ let appRefs =
let main =
!! "./projects/client/RabbitMQ.Client/**/*.csproj"
++ "./projects/client/Unit/**/*.csproj"
++ "./projects/wcf/**/*.csproj"
match buildEnv with
| Windows8Plus | AppVeyor ->
!! "./projects/**/*.csproj"
Expand Down
17 changes: 0 additions & 17 deletions dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ NAME=rabbitmq-dotnet-client
NAME_VSN=$NAME-$RABBIT_VSN
RELEASE_DIR=release
if [ "$MONO_DIST" ] ; then
INCLUDE_WCF=true
BUILD=build.sh
DOTNET_PROGRAM_PREPEND="mono"
else
INCLUDE_WCF=true
BUILD=build.bat
DOTNET_PROGRAM_PREPEND=
fi
Expand Down Expand Up @@ -129,17 +127,6 @@ function dist-zips {
$NAME_VSN-tmp-xmldoc.zip \
projects/client/RabbitMQ.Client \
../../..

if [ -z "$MONO_DIST" ]; then
### HTML documentation for the WCF bindings library dist
gendoc-dist \
build/bin/RabbitMQ.ServiceModel.xml \
$NAME_VSN-wcf-htmldoc.zip \
"" \
"" \
projects/wcf/RabbitMQ.ServiceModel \
../../..
fi
}


Expand Down Expand Up @@ -182,9 +169,6 @@ function src-dist {

function dist-target-framework {
TARGET_FRAMEWORK="$1"
BUILD_WCF=
test -z "$MONO_DIST" && BUILD_WCF="true"


mkdir -p tmp/dist/bin

Expand All @@ -207,7 +191,6 @@ function dist-target-framework {
### Copy bin files to be zipped to tmp/dist/
cp projects/client/RabbitMQ.Client/build/bin/RabbitMQ.Client.xml tmp/dist/bin/
cp projects/client/RabbitMQ.Client/build/bin/RabbitMQ.Client.dll tmp/dist/bin/
test "$BUILD_WCF" && cp projects/wcf/RabbitMQ.ServiceModel/build/bin/RabbitMQ.ServiceModel.dll tmp/dist/bin/
cp-license-to tmp/dist/

### Zip tmp/dist
Expand Down
9 changes: 4 additions & 5 deletions run-test.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@ECHO OFF

@echo off
dotnet restore .\projects\client\RabbitMQ.Client || exit /b
dotnet build .\projects\client\RabbitMQ.Client -f netstandard1.5 || exit /b
dotnet restore .\projects\client\Unit || exit /b
dotnet build .\projects\client\Unit || exit /b
CD .\projects\client\Unit
dotnet test -f netcoreapp2.0 --where="cat != RequireSMP & cat != LongRunning & cat != GCTest"
CD ..\..\..
cd .\projects\client\Unit
dotnet test -f netcoreapp2.0 --filter="testcategory != requiresmp & testcategory != longrunning & testcategory != gctest"
cd ..\..\..
116 changes: 116 additions & 0 deletions tools/appveyor/install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0

[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 'Tls12'

$rabbitmq_installer_download_url = 'https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.4/rabbitmq-server-3.7.4.exe'
$rabbitmq_installer_path = Join-Path -Path $HOME -ChildPath 'rabbitmq-server-3.7.4.exe'

$erlang_reg_path = 'HKLM:\SOFTWARE\Ericsson\Erlang'
if (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\')
{
$erlang_reg_path = 'HKLM:\SOFTWARE\WOW6432Node\Ericsson\Erlang'
}
$erlang_erts_version = Get-ChildItem -Path $erlang_reg_path -Name
$erlang_home = (Get-ItemProperty -LiteralPath $erlang_reg_path\$erlang_erts_version).'(default)'

$env:ERLANG_HOME = $erlang_home
[Environment]::SetEnvironmentVariable('ERLANG_HOME', $erlang_home, 'Machine')

Write-Host '[INFO] Downloading RabbitMQ'

if (-Not (Test-Path $rabbitmq_installer_path))
{
Invoke-WebRequest -UseBasicParsing -Uri $rabbitmq_installer_download_url -OutFile $rabbitmq_installer_path
}
else
{
Write-Host "[INFO] Found $rabbitmq_installer_path in cache."
}

Write-Host '[INFO] Creating Erlang cookie files'

function Set-ErlangCookie {
Param($Path, $Value = 'RABBITMQ-COOKIE')
Remove-Item -Force $Path -ErrorAction SilentlyContinue
[System.IO.File]::WriteAllText($Path, $Value, [System.Text.Encoding]::ASCII)
}

$erlang_cookie_user = Join-Path -Path $HOME -ChildPath '.erlang.cookie'
$erlang_cookie_system = Join-Path -Path $env:SystemRoot -ChildPath 'System32\config\systemprofile\.erlang.cookie'

Set-ErlangCookie -Path $erlang_cookie_user
Set-ErlangCookie -Path $erlang_cookie_system

Write-Host '[INFO] Installing and starting RabbitMQ with default config'

& $rabbitmq_installer_path '/S' | Out-Null
(Get-Service -Name RabbitMQ).Status

Write-Host '[INFO] Setting RABBITMQ_RABBITMQCTL_PATH'

$regPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ'
if (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\')
{
$regPath = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ'
}
$path = Split-Path -Parent (Get-ItemProperty $regPath 'UninstallString').UninstallString
$rabbitmq_version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion

$rabbitmq_home = "$path\rabbitmq_server-$rabbitmq_version"
[Environment]::SetEnvironmentVariable('RABBITMQ_HOME', $rabbitmq_home, 'Machine')
$env:RABBITMQ_HOME = $rabbitmq_home

$rabbitmqctl_path = "$path\rabbitmq_server-$rabbitmq_version\sbin\rabbitmqctl.bat"
[Environment]::SetEnvironmentVariable('RABBITMQ_RABBITMQCTL_PATH', $rabbitmqctl_path, 'Machine')
$env:RABBITMQ_RABBITMQCTL_PATH = $rabbitmqctl_path

Write-Host '[INFO] Waiting for epmd to report that RabbitMQ has started'

$epmd_running = $false
[int]$count = 1

$epmd = [System.IO.Path]::Combine($erlang_home, "erts-$erlang_erts_version", "bin", "epmd.exe")

Do {
$epmd_running = & $epmd -names | Select-String -CaseSensitive -SimpleMatch -Quiet -Pattern 'name rabbit at port 25672'
if ($epmd_running -eq $true) {
Write-Host '[INFO] epmd reports that RabbitMQ is at port 25672'
break
}

if ($count -gt 60) {
throw '[ERROR] too many tries waiting for epmd to report RabbitMQ on port 25672'
}

Write-Host "[INFO] epmd NOT reporting yet that RabbitMQ is at port 25672, count: $count"
$count = $count + 1
Start-Sleep -Seconds 5

} While ($true)

[int]$count = 1

Do {
$proc_id = (Get-Process -Name erl).Id
if (-Not ($proc_id -is [array])) {
& $rabbitmqctl_path wait -t 300000 -P $proc_id
if ($LASTEXITCODE -ne 0) {
throw "[ERROR] rabbitmqctl wait returned error: $LASTEXITCODE"
}
break
}

if ($count -gt 120) {
throw '[ERROR] too many tries waiting for just one erl process to be running'
}

Write-Host '[INFO] multiple erl instances running still'
$count = $count + 1
Start-Sleep -Seconds 5

} While ($true)

Write-Host '[INFO] Getting RabbitMQ status'
& $rabbitmqctl_path status
13 changes: 3 additions & 10 deletions tools/check-distribution
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ done
NET11ZIP=$(ls rabbitmq-dotnet-*-net-1.1.zip)
NET20ZIP=$(ls rabbitmq-dotnet-*-net-2.0.zip)
COREDOCZIP=$(ls rabbitmq-dotnet-*-net-2.0-htmldoc.zip)
WCFDOCZIP=$(ls rabbitmq-dotnet-*-net-2.0-wcf-htmldoc.zip)
SRCZIP=$(ls rabbitmq-dotnet-*.zip | grep -v '.*-net-')

if [ $(echo $NET11ZIP | wc -w) != 1 ]; then
Expand All @@ -133,10 +132,6 @@ if [ $(echo $COREDOCZIP | wc -w) != 1 ]; then
echo Expected exactly one core documentation zip.
exit 2
fi
if [ $(echo $WCFDOCZIP | wc -w) != 1 ]; then
echo Expected exactly one WCF documentation zip.
exit 2
fi
if [ $(echo $SRCZIP | wc -w) != 1 ]; then
echo Expected exactly one source zip.
exit 2
Expand All @@ -162,14 +157,13 @@ if ! mkdir $TMPDIRNAME 2>/dev/null; then
exit 3
fi

cp $NET11ZIP $NET20ZIP $COREDOCZIP $WCFDOCZIP $SRCZIP $TMPDIRNAME
cp $NET11ZIP $NET20ZIP $COREDOCZIP $SRCZIP $TMPDIRNAME
cp bundle/user-guide.pdf $TMPDIRNAME/rabbitmq-dotnet-$BUILD_TAG-user-guide.pdf
cp bundle/api-guide.pdf $TMPDIRNAME/rabbitmq-dotnet-$BUILD_TAG-api-guide.pdf
cp bundle/"RabbitMQ Service Model.pdf" $TMPDIRNAME/rabbitmq-dotnet-$BUILD_TAG-wcf-service-model.pdf

if [ "x$SIGNING_KEY" != "x" ]; then
echo "Signing zips with SIGNING_KEY $SIGNING_KEY"
for z in $NET11ZIP $NET20ZIP $COREDOCZIP $WCFDOCZIP $SRCZIP; do
for z in $NET11ZIP $NET20ZIP $COREDOCZIP $SRCZIP; do
if ! (HOME=$GNUPG_PATH gpg \
--default-key $SIGNING_KEY \
-abs \
Expand All @@ -192,10 +186,9 @@ mkdir -p $UPLOAD_ROOT/releases/source
mkdir -p $UPLOAD_ROOT/releases/doc/rabbitmq-dotnet-$RELEASE_TAG
mv $NET11ZIP $NET11ZIP.asc $NET20ZIP $NET20ZIP.asc $UPLOAD_ROOT/releases/binary
mv $SRCZIP $SRCZIP.asc $UPLOAD_ROOT/releases/source
mv *.pdf $COREDOCZIP $COREDOCZIP.asc $WCFDOCZIP $WCFDOCZIP.asc $UPLOAD_ROOT/releases/doc/rabbitmq-dotnet-$RELEASE_TAG
mv *.pdf $COREDOCZIP $COREDOCZIP.asc $UPLOAD_ROOT/releases/doc/rabbitmq-dotnet-$RELEASE_TAG
cd $UPLOAD_ROOT/releases/doc/rabbitmq-dotnet-$RELEASE_TAG
unzip -q $COREDOCZIP
unzip -q $WCFDOCZIP
cd /tmp
rm $TMPDIRNAME/installfiles
rmdir $TMPDIRNAME
Expand Down