Skip to main content

Easily creation of pre-production and production scripts to automete your deployment

Project description

PreProd PyPI - Downloads Tests

Easy creation of pre-production and production scripts to automate your deployment

When you're deploying your software in your web server or when you're developing, you often need to modify default settings of your software to addapt them to your needs.

Sometimes, you develop your own scripts to automate this task, but these scripts become more complex each day. That's the reason of this project. PreProd helps you to develop your own deployment script, setting them in a repository.

Preprod uses python code so you don't have to learn any other language.

If your user is root this repository is set in /etc/preprod and if your logged as a normal user in ~/.preprod

Preprod has defined a lot of help commands to make your scripts more visual. They are resumed below and you can call them appending preprod_commons python module. Morever you can create your own commands in {yourrepositorypath}/repository_commons.py and call them inside your scripts appending repository_commons as any other python module.

Example

For example, We are going to automate e2e test in console using preprod with my frontend project Calories Tracker

First we need to create our PreProd repository. As we said before you can create as root or as a normal user.

preprod_create_repository
cd /home/your_user/.preprod
mkdir calories_tracker
nano calories_tracker/build

In calories_tracker/build add the next code

preprod_commons.chdir("/tmp")
preprod_commons.rmtree("/tmp/calories_tracker_build")
preprod_commons.git_clone("https://github.com/turulomio/calories_tracker", "calories_tracker_build")
preprod_commons.chdir("/tmp/calories_tracker_build")
preprod_commons.npm_install()
preprod_commons.run_and_check("npm run build")

Now if you run preprod you can see your scripts (project: calories_tracker, action: build). So just run

preprod calories_tracker build

You'll see in console

And your calories_tracker build is now in /tmp/calories_tracker_build/dist

If something goes wrong you can see color logs in /tmp/preprod_logs_your_user/

I hope you like it and give me a star.

Commands

You can see all preprod_commons method here

Additionally, you can invoke other preprod actions from within your scripts using:

preprod_commons.preprod("project_name", "action_name", pretend=False, description="Optional description")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

preprod-1.4.0.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

preprod-1.4.0-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file preprod-1.4.0.tar.gz.

File metadata

  • Download URL: preprod-1.4.0.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.12 Linux/6.19.3-gentoo

File hashes

Hashes for preprod-1.4.0.tar.gz
Algorithm Hash digest
SHA256 eb4d81ba2de4458536efad4ae283e95780de12196bc255f76f7f83767b4162ae
MD5 bf14c8fd6634b8fb19983310041d6b4f
BLAKE2b-256 b04260f9279e69d93e6a10ecb498554cce0f666a3ec5cb34fb7f9f0461b83228

See more details on using hashes here.

File details

Details for the file preprod-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: preprod-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.12 Linux/6.19.3-gentoo

File hashes

Hashes for preprod-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01f103f007b8abe4036fcf5d461df878dbd05c521a3e4c4790e66115a2c00048
MD5 4cb5f18f6e73f9b43360ad06d9c6441b
BLAKE2b-256 d1051b447911ed3bdf623918ee35c0b6be5fa977a59e388b715d621e3a42d869

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page