Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Publish function within the .funcpack directory #76

Open
lifan0127 opened this issue Mar 10, 2018 · 1 comment
Open

Publish function within the .funcpack directory #76

lifan0127 opened this issue Mar 10, 2018 · 1 comment

Comments

@lifan0127
Copy link

According to the documentation, we can use the --copyToOutput flag to copy all needed files to the .funcpack directory and then publish from there. It gives the following example:

funcpack pack -c .
cd .funcpack  # <-- why?
func azure functionapp publish <myapp>

However when I tried this approach, it still published the entire parent directory to Azure instead of the content in .funcpack only. Is it the right behavior? Then why we need to publish within .funcpack?

My steps:

  1. Created a new function app called func-test
  2. Created a new TimerTrigger function
  3. Ran pack & publish as shown above
Publish <path>\func-test contents to an Azure Function App. Locally deleted files are not removed from destination.
Getting site publishing info...
Creating archive for current directory...
Uploading archive...
Upload completed successfully.

When I created a host.json file in the .funcpack directory and published again, it attempted to publish from .funcpack but failed due to Error calling sync triggers:

Getting site publishing info...
Creating archive for current directory...
Uploading archive...
Error calling sync triggers (InternalServerError).
Retry: 1 of 2
Creating archive for current directory...
Uploading archive...
Error calling sync triggers (InternalServerError).
Retry: 2 of 2
Creating archive for current directory...
Uploading archive...
Error calling sync triggers (InternalServerError).
@bedej
Copy link

bedej commented Mar 15, 2018

I see the same behavior for your step 1-3. The function is uploaded, but it's the original version of the function app, not the packed version - looking in the portal, the .funcpack folder does not appear to have been uploaded.

Version information:
Azure Functions Core Tools (2.0.1-beta.24)
Function Runtime Version: 2.0.11587.0
funcpack -V: 1.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants