I am trying to configure a deployment pipeline for a .net core MVC application The build process works fine, however when i try to use the OctopusDeploy push-package-action the Action always fails.
The error is:
" Uploading package, Perle.styles.css…
Error: Error: Error: EISDIR: illegal operation on a directory, read"
But this happens after some 200 files have already been uploaded. I cannot find any information about this and am unsure what is causing the issue. I am not even sure how to go about debugging this since I don’t understand how this error could occur after a large number of files have already been processed.
My yml file is below and is the entirety of the work flow.
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
branches: [ "master" ]
branches: [ "master" ]
- uses: actions/checkout@v3
- name: Setup .NET
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
run: dotnet publish Perle.csproj -c Release -o website
- name: Upload a Build Artifact
- name: Download a Build Artifact
- name: Push a package to Octopus Deploy
Thanks for reaching out and welcome to the Octopus Forums!
Taking a look at your YAML it looks like we may need to put a step between Download a Build Artifact and Push a package to Octopus Deploy. This step will be responsible for packing the website into one file. You’ll likely want to zip up that folder (or the contents, depending on how you want the file structure to look like when you deploy it from Octopus, e.g the zip contains: website/then a lot of files, or just a zip containing the files themselves.)
Once you have that step zipping up the files, you will then change the packages parameter to explicitly point at the zip file that you created.
Here is an example of something similar to what you might end up with:
I’m not sure what you censored in the API Key section, and if it’s the github secret name you can ignore this part, but if it is the raw API key I did want to mention that we recommend storing the API key in a Github Repository Secret if you can.
Please let me know if that gets you unstuck or if you have any questions about it!
Yes I will set up the secrets after, right now I am trying to just get the actual workflow working first. But I do not want the file zipped i want octopus to just deploy the files as they are since this is how we already have the app being server from our IIS server. I just don’t understand why i am getting a read error after so many files have already been successfully uploaded.
I just don’t understand why i am getting a read error after so many files have already been successfully uploaded. - This step is designed to upload specific packaged files. Octopus expects apps/websites to be contained in a package and also very specific extensions. This goes along with how you will set up your deployment process, as you will only have to select one file to deploy (e.g. website.1.0.0.zip), and it will unzip all of those files into one folder for you on the destination target. Here is some documentation on packaging to expand a bit further: Packaging applications - Octopus Deploy
Octopus will deploy the files as they are when you zip them. So in your scenario, if you zipped all of the files within the website folder into website.1.0.0.zip, when you go to deploy that package, it will unzip all of those files to a folder called website (unless you specify a custom install directory.)
Thanks for sharing that I am going through it now, I do have 1 question if you don’t mind. After the octopus push portion of the action runs, would the package then appear in the Library section of the dashboard?