Sample project written in .net
It's enough for you to run ./scripts/runAcceptanceTests.sh
to
- Build a docker image with Artifactory (normally you would have that running / you could also use Git instead)
- We run the app on port
5000
in theContractTests
mode - We run the Spring Cloud Contract docker image that has the
contracts
folder mounted with contracts - From the mounted folder tests are generated against the running application
- Once the tests have passed stubs are generated and uploaded to Artifactory
- Installed .NET Core SDK 2.1
From command line execute dotnet build
From command line execute dotnet run
docker build -f src/AspNetCoreExample/Dockerfile .
docker run -p 80:80 <name of container>
docker run -e "ASPNETCORE_ENVIRONMENT=ContractTests" -p 80:80 <name of container>
http://localhost/swagger - swagger ui http://localhost/api-docs - redoc
Section describes commands that will be used by Cloud Foundry pipelines.
Warning: Output from below commands start with extra spaces in each line. Please make left trim
(you can do it by piping to xargs
)
e.g.
dotnet msbuild /nologo /t:cfpappname | xargs
dotnet msbuild /nologo /t:cfpversion | xargs
dotnet msbuild /nologo /t:cfpgroupid | xargs
dotnet msbuild /nologo /t:cfpartifactid | xargs
dotnet msbuild /nologo /t:CFPUnitTests | xargs
dotnet msbuild /nologo /t:CFPE2eTests | xargs
dotnet msbuild /nologo /t:CFPSmokeTests | xargs
dotnet msbuild /nologo /t:CFPPublish /p:Configuration=Release