microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.48k stars 2.61k forks source link

[BUG]:Nothing will be added to build artifact file #20030

Open Sudar-work opened 3 months ago

Sudar-work commented 3 months ago

New issue checklist

Task name

Run pipeline

Task version

No response

Issue Description

I try to run a pipeline to bring an artifact to be published and using azure pipeline.yaml is available in the following folder. when i tried to build this it is coming up with an error. '/home/vsts/work/1/a' is empty. Nothing will be added to build artifact 'warfile' Please see Github link below that can be used https://github.com/Sudar-work/d5/blob/master/azure-pipelines.yml . also please find below the content of the YAML files

Maven

Build your Java project and run tests with Apache Maven.

Add steps that analyze code, save build artifacts, deploy, and more:

https://docs.microsoft.com/azure/devops/pipelines/languages/java

trigger:

pool: vmImage: ubuntu-latest

steps:

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

Azure devops

Operation system

Ubuntu

Relevant log output

2024-06-18T16:35:33.0858505Z ##[section]Starting: PublishBuildArtifacts
2024-06-18T16:35:33.0866153Z ==============================================================================
2024-06-18T16:35:33.0867847Z Task         : Publish build artifacts
2024-06-18T16:35:33.0868206Z Description  : Publish build artifacts to Azure Pipelines or a Windows file share
2024-06-18T16:35:33.0868506Z Version      : 1.238.1
2024-06-18T16:35:33.0868648Z Author       : Microsoft Corporation
2024-06-18T16:35:33.0868765Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/publish-build-artifacts
2024-06-18T16:35:33.0868941Z ==============================================================================
2024-06-18T16:35:33.3145190Z ##[warning]Directory '/home/vsts/work/1/a' is empty. Nothing will be added to build artifact 'warfile'.
2024-06-18T16:35:33.3197641Z ##[section]Finishing: PublishBuildArtifacts

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

No response

ismayilov-ismayil commented 3 months ago

Hi @Sudar-work , Could you please make sure there is file in the artifact folder? You can check this by adding another step to 'ls' source folder.