Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 7 tasks
Sudar-work opened this issue Jun 18, 2024 · 1 comment
Open
2 of 7 tasks

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

Sudar-work opened this issue Jun 18, 2024 · 1 comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug triage

Comments

@Sudar-work
Copy link

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:

  • master

pool:
vmImage: ubuntu-latest

steps:

  • task: Maven@3
    inputs:
    mavenPomFile: 'pom.xml'
    mavenOptions: '-Xmx3072m'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.8'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: true
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    goals: 'package'
  • task: CopyFiles@2
    inputs:
    Contents: '**/.war'
    TargetFolder: '$(build.artifactstagingdirectory)'
  • task: PublishBuildArtifacts@1
    inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'warfile'
    publishLocation: 'Container'

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

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

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

@Sudar-work Sudar-work added the bug label Jun 18, 2024
@v-schhabra v-schhabra added Area: ABTT Akvelon Build Tasks Team area of work and removed Area: Release labels Jun 19, 2024
@ismayilov-ismayil
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug triage
Projects
None yet
Development

No branches or pull requests

3 participants