Skip to content

Commit 571203f

Browse files
committed
Remove traces of old RabbitMQ.ServiceModel project
Move Erlang and RMQ installation to one script Erlang is already installed on AppVeyor now
1 parent 55355a6 commit 571203f

File tree

8 files changed

+136
-79
lines changed

8 files changed

+136
-79
lines changed

Dist-dotnet-4.5.props.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<PropUsingMono>@USINGMONO@</PropUsingMono>
66
<PropLaunchExe Condition="'$(PropUsingMono)' == 'true'">mono </PropLaunchExe>
77
<PropBuildWinRT>@BUILDWINRT@</PropBuildWinRT>
8-
<PropBuildWcf Condition="'$(PropUsingMono)' != 'true'">true</PropBuildWcf>
98
<PropAssemblyVersion>@VERSION@</PropAssemblyVersion>
109
<PropKeyfile>$(MSBuildProjectDirectory)\..\..\..\@KEYFILE@</PropKeyfile>
1110
</PropertyGroup>

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ ensure-deliverables: rabbit-vsn
3232
file ${RELEASE_DIR}/${NAME_VSN}-client-htmldoc.zip
3333
file ${RELEASE_DIR}/${NAME_VSN}-client-htmldoc
3434
file ${RELEASE_DIR}/${NAME_VSN}-dotnet-4.5.zip
35-
file ${RELEASE_DIR}/${NAME_VSN}-wcf-htmldoc.zip
36-
file ${RELEASE_DIR}/${NAME_VSN}-wcf-htmldoc
3735

3836
ensure-release-dir: rabbit-vsn
3937
touch ${RELEASE_DIR}/
@@ -49,9 +47,7 @@ doc: rabbit-vsn ensure-release-dir ensure-docs
4947
unzip -q -j ${RELEASE_DIR}/${NAME_VSN}-tmp-xmldoc.zip -d build/tmpdoc/xml
5048
cd ${RELEASE_DIR} && \
5149
rm -rf ${NAME_VSN}-htmldoc && \
52-
unzip -q ${NAME_VSN}-client-htmldoc.zip -d ${NAME_VSN}-client-htmldoc && \
53-
rm -rf ${NAME_VSN}-wcf-htmldoc && \
54-
unzip -q ${NAME_VSN}-wcf-htmldoc.zip -d ${NAME_VSN}-wcf-htmldoc
50+
unzip -q ${NAME_VSN}-client-htmldoc.zip -d ${NAME_VSN}-client-htmldoc
5551

5652
clean:
5753
rm -rf $(GENSRC_DIR) $(RELEASE_DIR)/*

appveyor.yml

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,37 @@
1-
version: "4.1.0.{build}"
1+
version: "5.1.0.{build}"
22

33
platform: Any CPU
44
configuration: Release
55
skip_tags: true
6+
image: Visual Studio 2017
67

78
environment:
89
BUILDWINRT: true
910
USINGMONO: false
1011
SNKSECRET:
1112
secure: C8FL0UTKVN8YcMW1wdssabbkSWMIrpJTqgUNeI2NfQw=
1213

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

2119
install:
2220
- IF DEFINED SNKSECRET (nuget install secure-file -ExcludeVersion)
2321
- 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)
2422
- IF NOT DEFINED SNKSECRET (copy "rabbit.snk.prbuilds" "rabbit.snk") ELSE (ECHO Using The Release Key File)
25-
- ps: |
26-
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
27-
if (Test-Path "HKLM:\SOFTWARE\Wow6432Node\") { $regPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" }
28-
$path = Split-Path -Parent (Get-ItemProperty $regPath "UninstallString").UninstallString
29-
$version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion
30-
[Environment]::SetEnvironmentVariable("RABBITMQ_HOME", "$path\rabbitmq_server-$version", "Machine")
31-
$env:RABBITMQ_HOME = "$path\rabbitmq_server-$version"
32-
[Environment]::SetEnvironmentVariable("RABBITMQ_RABBITMQCTL_PATH", "$path\rabbitmq_server-$version\sbin\rabbitmqctl.bat", "Machine")
33-
$env:RABBITMQ_RABBITMQCTL_PATH = "$path\rabbitmq_server-$version\sbin\rabbitmqctl.bat"
34-
35-
before_build:
23+
- ps: .\tools\appveyor\install.ps1
3624

3725
build_script:
38-
- cmd: .\build.bat
39-
- cmd: .\run-test.bat
40-
- ps: |
41-
$suffix = Get-Date -format "yyyyMMddhhss"
42-
Write-Host $suffix
43-
dotnet pack "projects\client\RabbitMQ.Client" -c Release --version-suffix=ci-$suffix
44-
45-
test: off
46-
47-
after_build:
48-
49-
artifacts:
50-
- path: '*.nupkg'
51-
- path: 'projects\client\RabbitMQ.Client\bin\Release\*.nupkg'
52-
- path: '*.log'
53-
name: Logs
26+
- cmd: .\build.bat
5427

55-
deploy: off
28+
test_script:
29+
- cmd: .\run-test.bat
5630

5731
nuget:
58-
account_feed: true
59-
project_feed: true
6032
disable_publish_on_pr: true
6133

6234
branches:
6335
only:
64-
- master
65-
- stable
36+
- master
37+
- stable

build.fsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ let appRefs =
9797
let main =
9898
!! "./projects/client/RabbitMQ.Client/**/*.csproj"
9999
++ "./projects/client/Unit/**/*.csproj"
100-
++ "./projects/wcf/**/*.csproj"
101100
match buildEnv with
102101
| Windows8Plus | AppVeyor ->
103102
!! "./projects/**/*.csproj"

dist.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,9 @@ NAME=rabbitmq-dotnet-client
7171
NAME_VSN=$NAME-$RABBIT_VSN
7272
RELEASE_DIR=release
7373
if [ "$MONO_DIST" ] ; then
74-
INCLUDE_WCF=true
7574
BUILD=build.sh
7675
DOTNET_PROGRAM_PREPEND="mono"
7776
else
78-
INCLUDE_WCF=true
7977
BUILD=build.bat
8078
DOTNET_PROGRAM_PREPEND=
8179
fi
@@ -129,17 +127,6 @@ function dist-zips {
129127
$NAME_VSN-tmp-xmldoc.zip \
130128
projects/client/RabbitMQ.Client \
131129
../../..
132-
133-
if [ -z "$MONO_DIST" ]; then
134-
### HTML documentation for the WCF bindings library dist
135-
gendoc-dist \
136-
build/bin/RabbitMQ.ServiceModel.xml \
137-
$NAME_VSN-wcf-htmldoc.zip \
138-
"" \
139-
"" \
140-
projects/wcf/RabbitMQ.ServiceModel \
141-
../../..
142-
fi
143130
}
144131

145132

@@ -182,9 +169,6 @@ function src-dist {
182169

183170
function dist-target-framework {
184171
TARGET_FRAMEWORK="$1"
185-
BUILD_WCF=
186-
test -z "$MONO_DIST" && BUILD_WCF="true"
187-
188172

189173
mkdir -p tmp/dist/bin
190174

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

213196
### Zip tmp/dist

run-test.bat

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
@ECHO OFF
2-
1+
@echo off
32
dotnet restore .\projects\client\RabbitMQ.Client || exit /b
43
dotnet build .\projects\client\RabbitMQ.Client -f netstandard1.5 || exit /b
54
dotnet restore .\projects\client\Unit || exit /b
65
dotnet build .\projects\client\Unit || exit /b
7-
CD .\projects\client\Unit
8-
dotnet test -f netcoreapp2.0 --where="cat != RequireSMP & cat != LongRunning & cat != GCTest"
9-
CD ..\..\..
6+
cd .\projects\client\Unit
7+
dotnet test -f netcoreapp2.0 --filter="testcategory != requiresmp & testcategory != longrunning & testcategory != gctest"
8+
cd ..\..\..

tools/appveyor/install.ps1

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
$ProgressPreference = 'SilentlyContinue'
2+
$ErrorActionPreference = 'Stop'
3+
Set-StrictMode -Version 2.0
4+
5+
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 'Tls12'
6+
7+
$rabbitmq_installer_download_url = 'https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.4/rabbitmq-server-3.7.4.exe'
8+
$rabbitmq_installer_path = Join-Path -Path $HOME -ChildPath 'rabbitmq-server-3.7.4.exe'
9+
10+
$erlang_reg_path = 'HKLM:\SOFTWARE\Ericsson\Erlang'
11+
if (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\')
12+
{
13+
$erlang_reg_path = 'HKLM:\SOFTWARE\WOW6432Node\Ericsson\Erlang'
14+
}
15+
$erlang_erts_version = Get-ChildItem -Path $erlang_reg_path -Name
16+
$erlang_home = (Get-ItemProperty -LiteralPath $erlang_reg_path\$erlang_erts_version).'(default)'
17+
18+
$env:ERLANG_HOME = $erlang_home
19+
[Environment]::SetEnvironmentVariable('ERLANG_HOME', $erlang_home, 'Machine')
20+
21+
Write-Host '[INFO] Downloading RabbitMQ'
22+
23+
if (-Not (Test-Path $rabbitmq_installer_path))
24+
{
25+
Invoke-WebRequest -UseBasicParsing -Uri $rabbitmq_installer_download_url -OutFile $rabbitmq_installer_path
26+
}
27+
else
28+
{
29+
Write-Host "[INFO] Found $rabbitmq_installer_path in cache."
30+
}
31+
32+
Write-Host '[INFO] Creating Erlang cookie files'
33+
34+
function Set-ErlangCookie {
35+
Param($Path, $Value = 'RABBITMQ-COOKIE')
36+
Remove-Item -Force $Path -ErrorAction SilentlyContinue
37+
[System.IO.File]::WriteAllText($Path, $Value, [System.Text.Encoding]::ASCII)
38+
}
39+
40+
$erlang_cookie_user = Join-Path -Path $HOME -ChildPath '.erlang.cookie'
41+
$erlang_cookie_system = Join-Path -Path $env:SystemRoot -ChildPath 'System32\config\systemprofile\.erlang.cookie'
42+
43+
Set-ErlangCookie -Path $erlang_cookie_user
44+
Set-ErlangCookie -Path $erlang_cookie_system
45+
46+
Write-Host '[INFO] Installing and starting RabbitMQ with default config'
47+
48+
& $rabbitmq_installer_path '/S' | Out-Null
49+
(Get-Service -Name RabbitMQ).Status
50+
51+
Write-Host '[INFO] Setting RABBITMQ_RABBITMQCTL_PATH'
52+
53+
$regPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ'
54+
if (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\')
55+
{
56+
$regPath = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ'
57+
}
58+
$path = Split-Path -Parent (Get-ItemProperty $regPath 'UninstallString').UninstallString
59+
$rabbitmq_version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion
60+
61+
$rabbitmq_home = "$path\rabbitmq_server-$rabbitmq_version"
62+
[Environment]::SetEnvironmentVariable('RABBITMQ_HOME', $rabbitmq_home, 'Machine')
63+
$env:RABBITMQ_HOME = $rabbitmq_home
64+
65+
$rabbitmqctl_path = "$path\rabbitmq_server-$rabbitmq_version\sbin\rabbitmqctl.bat"
66+
[Environment]::SetEnvironmentVariable('RABBITMQ_RABBITMQCTL_PATH', $rabbitmqctl_path, 'Machine')
67+
$env:RABBITMQ_RABBITMQCTL_PATH = $rabbitmqctl_path
68+
69+
Write-Host '[INFO] Waiting for epmd to report that RabbitMQ has started'
70+
71+
$epmd_running = $false
72+
[int]$count = 1
73+
74+
$epmd = [System.IO.Path]::Combine($erlang_home, "erts-$erlang_erts_version", "bin", "epmd.exe")
75+
76+
Do {
77+
$epmd_running = & $epmd -names | Select-String -CaseSensitive -SimpleMatch -Quiet -Pattern 'name rabbit at port 25672'
78+
if ($epmd_running -eq $true) {
79+
Write-Host '[INFO] epmd reports that RabbitMQ is at port 25672'
80+
break
81+
}
82+
83+
if ($count -gt 60) {
84+
throw '[ERROR] too many tries waiting for epmd to report RabbitMQ on port 25672'
85+
}
86+
87+
Write-Host "[INFO] epmd NOT reporting yet that RabbitMQ is at port 25672, count: $count"
88+
$count = $count + 1
89+
Start-Sleep -Seconds 5
90+
91+
} While ($true)
92+
93+
[int]$count = 1
94+
95+
Do {
96+
$proc_id = (Get-Process -Name erl).Id
97+
if (-Not ($proc_id -is [array])) {
98+
& $rabbitmqctl_path wait -t 300000 -P $proc_id
99+
if ($LASTEXITCODE -ne 0) {
100+
throw "[ERROR] rabbitmqctl wait returned error: $LASTEXITCODE"
101+
}
102+
break
103+
}
104+
105+
if ($count -gt 120) {
106+
throw '[ERROR] too many tries waiting for just one erl process to be running'
107+
}
108+
109+
Write-Host '[INFO] multiple erl instances running still'
110+
$count = $count + 1
111+
Start-Sleep -Seconds 5
112+
113+
} While ($true)
114+
115+
Write-Host '[INFO] Getting RabbitMQ status'
116+
& $rabbitmqctl_path status

tools/check-distribution

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ done
118118
NET11ZIP=$(ls rabbitmq-dotnet-*-net-1.1.zip)
119119
NET20ZIP=$(ls rabbitmq-dotnet-*-net-2.0.zip)
120120
COREDOCZIP=$(ls rabbitmq-dotnet-*-net-2.0-htmldoc.zip)
121-
WCFDOCZIP=$(ls rabbitmq-dotnet-*-net-2.0-wcf-htmldoc.zip)
122121
SRCZIP=$(ls rabbitmq-dotnet-*.zip | grep -v '.*-net-')
123122

124123
if [ $(echo $NET11ZIP | wc -w) != 1 ]; then
@@ -133,10 +132,6 @@ if [ $(echo $COREDOCZIP | wc -w) != 1 ]; then
133132
echo Expected exactly one core documentation zip.
134133
exit 2
135134
fi
136-
if [ $(echo $WCFDOCZIP | wc -w) != 1 ]; then
137-
echo Expected exactly one WCF documentation zip.
138-
exit 2
139-
fi
140135
if [ $(echo $SRCZIP | wc -w) != 1 ]; then
141136
echo Expected exactly one source zip.
142137
exit 2
@@ -162,14 +157,13 @@ if ! mkdir $TMPDIRNAME 2>/dev/null; then
162157
exit 3
163158
fi
164159

165-
cp $NET11ZIP $NET20ZIP $COREDOCZIP $WCFDOCZIP $SRCZIP $TMPDIRNAME
160+
cp $NET11ZIP $NET20ZIP $COREDOCZIP $SRCZIP $TMPDIRNAME
166161
cp bundle/user-guide.pdf $TMPDIRNAME/rabbitmq-dotnet-$BUILD_TAG-user-guide.pdf
167162
cp bundle/api-guide.pdf $TMPDIRNAME/rabbitmq-dotnet-$BUILD_TAG-api-guide.pdf
168-
cp bundle/"RabbitMQ Service Model.pdf" $TMPDIRNAME/rabbitmq-dotnet-$BUILD_TAG-wcf-service-model.pdf
169163

170164
if [ "x$SIGNING_KEY" != "x" ]; then
171165
echo "Signing zips with SIGNING_KEY $SIGNING_KEY"
172-
for z in $NET11ZIP $NET20ZIP $COREDOCZIP $WCFDOCZIP $SRCZIP; do
166+
for z in $NET11ZIP $NET20ZIP $COREDOCZIP $SRCZIP; do
173167
if ! (HOME=$GNUPG_PATH gpg \
174168
--default-key $SIGNING_KEY \
175169
-abs \
@@ -192,10 +186,9 @@ mkdir -p $UPLOAD_ROOT/releases/source
192186
mkdir -p $UPLOAD_ROOT/releases/doc/rabbitmq-dotnet-$RELEASE_TAG
193187
mv $NET11ZIP $NET11ZIP.asc $NET20ZIP $NET20ZIP.asc $UPLOAD_ROOT/releases/binary
194188
mv $SRCZIP $SRCZIP.asc $UPLOAD_ROOT/releases/source
195-
mv *.pdf $COREDOCZIP $COREDOCZIP.asc $WCFDOCZIP $WCFDOCZIP.asc $UPLOAD_ROOT/releases/doc/rabbitmq-dotnet-$RELEASE_TAG
189+
mv *.pdf $COREDOCZIP $COREDOCZIP.asc $UPLOAD_ROOT/releases/doc/rabbitmq-dotnet-$RELEASE_TAG
196190
cd $UPLOAD_ROOT/releases/doc/rabbitmq-dotnet-$RELEASE_TAG
197191
unzip -q $COREDOCZIP
198-
unzip -q $WCFDOCZIP
199192
cd /tmp
200193
rm $TMPDIRNAME/installfiles
201194
rmdir $TMPDIRNAME

0 commit comments

Comments
 (0)