я пробовал другие файлы докера, чтобы заставить сборку работать, ничего не помогает .. я использую asp.net-mvc5
ошибки при попытке собрать из jenkins:
Restore completed in 2.44 sec for /opt/bitnami/apps/jenkins/jenkins_home/jobs/Team21/jobs/Project/workspace/WebAppTest/WebAppTest.csproj.
/opt/bitnami/apps/jenkins/jenkins_home/jobs/Team21/jobs/Project/workspace/WebApplication2/WebApplication2.csproj(482,3): error MSB4019: The imported project "/opt/bitnami/apps/jenkins/jenkins_home/jobs/Team21/jobs/Project/workspace/WebApplication2//MSBuild/Microsoft/VisualStudio/v14.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
/usr/share/dotnet/sdk/2.2.203/Microsoft.Common.CurrentVersion.targets(1183,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/opt/bitnami/apps/jenkins/jenkins_home/jobs/Team21/jobs/Project/workspace/WebAppTest/WebAppTest.csproj]
Build FAILED.
0 Warning(s)
2 Error(s)
Трубопровод Дженкинс файл IAM, используя:
pipeline {
//Use the following docker image to run your dotnet app.
agent { docker { image 'mcr.microsoft.com/dotnet/core/sdk:2.2.203-
alpine'} }
environment {HOME = '/tmp'}
stages {
// Get some code from a GitHub repository
stage('Git') {
steps{
git 'https://github.com/user/project.git'
}
}
// stage('Dotnet Restore'){
// steps{
// sh "dotnet restore"
// }
// }
stage('Build') {
steps {
sh "dotnet build"
}
}
stage('Unit Tests') {
steps {
sh 'dotnet test'
}
}
}
}