Hi everyone,
I have folder in my project called test-files. It contains a test payload files (json, csv, etc), which are used in my jest unit tests. Some of these files can be pretty big. How can I exclude it from forge deployment?
Hi everyone,
I have folder in my project called test-files. It contains a test payload files (json, csv, etc), which are used in my jest unit tests. Some of these files can be pretty big. How can I exclude it from forge deployment?
Hi @GeoSystems, I believe that if you add /test-files/ to the .gitignore file, that should do the trick. Iāve just reached out to some internal folks who know the CLI inside out to confirm the above⦠should have solid answer by end of day.
Thanks @nmansilla . Ideally, I would prefer not to add to .gitignore, so that I can share the test files and run unit tests from different machine and by different team members.
I have the same issue. @nmansilla, what information did you get from the CLI team?
I asked chatGPT about this and got the following answer:
.forgeignore : Forge CLI reads a
.forgeignorefile at the root of your project (if one exists) to determine which files to exclude from the deployment. The syntax is the same as.gitignore.
This would be a good solution, but I didnāt find any reference in the documentation about this - so I am not sure if this actually exists.
Can you clarify @nmansilla?
Is that really the same āforgeā as the āAtlassian forgeā?
Has anyone ever found an answer to this? Does the CLI know about .forgeignore?
@tbinna , @freatt , @bjornbrynjar , @GeoSystems ,
I donāt think the Atlassian Forge platform has a ā.forgeignoreā feature. I suspect ChatGPT hallucinated the answer due to mixing up other info from pages such as this.
Regards,
Dugald
I know, this is an old post, but since thereās not been a real answer yet:
Forge does not automatically include everything in the bundle, quite the contrary. In order to include code or data that is not directly referenced, you need to specifically tell Forge what to include, as documented here: https://developer.atlassian.com/platform/forge/manifest-reference/#package
And as a bonus tip: If you want to know exactly what Forge includes in the bundle, you use this instead of the normal forge deploy:
FORGE_INSPECT_ARCHIVE=bundle forge deploy