Starts in:
2 DAYS
17 HRS
18 MIN
43 SEC
Starts in:
2 D
17 H
18 M
43 S
Open Closed

Azure Build Pipelines not generating all folder in published folders #4913


User avatar
0
isteer created

Hello Team,

OUR ABP CONFIGURATION:

ABP Framework version: v7.0.0 UI type: MVC DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): Tiered MVC Exception message and stack trace

We have deployed our ABP application on IIS server, we have tiered MVC application so we hosted all ports:

Auth server (port - 44349) : hosted on https://authserver.stage.careermaps.co.uk/ on IIS

Swagger (port- 44324) : hosted on https://host.stage.careermaps.co.uk/

Web-App (port 44389) : hosted on https://web.stage.careermaps.co.uk/

ISSUE:

Hello team we created build pipeline in azure devops to generate build and published files for all our websites, auth, host and web. But after generating artifacts from build pipelines some folders are not generating by build pipeline.

See in the below screenshot, left side files generated by azure build pipeline and right side files are published manually using visual studio, highlighted folder are not present in left side which has been generated by azure build pipeline.

Is there any documentation that we can follow for azure cicd build pipelines?

Attached below CICD pipeline :

Let me know if you need anything from our side?


9 Answer(s)
  • User Avatar
    0
    isteer created

    THIS is the YAML file

    variables:

    • name: BuildParameters.solution value: '***.sln' trigger: branches: include:
      • refs/heads/staging name: $(date:yyyyMMdd)$(rev:.r) resources: repositories:
      • repository: self type: git ref: refs/heads/staging jobs:
    • job: Job_1 displayName: Agent job 1 pool: vmImage: windows-latest steps:
      • checkout: self fetchDepth: 1

      • task: UseDotNet@2 displayName: Use .NET Core sdk 7.0.x inputs: version: 7.0.x

      • task: NuGetToolInstaller@0 displayName: Use NuGet 6.4.0 inputs: versionSpec: 6.4.0

      • task: NuGetCommand@2 displayName: NuGet restore inputs: solution: $(BuildParameters.solution) selectOrConfig: config nugetConfigPath: NuGet.Config

      • task: VSBuild@1 displayName: Build solution Auth inputs: solution: src/Phoenix.GTCManagement.AuthServer/Phoenix.GTCManagement.AuthServer.csproj msbuildArgs: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\" platform: $(BuildPlatform) configuration: $(BuildConfiguration)

      • task: PublishBuildArtifacts@1 displayName: Publish Artifact Auth condition: succeededOrFailed() inputs: PathtoPublish: $(build.artifactstagingdirectory) ArtifactName: drop auth TargetPath: '\my\share$(Build.DefinitionName)$(Build.BuildNumber)'

      • task: DeleteFiles@1 displayName: Delete files Auth enabled: False inputs: SourceFolder: $(build.artifactstagingdirectory) Contents: '**'

      • task: VSBuild@1 displayName: 'Build solution web ' inputs: solution: src/Phoenix.GTCManagement.Web/Phoenix.GTCManagement.Web.csproj msbuildArgs: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\" platform: $(BuildPlatform) configuration: $(BuildConfiguration)

      • task: PublishBuildArtifacts@1 displayName: Publish Artifact web condition: succeededOrFailed() inputs: PathtoPublish: $(build.artifactstagingdirectory) ArtifactName: drop web TargetPath: '\my\share$(Build.DefinitionName)$(Build.BuildNumber)'

      • task: DeleteFiles@1 displayName: Delete files Web inputs: SourceFolder: $(build.artifactstagingdirectory) Contents: '**'

      • task: VSBuild@1 displayName: 'Build solution host ' inputs: solution: src/Phoenix.GTCManagement.HttpApi.Host/Phoenix.GTCManagement.HttpApi.Host.csproj msbuildArgs: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\" platform: $(BuildPlatform) configuration: $(BuildConfiguration)

      • task: PublishBuildArtifacts@1 displayName: Publish Artifact host condition: succeededOrFailed() inputs: PathtoPublish: $(build.artifactstagingdirectory) ArtifactName: drop host TargetPath: '\my\share$(Build.DefinitionName)$(Build.BuildNumber)'

      • task: DeleteFiles@1 displayName: Delete files Web Host inputs: SourceFolder: $(build.artifactstagingdirectory) Contents: '**'

      • task: VSTest@2 displayName: Test Assemblies inputs: testAssemblyVer2: >- *$(BuildConfiguration)*test.dll

        !**\obj\**
        

        platform: $(BuildPlatform) configuration: $(BuildConfiguration)

      • task: PublishSymbols@2 displayName: Publish symbols path continueOnError: True inputs: SearchPattern: '**\bin***.pdb' PublishSymbols: false SymbolServerType: TeamServices ...

  • User Avatar
    0
    isteer created

    And this is the nuget.config file content:

    <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> <add key="ABP Commercial NuGet Source" value="https://nuget.abp.io/455e59eb-b601-4784-b507-8ac6a664cc6a/v3/index.json" /> </packageSources> </configuration>

    And this is package.json

    { "version": "1.0.0", "name": "my-app", "private": true, "dependencies": { "@volo/abp.aspnetcore.mvc.ui.theme.leptonx": "~2.0.0-rc.4", "@volo/account": "^7.0.1", "@volo/audit-logging": "^7.0.1", "@volo/chat": "^7.0.1", "@volo/forms": "^7.0.1", "@volo/identity": "^7.0.1", "@volo/language-management": "^7.0.1", "@volo/saas": "^7.0.1" } }

    Using the same version of nugetrestore that we are using in local visual studio. Nuget package manager 6.4.0

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can check the Azure document: https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/dotnet-core?view=azure-devops&tabs=dotnetfive#publish-artifacts-to-azure-pipelines

  • User Avatar
    0
    selmankoc created

    I think if you remove the deletion steps in the pipeline, you can see the necessary files in the workspace. Can you delete these steps and check again, please?

  • User Avatar
    0
    isteer created

    Yes we disabled delete auth files in the above screenshot if you see, still it is not generating views and abp packages folders.

    Thanks,

  • User Avatar
    0
    isteer created

    Hello Team,

    Can anyone guide us we are following properly everything, remove the deletion steps as well still it is not generating those three folders?

    Modules Pages Views

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Actually, this is not about ABP, can you check this: https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/dotnet-core?view=azure-devops&tabs=dotnetfive#publish-artifacts-to-azure-pipelines

  • User Avatar
    0
    isteer created

    Hello,

    We got the root issue, ABP packages are not restoring from nuget.config reference

    <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> <add key="ABP Commercial NuGet Source" value="https://nuget.abp.io/455e59eb-b601-4784-b507-8ac6a664cc6a/v3/index.json" /> </packageSources> </configuration>

    We checked logs and for all abp package restore we are getting not found, attached screenshot:

    And these logs generating from nuget restore step in pipeline:

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I don't think this is related to package restoring. If there is no restore, you can't even build the project.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06