question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After upgrade for version 4.0.0 of dependencie azure-pipelines-task, Archive2 does not work anymore

See original GitHub issue

Yesterday after the commit for upgrade, it started to not work anymore, right after this https://github.com/microsoft/azure-pipelines-tasks/commit/e526642ad239018a1227109d12d93a182405a6fc :

Error logs

Found 0 files
/usr/bin/zip -r /home/vsts/work/1/a/6256.zip

zip error: Nothing to do! (/home/vsts/work/1/a/6256.zip)
##[error]Error: Archive creation failed for archive file: /home/vsts/work/1/a/6256.zip 
code: 12 
stdout: 
zip error: Nothing to do! (/home/vsts/work/1/a/6256.zip)
 
stderr:  
error: undefined;
##[error]Archive creation failed for archive file: /home/vsts/work/1/a/6256.zip 
code: 12 
stdout: 
zip error: Nothing to do! (/home/vsts/work/1/a/6256.zip)
 
stderr:  
error: undefined;

My yml

- task: ArchiveFiles@2
      displayName: 'Archive files'
      inputs:
        rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
        includeRootFolder: false
        archiveType: 'zip'
        archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
        replaceExistingArchive: true

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:7
  • Comments:21

github_iconTop GitHub Comments

7reactions
CaioDScommented, Oct 7, 2022

I’ve same issue…

Logs:

stderr:  
error: Error: spawnSync /usr/bin/zip ENOBUFS
    at Object.spawnSync (node:internal/child_process:1111:20)
    at Object.spawnSync (node:child_process:814:24)
    at ToolRunner.execSync (/home/vsts/work/_tasks/ArchiveFiles_d8b84976-e99a-4b86-b885-4849694435b0/2.211.0/node_modules/azure-pipelines-task-lib/toolrunner.js:879:23)
    at zipArchive (/home/vsts/work/_tasks/ArchiveFiles_d8b84976-e99a-4b86-b885-4849694435b0/2.211.0/archivefiles.js:152:33)
    at createArchive (/home/vsts/work/_tasks/ArchiveFiles_d8b84976-e99a-4b86-b885-4849694435b0/2.211.0/archivefiles.js:278:13)
    at doWork (/home/vsts/work/_tasks/ArchiveFiles_d8b84976-e99a-4b86-b885-4849694435b0/2.211.0/archivefiles.js:338:9)
    at Object.<anonymous> (/home/vsts/work/_tasks/ArchiveFiles_d8b84976-e99a-4b86-b885-4849694435b0/2.211.0/archivefiles.js:347:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  errno: -105,
  code: 'ENOBUFS',
  syscall: 'spawnSync /usr/bin/zip',
  path: '/usr/bin/zip',
  spawnargs: [Array]
};
##[error]Archive creation failed for archive file: /home/vsts/work/1/a/3470.zip

Task implementation:

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
    includeRootFolder: false
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
    replaceExistingArchive: true
5reactions
leonsbuddydavecommented, Oct 12, 2022

I was able to work around this by specifying the pre-upgrade version of the task:

- task: ArchiveFiles@2.206.0

Upgrade appears to be in 178868e

This was the answer for us; works perfectly. Our task after changes:

- task: ArchiveFiles@2.206.0
    inputs: 
      rootFolderOrFile: .
      includeRootFolder: false
      archiveFile: ${{ parameters.outputZipPath }}

This was after a day working on custom zip/Compress-Archive solutions and running into the symlinking issues described above in our NextJS app.

EDIT: To add, thank you @mattford for this solution. I wasn’t aware until this that you could refer to tasks by minor version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure devops pipeline not using updated version of custom ...
I'm trying to use a custom task that I uploaded to the Visual Studio Marketplace. Below in this picture I made, you can...
Read more >
Pipeline caching - Azure - Microsoft Learn
When a cache step is encountered during a run, the task will restore the cache based on the provided inputs. If no cache...
Read more >
Application Security Verification Standard 4.0
V7: Error Handling and Logging Verification Requirements . ... Welcome to the Application Security Verification Standard (ASVS) version 4.0. The ASVS is a ......
Read more >
Upgrading Guide - Keycloak
It is important that you upgrade Keycloak server first, and then upgrade the adapters. Earlier versions of the adapter might work with later ......
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug:1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance ... script for is not working" status:RESOLVED resolution:OBSOLETE severity:major ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found