{"id":21001456,"url":"https://github.com/divio/scripts","last_synced_at":"2025-08-22T18:12:02.214Z","repository":{"id":182496473,"uuid":"667893264","full_name":"divio/scripts","owner":"divio","description":"A collection of helpful scripts for automating tasks and enhancing workflows on the Divio cloud platform.","archived":false,"fork":false,"pushed_at":"2024-09-16T15:49:49.000Z","size":50,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T09:46:40.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-18T14:36:46.000Z","updated_at":"2023-08-14T16:21:47.000Z","dependencies_parsed_at":"2024-04-12T14:41:46.430Z","dependency_job_id":"3f2e9c7c-872c-4641-a42c-ba592696eecb","html_url":"https://github.com/divio/scripts","commit_stats":null,"previous_names":["divio/scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divio%2Fscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divio%2Fscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divio%2Fscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divio%2Fscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divio","download_url":"https://codeload.github.com/divio/scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243418964,"owners_count":20287800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T08:15:22.275Z","updated_at":"2025-03-13T13:44:09.545Z","avatar_url":"https://github.com/divio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## scripts\n\nA collection of helpful scripts for automating tasks and enhancing workflows on the Divio cloud platform.\n\nExport Logs Script\n\nThe `export-logs.py` script in this repository allows you to retrieve and display logs from a specified Divio environment for a given\n date range. It uses the Divio API to fetch the logs and displays them on the console and saves them to a text file for easy search \nand analysis.\n\nCopy and run the `export-logs.py` script with the following command, replacing with the desired starting and ending date and time, and\n providing the required command-line arguments, the environment slug, the application uuid, and your API token:\n\n`python export-logs.py \"2023-08-13T00:00\" \"2023-08-13T23:00\" \"live\" \"APPLICATION_UUID\" \"YOUR_API_TOKEN\"`\n\nFor detailed instructions on how to use the `export-logs.py` script, please refer to the [How to Export Logs guide in the documentation](https://docs.divio.com/en/latest/how-to/export-logs/). \n\n\n## CI/CD Workflow Script\n\nThe CI-CD workflow script included in this repository simplifies the deployment process of your Divio applications using a single Python script. It offers flexibility in deploying your code while supporting various deployment scenarios, such as creating new environments in existing or creating new branches, and more.\n\n### Requirements\n\nBefore using the CI-CD workflow script, ensure you have the following prerequisites:\n\n1. Python 3.x\n\n2. Dependencies: Install the necessary Python libraries by running the following command:\n\n   ```bash\n   pip install requests gitpython\n\nTo deploy your Divio application using the CI/CD Workflow Script, run the script with the following command:\n\n`python ci-cd.py \"APPLICATION_UUID\" \"YOUR_API_TOKEN\" [--env_slug ENV_SLUG] [--branch BRANCH] [--repository_path REPO_PATH] [--source_env_slug SOURCE_ENV_SLUG]`\n\nReplace the placeholders with the appropriate values:\n\n`\"APPLICATION_UUID\"`: The UUID of your Divio application.\n`\"YOUR_API_TOKEN\"`: Your Divio API token.\n`ENV_SLUG` (optional): The environment slug (default: \"test\").\n`BRANCH` (optional): The branch name.\n`REPO_PATH` (optional): The local repository path (required when creating a new branch).\n`SOURCE_ENV_SLUG` (optional): The source environment slug for copying (default: \"live\").\n\nRefer to the [Simplify your Divio application deployment with a Python script](https://docs.divio.com/en/latest/how-to/ci-cd/) for detailed instructions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivio%2Fscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivio%2Fscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivio%2Fscripts/lists"}