compose file to run multiple applications in Jenkins my Docker file looks like as shown below.
FROM rschmitz/nunit3-console
COPY NewLibrary NewLibrary
COPY NewLibrary.sln NewLibrary.sln
RUN nuget restore NewLibrary.sln
RUN msbuild NewLibrary/NewLibrary.csproj
RUN nunit3-console NewLibrary/NewLibrary.csproj
And I just want to build this Dockerfile in Jenkins using Docker-compose file , in other words, i want to see the results of the Tests run under Dockerfile in Jenkins . Is it possible to do ? If it is possible how will be the structure of docker-compose.yml file should looks like. ( Below is my current docker-compose.yml ) file and it is not working fine for me. Please suggest me regarding this.
version: '3
services:
jenkins_jobs:
build: .
ports:
- "8080:8080"
- "50000:50000"
jenkins: image: "jenkins:latest" My current design for this problem is , I have setup jenkins docker using official Jenkins image and inside Jenkins i have created jenkins job and multiple Dockerfiles ( as shown below ) and building them inside jenkins jobs.
Dockerfile.nunit1
FROM rschmitz/nunit3-console
COPY NewLibrary NewLibrary
COPY NewLibrary.sln NewLibrary.sln
RUN nuget restore NewLibrary.sln
RUN msbuild NewLibrary/NewLibrary.csproj
RUN nunit3-console NewLibrary/NewLibrary.csproj
Dockerfile
FROM mono:latest
RUN mono --version
ADD . /
RUN msbuild /t:restore kommmit.Offers/kommmit.Offers.Android/kommmit.Offers.Android.csproj
Below is the command which i am executing inside Jenkins job
docker build -t Dockerfile . docker build -t Dockerfile.nunit1 .
Please suggest me regarding this. Hope i clearly mentioned the problem, please let me know if anything else details needed.
Thanks & Regards,
