I have a netcore application in Repository 1, that has a project reference to the library in Repository 2. Everything works normally in local, because it was able to find to the higher directory in local.
here is my current yaml file
stages:
- build2
build-dotnet:
before_script:
- "dotnet --info"
- "curl -sL https://deb.nodesource.com/setup_12.x | bash -"
- "apt-get install -y nodejs"
- "node --version"
image : mcr.microsoft.com/dotnet/sdk:6.0
stage: build2
script:
- "dotnet build WebApplication1/WebApplication1/WebApplication1.csproj"
- dotnet publish -c Release -o ./publish WebApplication1/WebApplication1/WebApplication1.csproj
artifacts:
paths:
- publish/
but when I apply a CI runner in the main project (repository 1) it gets this error:
Skipping project "/builds/asd/devops-ci-library/FerdiLibrary1/FerdiLibrary1/FerdiLibrary1.csproj" because it was not found.
I know it is happening because they could not find the other project/repo. Is there any way the CI could detect my library to build?
I have tried to clone my existing library but it is just a bit too confusing for me. I also could not move the library to a git submodule for my first project because the library is already being referred to many others repositories.
here is my latest shot on cloning the library:
stages:
- pre-build
- build2
Clone:
stage: pre-build
image: mcr.microsoft.com/dotnet/sdk:6.0
script:
- mkdir git
- cd git
- git clone https://{}:{}@gitlab.com/asd/devops-ci-library.git
artifacts:
paths:
- src
build-dotnet:
before_script:
- "dotnet --info"
- "curl -sL https://deb.nodesource.com/setup_12.x | bash -"
- "apt-get install -y nodejs"
- "node --version"
image : mcr.microsoft.com/dotnet/sdk:6.0
stage: build2
script:
- "dotnet build WebApplication1/WebApplication1/WebApplication1.csproj"
- dotnet publish -c Release -o ./publish WebApplication1/WebApplication1/WebApplication1.csproj
artifacts:
paths:
- publish/
but I got no luck. is there anything I could fix or try? thank you in advance.