Can someone suggest what to do to set up a pipeline for .Net Core 3.1. I've tried a couple of images that I found through "docker search" and on the Microsoft support site but the build is still failing. My current .yml code is below:
image: mcr.microsoft.com/dotnet/core/sdk:3.1
pipelines:
default:
- step:
caches:
- dotnetcore
script: # Modify the commands below to build your repository.
- zip applicationapi.zip
- export PROJECT_NAME=FitnessWebApplication
- export TEST_NAME=FitnessWebApplication.test
- dotnet restore
- dotnet build $PROJECT_NAME
#- dotnet test $TEST_NAME
- pipe: atlassian/heroku-deploy:1.1.2
variables:
HEROKU_API_KEY: 'X'
HEROKU_APP_NAME: 'fitnesswebapplicationapi'
ZIP_FILE: 'applicationapi.zip'
I've also tried the microsoft/dotnet and appsvc/dotnetcore images. csproj file is below:
<ItemGroup> <PackageReference Include="AutoMapper" Version="9.0.0" /> <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.0" /> <PackageReference Include="Microsoft.IdentityModel.Tokens" Version="5.6.0" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" /> <PackageReference Include="MongoDB.Bson" Version="2.10.0" /> <PackageReference Include="MongoDB.Driver" Version="2.10.0" /> <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.6.0" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" /> <PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.2.2" /> </ItemGroup>
Hi Kyle, I'm not sure if you came right, but you can use this (https://hub.docker.com/_/microsoft-dotnet-core-sdk/) image: mcr.microsoft.com/dotnet/core/sdk:3.1
I've tried that image previously, cited it in op. image still doesn't work properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I try to build, all that pings back is "something went wrong," not a useful error I know but that's all that Bitbucket is giving me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should try to eliminate the heroku part and try only building your project first.
Once you have a successful build, then add the extra commands you need.
I'm not sure if this would help, but this is my yml file with just the basic build of a project.
image: mcr.microsoft.com/dotnet/core/sdk:3.1
pipelines:
default:
- step:
caches:
- dotnetcore
script:
# Modify the commands below to build your repository.
- dotnet build ZT.Web.Main/ZT.Web.Main.csproj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't know bud.. Kinda dumb that we are paying for something, but don't receive support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't you have a console log similar to this? where you can see which line the error is occurring?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The ping back I'm getting is before that step. I do know what you're referencing bc of the other pipeline I made for the UI but the error message I get is before the build begins as if its a yml error. Yet no status code or anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you get this to work? I get an error bash: zip: command not found
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.