Skip to content

Commit fd4145f

Browse files
committed
Merge branch 'release/v1.0.2'
2 parents 63c4d89 + 6dff292 commit fd4145f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+531
-167
lines changed

.circleci/config.yml

Lines changed: 5 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3,80 +3,14 @@ jobs:
33
build:
44
parallelism: 4
55
docker:
6-
- image: mcr.microsoft.com/dotnet/core/sdk:3.1.201
6+
- image: circleci/buildpack-deps:buster
77
steps:
88
- checkout
99

10-
- restore_cache:
11-
name: Restore Yarn Package Cache
12-
keys:
13-
- yarn-packages-{{ checksum "src/Return.Web/yarn.lock" }}
10+
- setup_remote_docker
1411

1512
- run:
16-
name: Install Chrome
13+
name: Run docker-compose tests
1714
command: |
18-
apt-get -qqy update
19-
apt-get -qqy install lsb-release libappindicator3-1
20-
curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
21-
apt -y install ./google-chrome.deb
22-
sed -i 's|HERE/chrome"|HERE/chrome" --no-sandbox|g' /opt/google/chrome/google-chrome
23-
rm google-chrome.deb
24-
25-
- run:
26-
name: Install node.js prereqs
27-
command: apt-get -qq update && apt-get -qqy --no-install-recommends install wget gnupg git unzip
28-
29-
- run:
30-
name: Download and install node.js
31-
command: |
32-
curl -sL https://deb.nodesource.com/setup_10.x | bash -
33-
apt-get install --no-install-recommends -y gcc g++ make build-essential nodejs
34-
35-
- run:
36-
name: Install Yarn
37-
command: |
38-
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
39-
echo 'export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"' >> $BASH_ENV
40-
41-
- run:
42-
name: Fix TERM var for CIRCLECI builds
43-
command: |
44-
echo 'export TERM=dumb' >> $BASH_ENV
45-
46-
- run:
47-
name: Workaround GitTools/GitVersion/issues/1852
48-
command: |
49-
dotnet tool install -g GitVersion.Tool --version 5.2.4
50-
echo 'export LD_LIBRARY_PATH=/root/.dotnet/tools/.store/gitversion.tool/5.2.4/gitversion.tool/5.2.4/tools/netcoreapp3.1/any/runtimes/debian.9-x64/native/' >> $BASH_ENV
51-
echo 'export PATH="/root/.dotnet/tools:$PATH"' >> $BASH_ENV
52-
echo 'export PATH="/root/.dotnet/tools:$PATH"' >> $BASH_ENV
53-
54-
- run:
55-
name: Output important software versions
56-
command: |
57-
node --version
58-
yarn --version
59-
dotnet --version
60-
echo $LD_LIBRARY_PATH
61-
62-
- run:
63-
name: Build - restore nuget packages
64-
command: |
65-
./build.sh --target=restore-nuget-packages --verbosity=diagnostic
66-
67-
- run:
68-
name: Build - restore node packages
69-
command: ./build.sh --target=restore-node-packages --verbosity=verbose
70-
71-
- run:
72-
name: Build - test
73-
command: |
74-
export MOZ_HEADLESS=1
75-
export CIRCLECI=1
76-
./build.sh --target=test --verbosity=verbose < /dev/null
77-
78-
- save_cache:
79-
name: Save Yarn Package Cache
80-
key: yarn-packages-{{ checksum "src/Return.Web/yarn.lock" }}
81-
paths:
82-
- ~/.cache/yarn
15+
docker-compose --file docker-compose.test.yml build
16+
docker-compose --file docker-compose.test.yml run sut

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.dotnet/
2+
.store/
3+
tools/
4+
build/
5+
src/**/obj/
6+
src/**/node_modules/
7+
tests/**/obj/

.gitattributes

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
build.sh text eol=lf
2-
build.cake text eol=lf
1+
*.sh text eol=lf
2+
.dockerignore text eol=lf
3+
Dockerfile text eol=lf
4+
build.cake text eol=lf
5+
distscripts/* eol=lf

.github/workflows/continuous-integration-workflow.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
env:
4747
MOZ_HEADLESS: 1
4848
CIRCLECI: 1
49-
run: ${{ matrix.script_name }} --target=test --verbosity=verbose
49+
RETURN_TEST_WAIT_TIME: 30
50+
run: ${{ matrix.script_name }} --target=test --use-code-coverage=false --verbosity=verbose
5051

5152
- name: Upload artifacts
5253
uses: actions/upload-artifact@v1
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build installation packages
2+
on: push
3+
4+
jobs:
5+
build:
6+
name: Build installation packages on ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [windows-2019, ubuntu-16.04]
11+
include:
12+
- os: windows-2019
13+
script_name: .\build.cmd
14+
- os: ubuntu-16.04
15+
script_name: ./build.sh
16+
steps:
17+
- name: checkout
18+
uses: actions/checkout@v1
19+
20+
- name: Download and install node.js
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: '10.x'
24+
25+
- name: Install .NET 3.x SDK for build
26+
uses: actions/setup-dotnet@v1
27+
with:
28+
dotnet-version: '3.1.103'
29+
30+
- name: Restore .NET Core tools
31+
run: dotnet tool restore
32+
33+
- name: Build - restore nuget packages
34+
run: ${{ matrix.script_name }} --target=restore-nuget-packages --verbosity=verbose
35+
36+
- name: Publish
37+
run: ${{ matrix.script_name }} --target=Publish --verbosity=verbose
38+
39+
- name: Upload built packages
40+
uses: actions/upload-artifact@v1
41+
continue-on-error: true
42+
with:
43+
name: installation packages
44+
path: build/publish/ # We upload *everything*, but I'd rather upload just the zip files

Dockerfile

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
### BUILD
2+
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.201 AS build-env
3+
WORKDIR /source
4+
5+
# Prerequisites
6+
COPY utils/* utils/
7+
RUN utils/install-all-prereqs.sh
8+
9+
# ... libgit2sharp debian 10.x support
10+
RUN dotnet tool install -g GitVersion.Tool --version 5.2.4
11+
ENV LD_LIBRARY_PATH=/root/.dotnet/tools/.store/gitversion.tool/5.2.4/gitversion.tool/5.2.4/tools/netcoreapp3.1/any/runtimes/debian.9-x64/native/
12+
13+
# Copy csproj and restore as distinct layers
14+
# ... sources
15+
COPY src/Return.Application/*.csproj src/Return.Application/
16+
COPY src/Return.Common/*.csproj src/Return.Common/
17+
COPY src/Return.Domain/*.csproj src/Return.Domain/
18+
COPY src/Return.Infrastructure/*.csproj src/Return.Infrastructure/
19+
COPY src/Return.Persistence/*.csproj src/Return.Persistence/
20+
COPY src/Return.Web/*.csproj src/Return.Web/
21+
COPY src/Common.props src/
22+
23+
# ... tests
24+
COPY tests/Return.Application.Tests.Unit/*.csproj tests/Return.Application.Tests.Unit/
25+
COPY tests/Return.Domain.Tests.Unit/*.csproj tests/Return.Domain.Tests.Unit/
26+
COPY tests/Return.Web.Tests.Unit/*.csproj tests/Return.Web.Tests.Unit/
27+
COPY tests/Return.Web.Tests.Integration/*.csproj tests/Return.Web.Tests.Integration/
28+
COPY tests/Common.props tests/
29+
30+
COPY *.sln .
31+
COPY dotnet-tools.json .
32+
RUN dotnet restore
33+
RUN dotnet tool restore
34+
35+
# Yarn (although it isn't as large, still worth caching)
36+
COPY src/Return.Web/package.json src/Return.Web/
37+
COPY src/Return.Web/yarn.lock src/Return.Web/
38+
RUN yarn --cwd src/Return.Web/
39+
40+
## Skip build script pre-warm
41+
## This causes later invocations of the build script to fail with "Failed to uninstall tool package 'cake.tool': Invalid cross-device link"
42+
#COPY build.* .
43+
#RUN ./build.sh --target=restore-node-packages
44+
45+
### TEST
46+
FROM build-env AS test
47+
48+
# ... run tests
49+
COPY . .
50+
ENV RETURN_TEST_WAIT_TIME 30
51+
ENV SCREENSHOT_TEST_FAILURE_TOLERANCE True
52+
RUN ./build.sh --target=test
53+
54+
### PUBLISHING
55+
FROM build-env AS publish
56+
57+
# ... run publish
58+
COPY . .
59+
RUN ./build.sh --target=Publish-Ubuntu-18.04-x64 --publish-dir=publish --verbosity=verbose --skip-compression=true
60+
61+
### RUNTIME IMAGE
62+
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1
63+
WORKDIR /app
64+
65+
# ... Run libgdi install
66+
COPY utils/install-app-prereqs.sh utils/
67+
RUN bash utils/install-app-prereqs.sh
68+
69+
# ... Copy published app
70+
COPY --from=publish /source/publish/ubuntu.18.04-x64/ .
71+
72+
ENV ASPNETCORE_ENVIRONMENT Production
73+
74+
# Config directory
75+
VOLUME ["/etc/return-retro"]
76+
77+
# Set some defaults for a "direct run" experience
78+
ENV DATABASE__DATABASE "/app/data.db"
79+
ENV DATABASE__DATABASEPROVIDER Sqlite
80+
81+
# ... enable proxy mode
82+
ENV SECURITY__ENABLEPROXYMODE True
83+
84+
# ... health check
85+
HEALTHCHECK CMD curl --fail http://localhost/health || exit
86+
87+
ENTRYPOINT [ "./launch", "run" ]

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ Retrospective tool built in ASP.NET Core and Blazor
44

55
Licensed: GNU GPL v3.0
66

7-
[![Build status](https://ci.appveyor.com/api/projects/status/7bjrmgtek7j080d7?svg=true)](https://ci.appveyor.com/project/Sebazzz/Return)
8-
[![CircleCI](https://circleci.com/gh/Sebazzz/Return.svg?style=svg)](https://circleci.com/gh/Sebazzz/Return)
9-
[![Github CI](https://github.com/sebazzz/Return/workflows/Continuous%20integration/badge.svg)](https://github.com/Sebazzz/Return/actions?workflow=Continuous+integration)
7+
| | master | develop |
8+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9+
| **AppVeyor CI** | [![Build status](https://ci.appveyor.com/api/projects/status/7bjrmgtek7j080d7/branch/master?svg=true)](https://ci.appveyor.com/project/Sebazzz/Return/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/7bjrmgtek7j080d7/branch/develop?svg=true)](https://ci.appveyor.com/project/Sebazzz/Return/branch/develop) |
10+
| **CircleCI** | [![CircleCI](https://circleci.com/gh/Sebazzz/Return/tree/master.svg?style=shield)](https://circleci.com/gh/Sebazzz/Return/tree/master) | [![CircleCI](https://circleci.com/gh/Sebazzz/Return/tree/develop.svg?style=shield)](https://circleci.com/gh/Sebazzz/Return/tree/develop) |
11+
| **Github actions** | [![Github CI](https://github.com/sebazzz/Return/workflows/Continuous%20integration/badge.svg?branch=master)](https://github.com/Sebazzz/Return/actions?workflow=Continuous+integration&branch=master) | [![Github CI](https://github.com/sebazzz/Return/workflows/Continuous%20integration/badge.svg?branch=develop)](https://github.com/Sebazzz/Return/actions?workflow=Continuous+integration&branch=develop) |
12+
| **Codeconv** | [![codecov](https://codecov.io/gh/Sebazzz/Return/branch/master/graph/badge.svg)](https://codecov.io/gh/Sebazzz/Return) | [![codecov](https://codecov.io/gh/Sebazzz/Return/branch/develop/graph/badge.svg)](https://codecov.io/gh/Sebazzz/Return) |
13+
| **Daily build** | [![Github CI](https://github.com/sebazzz/Return/workflows/Build%20installation%20packages/badge.svg?branch=master)](https://github.com/Sebazzz/Return/actions?workflow=Build+installation+packages&branch=master) | [![Github CI](https://github.com/sebazzz/Return/workflows/Build%20installation%20packages/badge.svg?branch=develop)](https://github.com/Sebazzz/Return/actions?workflow=Build+installation+packages&branch=develop) |
1014

1115
## Features
1216

@@ -29,6 +33,19 @@ Developed and tested on:
2933

3034
## Download
3135

36+
### Docker
37+
38+
Return is available as a docker image. Simply pull it from the Docker hub, and run it:
39+
40+
docker pull sebazzz/return:latest
41+
docker run -p 80:80 sebazzz/return
42+
43+
For further configuration you may want to mount a directory with [the configuration](doc/Installation.md#Configuration):
44+
45+
docker run -p 80:80 -v /path/to/my/configuration/directory:/etc/return-retro sebazzz/return
46+
47+
### Manual installation
48+
3249
Download the release for your OS from the [releases tab](https://github.com/Sebazzz/Return/releases) or download the cutting edge builds from [AppVeyor](https://ci.appveyor.com/project/Sebazzz/Return).
3350

3451
[Follow the installation instructions](doc/Installation.md) in the documentation to install it.

Return.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{D6A25E
4747
.gitignore = .gitignore
4848
.prettierrc = .prettierrc
4949
README.md = README.md
50+
version.json = version.json
5051
EndProjectSection
5152
EndProject
5253
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Return.Web.Tests.Integration", "tests\Return.Web.Tests.Integration\Return.Web.Tests.Integration.csproj", "{D120FE6A-74F8-474E-9654-FC4E1CCD2B9E}"

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ install:
1515
cache: '%LOCALAPPDATA%\Yarn'
1616
environment:
1717
RETURN_TEST_WAIT_TIME: 30
18+
SCREENSHOT_TEST_FAILURE_TOLERANCE: True
1819
build_script:
19-
- cmd: build.cmd --target=Publish --verbosity=verbose
20+
- cmd: build.cmd --target=build --verbosity=verbose
2021
after_build:
21-
- ps: Get-ChildItem ./build/publish/* -File | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
2222
- ps: Get-ChildItem ./build/ -File | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
2323
#before_test:
2424
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
2525
test_script:
26-
- cmd: build.cmd --target=Test
26+
- cmd: build.cmd --target=test --configuration=debug --use-code-coverage=true
2727
on_finish:
2828
- ps: Compress-Archive -Path .\build\testresults -DestinationPath .\build\testresults-all.zip
2929
- ps: Push-AppveyorArtifact .\build\testresults-all.zip -FileName "testresults-all.zip"

0 commit comments

Comments
 (0)