Skip to content

NH-3807 - Support for .NET Core 2.0 - CI Version #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
22165b0
Eliminate usage of protected field uniqueKeyPropertyName.
ngbrown Dec 28, 2017
73868e1
Don't throw then catch exception in Component if no componentClassNam…
ngbrown Dec 8, 2017
629340b
Implement helpers to serialize system types in preparation for .NET C…
ngbrown Nov 5, 2017
c0ac1e4
Serialize system types in preparation for .NET Core.
ngbrown Nov 4, 2017
e132813
NH-4008 - Move MsSql constants from driver to dialect.
ngbrown Oct 11, 2017
6619d67
NH-4008 - Fix description of DB2400Driver.
ngbrown Oct 10, 2017
ea2c6d4
NH-4008 - Driver code formatting tweaks.
ngbrown Oct 16, 2017
21da886
NH-4008 - Centralize all driver detection for tests.
ngbrown Oct 11, 2017
59ac0f4
NH-4008 - Add separate driver projects for NuGet dependencies.
ngbrown Dec 8, 2017
6cdb111
NH-4008 - Enable separate drivers for tests.
ngbrown Nov 9, 2017
e4a332f
NH-4008 - document driver changes.
fredericDelaporte Dec 10, 2017
6b6371b
Merge remote-tracking branch 'origin/feature/no-reflection-serializat…
ngbrown Jan 26, 2018
fe17917
Merge remote-tracking branch 'origin/NH-4008' into NH-3807
ngbrown Jan 26, 2018
18988aa
NH-3807 - Replace Is.BinarySerializable usage.
ngbrown Dec 29, 2017
d83ab6a
NH-3807 - Replace Is.IsXmlSerializable usage.
ngbrown Dec 29, 2017
7223acc
NH-3807 - Report RuntimeFramework in Example web project.
ngbrown Dec 29, 2017
aa5638b
ReSharper DotSettings migrated to new version.
ngbrown Dec 29, 2017
92cacd4
NH-3807 - .netstandard 2.0 project
ngbrown Jan 3, 2018
28d69e6
NH-3807 - Test projects weren't showing up under .NETCoreApp in ReSha…
ngbrown Jan 3, 2018
0670a96
NH-3807 - Check that enlisted transactions were disposed
ngbrown Jan 3, 2018
ef1ee6a
NH-3807 - Ignore tests that don't work with distributed transactions …
ngbrown Jul 16, 2017
1b283dd
NH-3807 - Configure Log4Net for tests independently of any app.config.
ngbrown Jan 3, 2018
f603ccd
NH-3807 - Handle new overloads of String.Trim*() in .NET Core 2.0.
ngbrown Jul 22, 2017
9d9bd33
NH-3807 - Specify connection string instead of lookup name.
ngbrown Jan 4, 2018
cdfce3c
NH-3807 - No SetApartmentState in Linux
ngbrown Jan 26, 2018
1e67d0a
NH-3807 - Develop AppVeyor and CircleCI builds.
ngbrown Oct 6, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
137 changes: 137 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# CircleCI 2.0 configuration file
---
# Common primary image
ref-base-image: &ref-base-image
image: ngbrown/nhibernate-build-dotnet-sdk:latest
environment:
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- CAKE_VERSION: 0.21.1

# Download and cache dependencies
ref-restore-cache: &ref-restore-cache
restore_cache:
keys:
- cake-{{ .Environment.CAKE_VERSION }}

ref-save-cache: &ref-save-cache
save_cache:
key: cake-{{ .Environment.CAKE_VERSION }}
paths:
- ~/project/tools

version: 2
jobs:
test-mssql:
docker:
- *ref-base-image

- image: microsoft/mssql-server-linux:2017-latest
environment:
- ACCEPT_EULA: Y
- SA_PASSWORD: Password12!

working_directory: ~/project

steps:
- checkout

# Download and cache dependencies
- *ref-restore-cache
- run: ./build.sh --target Restore
- *ref-save-cache

# compile and run tests.
- run:
name: Test on Microsoft SQL Server 2017 for Linux
environment:
- NHIBERNATE_DATABASE_TEMPLATE: MSSQL.cfg.xml
- NHIBERNATE_CONNECTION_STRING: Server=(local);Database=master;User ID=sa;Password=Password12!
- NHIBERNATE_DIALECT: NHibernate.Dialect.MsSql2012Dialect
- DOTNET_FRAMEWORK: netcoreapp2.0
- TARGET_PLATFORM: x64
command: ./build.sh --target CircleCI --configuration Debug

- store_test_results:
path: ~/test-reports
- store_artifacts:
path: ~/test-reports

test-postgresql:
docker:
- *ref-base-image

- image: postgres:9.6-alpine
environment:
- POSTGRES_PASSWORD: Password12!
command: ["postgres", "-c", "max_prepared_transactions=100"]

working_directory: ~/project

steps:
- checkout

# Download and cache dependencies
- *ref-restore-cache
- run: ./build.sh --target Restore
- *ref-save-cache

# compile and run tests.
- run:
name: Test on PostgreSQL 9.6 for Linux
environment:
- NHIBERNATE_DATABASE_TEMPLATE: PostgreSQL.cfg.xml
- NHIBERNATE_CONNECTION_STRING: Server=localhost;Port=5432;Database=nhibernate;User ID=postgres;Password=Password12!;Enlist=true;
- NHIBERNATE_DIALECT: NHibernate.Dialect.PostgreSQL83Dialect
- DOTNET_FRAMEWORK: netcoreapp2.0
- TARGET_PLATFORM: x64
command: ./build.sh --target CircleCI --configuration Debug

- store_test_results:
path: ~/test-reports
- store_artifacts:
path: ~/test-reports

test-firebird:
docker:
- *ref-base-image

- image: ngbrown/nhibernate-build-firebird
environment:
- ISC_PASSWORD: Password12!
FIREBIRD_USER: nhibernate
FIREBIRD_PASSWORD: Password12!
FIREBIRD_DATABASE: nhibernate

working_directory: ~/project

steps:
- checkout

# Download and cache dependencies
- *ref-restore-cache
- run: ./build.sh --target Restore
- *ref-save-cache

# compile and run tests.
- run:
name: Test on Firebird 3.0 for Linux
environment:
- NHIBERNATE_DATABASE_TEMPLATE: FireBird.cfg.xml
- NHIBERNATE_CONNECTION_STRING: DataSource=localhost;Database=nhibernate;User ID=SYSDBA;Password=Password12!;MaxPoolSize=200;
- NHIBERNATE_DIALECT: NHibernate.Dialect.FirebirdDialect
- DOTNET_FRAMEWORK: netcoreapp2.0
- TARGET_PLATFORM: x64
command: ./build.sh --target CircleCI --configuration Debug

- store_test_results:
path: ~/test-reports
- store_artifacts:
path: ~/test-reports

workflows:
version: 2
build:
jobs:
- test-mssql
- test-postgresql
- test-firebird
50 changes: 50 additions & 0 deletions .circleci/images/nhibernate-build-dotnet-sdk/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM buildpack-deps:jessie-scm

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
unzip \
libc6 \
libcurl3 \
libgcc1 \
libgssapi-krb5-2 \
libicu52 \
liblttng-ust0 \
libssl1.0.0 \
libstdc++6 \
libunwind8 \
libuuid1 \
zlib1g \
&& rm -rf /var/lib/apt/lists/*

# Install .NET Core runtime - https://github.com/dotnet/dotnet-docker/blob/master/1.0/runtime/jessie/Dockerfile
ENV DOTNET_VERSION 1.0.5
ENV DOTNET_DOWNLOAD_SHA 55481b0254a72d8c342ba6ccca3908ffb5c99d7eeb54f83dec6cc93c6b4cc3ae
ENV DOTNET_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-debian-x64.$DOTNET_VERSION.tar.gz

RUN curl -SL $DOTNET_DOWNLOAD_URL --output dotnet.tar.gz \
&& echo "$DOTNET_DOWNLOAD_SHA dotnet.tar.gz" | sha256sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
&& rm dotnet.tar.gz

# Install .NET Core SDK - https://github.com/dotnet/dotnet-docker/blob/master/2.0/sdk/jessie/amd64/Dockerfile
ENV DOTNET_SDK_VERSION 2.0.0
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz
ENV DOTNET_SDK_DOWNLOAD_SHA E457F3A5685382F7F24851A2E76EDBE75B575948C8A7F43220F159BA29C329A5008BBE7220C18DFB31EAF0398FC72177B1948B65E19B34ED0D907EFB459CF4B0

RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \
&& echo "$DOTNET_SDK_DOWNLOAD_SHA dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
&& rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet

# Trigger the population of the local package cache
ENV NUGET_XMLDOC_MODE skip
RUN mkdir warmup \
&& cd warmup \
&& dotnet new \
&& cd .. \
&& rm -rf warmup \
&& rm -rf /tmp/NuGetScratch
25 changes: 25 additions & 0 deletions .circleci/images/nhibernate-build-firebird/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM debian:jessie

ENV PREFIX=/usr/local/firebird
ENV DEBIAN_FRONTEND noninteractive
ENV FBURL=http://downloads.sourceforge.net/project/firebird/firebird/3.0.2-Release/Firebird-3.0.2.32703-0.tar.bz2
ENV DBPATH=/databases

ADD build.sh ./build.sh

RUN chmod +x ./build.sh && \
sync && \
./build.sh && \
rm -f ./build.sh

VOLUME ["/databases", "/var/firebird/run", "/var/firebird/etc", "/var/firebird/log", "/var/firebird/system", "/tmp/firebird"]

EXPOSE 3050/tcp

ADD docker-entrypoint.sh ${PREFIX}/docker-entrypoint.sh
RUN chmod +x ${PREFIX}/docker-entrypoint.sh

ADD docker-entrypoint-async.sh ${PREFIX}/docker-entrypoint-async.sh
RUN chmod +x ${PREFIX}/docker-entrypoint-async.sh

ENTRYPOINT ${PREFIX}/docker-entrypoint-async.sh ${PREFIX}/bin/fbguard
67 changes: 67 additions & 0 deletions .circleci/images/nhibernate-build-firebird/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# docker Firebird

## Default password for `sysdba`
The default password for `sysdba` is randomly generated when you first launch the container,
look in the docker log for your container or pull /var/firebird/etc/SYSDBA.password.
Alternatively you may pass the environment variable ISC_PASSWORD to set the default password.

## Description
This is a Firebird SQL Database container.

## Default Login information
Username: SYSDBA
Password is either set by `ISC_PASSWORD` or randomized

## Environment Variables:
### `TZ`
TimeZone. (i.e. America/Chicago)

### `ISC_PASSWORD`
Default `sysdba` user password, if left blank a random 20 character password will be set instead.
The password used will be placed in /var/firebird/etc/SYSDBA.password.
If a random password is generated then it will be in the log for the container.

### `FIREBIRD_DATABASE`
If this is set then a database will be created with this name under the `/databases` volume with the 'UTF8'
default character set and if `FIREBIRD_USER` is also set then `FIREBIRD_USER` will be given ownership.

### `FIREBIRD_USER`
This user will be created and given ownership of `FIREBIRD_DATABASE`.
This variable is only used if `FIREBIRD_DATABASE` is also set.

### `FIREBIRD_PASSWORD`
The password for `FIREBIRD_USER`, if left blank a random 20 character password will be set instead.
If a random password is generated then it will be in the log for the container.

### `<VARIABLE>_FILE`
If set to the path to a file then the named variable minus the _FILE portion will contain the contents of that file.
This is useful for using docker secrets to manage your password.
This applies to all variables except `TZ`

## Volumes:

### `/databases/`
Default location to put database files

### `/var/firebird/run`
guardian lock DIR

### `/var/firebird/etc`
config files DIR
message files DIR

### `/var/firebird/log`
log files DIR

### `/var/firebird/system`
security database DIR

### `/tmp/firebird`
Database lock directory

## Exposes:
### 3050/tcp

## Events
Please note for events to work properly you must either configure RemoteAuxPort and forward it with -p using a direct mapping where both sides internal and external use the same port or use --net=host to allow the random port mapping to work.
see: http://www.firebirdfaq.org/faq53/ for more information on event port mapping.
64 changes: 64 additions & 0 deletions .circleci/images/nhibernate-build-firebird/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash
set -e
CPUC=$(awk '/^processor/{n+=1}END{print n}' /proc/cpuinfo)

apt-get update
apt-get install -qy --no-install-recommends \
libicu52 \
libtommath0
apt-get install -qy --no-install-recommends \
bzip2 \
ca-certificates \
curl \
g++ \
gcc \
libicu-dev \
libncurses5-dev \
libtommath-dev \
make \
zlib1g-dev
mkdir -p /home/firebird
cd /home/firebird
curl -o firebird-source.tar.bz2 -L \
"${FBURL}"
tar --strip=1 -xf firebird-source.tar.bz2
./configure \
--prefix=${PREFIX}/ --with-fbbin=${PREFIX}/bin/ --with-fbsbin=${PREFIX}/bin/ --with-fblib=${PREFIX}/lib/ \
--with-fbinclude=${PREFIX}/include/ --with-fbdoc=${PREFIX}/doc/ --with-fbudf=${PREFIX}/UDF/ \
--with-fbsample=${PREFIX}/examples/ --with-fbsample-db=${PREFIX}/examples/empbuild/ --with-fbhelp=${PREFIX}/help/ \
--with-fbintl=${PREFIX}/intl/ --with-fbmisc=${PREFIX}/misc/ --with-fbplugins=${PREFIX}/ \
--with-fbconf=/var/firebird/etc/ --with-fbmsg=${PREFIX}/ \
--with-fblog=/var/firebird/log/ --with-fbglock=/var/firebird/run/ \
--with-fbsecure-db=/var/firebird/system
make -j${CPUC}
make silent_install
cd /
rm -rf /home/firebird
find ${PREFIX} -name .debug -prune -exec rm -rf {} \;
apt-get purge -qy --auto-remove \
bzip2 \
ca-certificates \
curl \
g++ \
gcc \
libicu-dev \
libncurses5-dev \
libtommath-dev \
make \
zlib1g-dev
rm -rf /var/lib/apt/lists/*

# This allows us to initialize a random value for sysdba password
mv /var/firebird/system/security3.fdb ${PREFIX}/security3.fdb

sed -i 's/^#DatabaseAccess/DatabaseAccess/g' /var/firebird/etc/firebird.conf
sed -i "s~^\(DatabaseAccess\s*=\s*\).*$~\1Restrict ${DBPATH}~" /var/firebird/etc/firebird.conf

# Enable non-secured ADO.NET connector to connect.
echo $'WireCrypt = Enabled
AuthServer = Srp
AuthClient = Srp
UserManager = Srp
'\
>> /var/firebird/etc/firebird.conf

Loading