Luciano Rufo
Luciano Rufo

Reputation: 11

ArchiveFiles task seems to be ignoring .next and .bin folders on Azure Pipeline

On my pipeline I use node to install and build a NextJS app, then I proceed to create a .zip with ArchiveFiles task in order to later use it on release on a web app service.

The only problem is that ArchiveFiles is ignoring build folders such as .next and .bin which I need to serve the site on production.

This is part of the pipeline, as output of the process I receive a zip that is a copy of the folder I want, excluding build folders which I need like .next or node_modules/.bin. I need said folders to run my app properly on the app service.

   - task: Npm@1
            inputs:
              command: 'install'
              workingDir: '$(Build.SourcesDirectory)/roam-web-app-ssr'
              verbose: true

          - task: Npm@1
            inputs:
              command: 'custom'
              workingDir: '$(Build.SourcesDirectory)/roam-web-app-ssr'
              customCommand: 'run build'
              verbose: true

          - task: ArchiveFiles@2
            inputs:
              rootFolder: '$(Build.SourcesDirectory)/roam-web-app-ssr'
              includeRootFolder: false
              archiveType: 'default'
              archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
              replaceExistingArchive: false
              
          - task: PublishBuildArtifacts@1
            inputs:
              PathtoPublish: "$(Build.ArtifactStagingDirectory)"
              ArtifactName: "drop"
              publishLocation: "Container"

As I mentioned I tried making a zip with ArchiveFiles@2 task, and expected to zip all the folders on the rootFolder, but it actually ignores the needed build folders.

As a minor test to check if the problem were the install and build steps I used the copy files task to copy all of the files on a folder in the artifact directory, and confirmed the existence of .next and .bin folders.

Is there another means to create the .zip without ignoring said folders ?

Upvotes: 1

Views: 421

Answers (1)

Luciano Rufo
Luciano Rufo

Reputation: 11

Forgot linux hidden files dont show up, apparently the bug is not because of this.

Upvotes: 0

Related Questions