Code Zip Artifact

The jets deploy process zips up your project in a for deployment. For the most part, the files that are not in .gitignore are packaged up. Some additional rules are covered below.

Always Keep

If the code is git repo, Jets generates artifact that respects the .gitignore file. All files within in the .gitignore are excluded from the With exception to the .config.code.always_keep files. The default is always_keep = ['config/jets/env'].


Jets.bootstrap.configure do
 config.code.always_keep = ['config/jets/env'] # default

Hence, the config/jets/env folder is always copied over as part of the deployment process. This allows you to .gitignore files like .env* but copy over config/jets/env/.env files so the remote runner use the config/jets/env variable values.

Always Remove

When the project is not a git repo, then Jets uses almost all the files for the Some files will always be removed per:


Jets.bootstrap.configure do
 config.code.always_remove = ['tmp'] # default

Jets CI .gitignore

If you are using Jets CI, then config/jets/env may not be in the git repo for the CI run. IE: Even always_keep won’t work. When using CI, you have to make sure config/jets/env files are in version control. IE: Check GitHub and confirm it’s there.

If the config/jets/env is not in version control, it’s probably due to a gitignore rule.

Here is an example that allows config/jets/env files while ignoring .env at the top level.


# Ignore all environment files except templates

Here’s another example of ignoring all .env files and explicitly allowing /config/jets/env/.env


# Ignore all environment files except /config/jets/env/.env

Make sure the !/config/jets/env/* line is below any .env ignores. Otherwise, the .env ignore will take higher precedence.

Important: Ensure you do not have secret info in config/jets/env and only have SSM references or safe-to-commit plain text values. Another option is to store all env values in SSM parameters and not use config/jets/env files. CI will be able to look up the SSM parameters.