{"id":42429938,"url":"https://github.com/xiagw/deploy.sh","last_synced_at":"2026-01-28T03:47:15.522Z","repository":{"id":37811877,"uuid":"304104539","full_name":"xiagw/deploy.sh","owner":"xiagw","description":"EN: deploy.sh is a general CI/CD program. write by shell, support deployment docker/k8s/rsync.    CN: 是一个通用的持续集成/持续发布系统，支持 docker/k8s/rsync 等方式部署。","archived":false,"fork":false,"pushed_at":"2025-06-15T15:21:37.000Z","size":9046,"stargazers_count":6,"open_issues_count":6,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-15T16:33:12.422Z","etag":null,"topics":["cd","ci","docker","k8s","rsync","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiagw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-14T18:39:46.000Z","updated_at":"2025-06-15T15:21:42.000Z","dependencies_parsed_at":"2023-10-29T15:20:31.088Z","dependency_job_id":"58da810a-3c9b-4c1d-a11e-e289f73da3e2","html_url":"https://github.com/xiagw/deploy.sh","commit_stats":null,"previous_names":[],"tags_count":119,"template":false,"template_full_name":null,"purl":"pkg:github/xiagw/deploy.sh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiagw%2Fdeploy.sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiagw%2Fdeploy.sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiagw%2Fdeploy.sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiagw%2Fdeploy.sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiagw","download_url":"https://codeload.github.com/xiagw/deploy.sh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiagw%2Fdeploy.sh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28837137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T02:10:51.810Z","status":"ssl_error","status_checked_at":"2026-01-28T02:10:50.806Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cd","ci","docker","k8s","rsync","shell"],"created_at":"2026-01-28T03:47:14.834Z","updated_at":"2026-01-28T03:47:15.517Z","avatar_url":"https://github.com/xiagw.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/xiagw/deploy.sh/raw/main/docs/img/logo.png\" alt=\"deploy.sh\" width=\"200\"\u003e\n  \u003cbr\u003edeploy.sh\u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003eAn open source CI/CD system\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/xiagw/deploy.sh/actions\"\u003e\n    \u003cimg src=\"https://github.com/xiagw/deploy.sh/actions/workflows/main.yml/badge.svg?event=push\" alt=\"Github Actions\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# 中文 [README_zh.md](README_zh.md)\n\n# Introduction\ndeploy.sh is a powerful and flexible CI/CD automation tool that can be executed both manually and programmatically.\nIt seamlessly integrates with popular version control and CI/CD platforms including:\n\n- GitLab/GitLab-Runner\n- Jenkins\n- Gitea/Act_Runner\n- Gogs\n- GitHub Actions\n- ...\n\nThe tool is designed to streamline your deployment workflow while supporting a wide range of deployment scenarios,\nfrom traditional server deployments to modern container orchestration.\n\n# Features\n- **Code style**: phpcs, phpcbf, java code style, jslint, shfmt, hadolint...\n- **Code quality**: sonarqube scan, OWASP, ZAP, vulmap...\n- **Testing Suite**: Comprehensive testing support including unit tests, functional tests, and performance testing\n- **Build**: npm build, composer install, maven build, gradle build, docker build, pip install ...\n- **Deploy method**: rsync+ssh, rsync, rsync + container image, rsync jar/war, ftp, sftp, kubectl, helm...\n- **Performance test**: stress test, jmeter, loadrunner\n- **Notifications**: Integrated alerts via WeChat Work, Telegram, Element(Matrix), DingTalk\n- **SSL/TLS**: Automated certificate management using [acme.sh](https://github.com/acmesh-official/acme.sh.git)\n- **Cloud Ready**: AWS, Aliyun, Tencent Cloud, Huawei Cloud...\n\n# Installation\nPrerequisites:\n- Git\n- Bash shell environment\n\n```\ngit clone --depth 1 https://github.com/xiagw/deploy.sh.git $HOME/runner\n```\n\n# How to automatically detect the programming language\n| Language | Detection Method |\n|----------|------------------|\n| node     | Exists package.json or include `project_lang=node` in README.md |\n| php      | Exists composer.json or include `project_lang=php` in README.md |\n| java     | Exists pom.xml or include `project_lang=java` in README.md |\n| python   | Exists requirements.txt or include `project_lang=python` in README.md |\n| other    | Include `project_lang=[other]` in README.md |\n\nproject_lang=shell\n\n# Quickstart\n\n### option [1]. deploy.sh manually\n```\n## If your project repository already exists\ncd /path/to/\u003cyour_project.git\u003e\n$HOME/runner/deploy.sh\n```\n\n```\n## If your project repository dose not exist. (deploy.sh will clone it)\n$HOME/runner/deploy.sh --git-clone https://github.com/\u003csome_name\u003e/\u003csome_project\u003e.git\n```\n\n### option [2]. deploy.sh automated\n```\n## crontab\n*/5 * * * * for d in /path/to/src/*/; do (cd $d \u0026\u0026 git pull \u0026\u0026 $HOME/runner/deploy.sh --cron); done\n```\n```\n## run in screen or tmux\nwhile true; do for d in /path/to/src/*/; do (cd $d \u0026\u0026 git pull \u0026\u0026 $HOME/runner/deploy.sh --loop); done; sleep 300; done\n```\n\n### option [3]. deploy.sh with GitLab-Runner\n1. Prepare a gitlab-server and gitlab-runner-server\n1. [Install gitlab-runner](https://docs.gitlab.com/runner/install/linux-manually.html), register to gitlab-server, and start gitlab-runner\n1. cd $HOME/runner\n1. cp conf/example-deploy.json data/deploy.json      ## !!!change to yours!!!\n1. cp conf/example-deploy.env data/deploy.env        ## !!!change to yours!!!\n1. Refer to conf/.gitlab-ci.yaml of this project, setup \\\u003cyour_project.git\\\u003e/.gitlab-ci.yaml\n\n### option [4]. deploy.sh with Jenkins\n1. Create job,\n1. setup job, run custom shell, `bash $HOME/runner/deploy.sh`\n\n\n# Examples (with GitLab Server and GitLab-Runner)\n\n### Step 1: Prepair Gitlab server\nThere is already a gitlab server (if not, you can refer to [xiagw/docker-gitlab](https://github.com/xiagw/docker-gitlab) to start one with docker-compose)\n\n### Step 2: Prepair Gitlab Runner server\nThere is already a server that has installed gitlab-runner and register to Gitlab server, (executer is shell)\n\nand make sure gitlab-runner is running properly. `sudo gitlab-runner status`\n\n### Step 3: Prepair Application server (Linux/k8s/microk8s/k3s)\nif use rsync+ssh to deploy: The ssh key file had been prepared, and you can login to the Application server without a password from the gitlab-runner server (the key file can be in $HOME/.ssh/, or in the $HOME/runner/data/.ssh/)\n\nif use k8s to deploy: on the gitlab-runner server, prepare ~/.kube/config\n\n### Step 4: install, git clone deploy.sh\nSSH login to the gitlab-runner server\n```\ngit clone https://github.com/xiagw/deploy.sh.git $HOME/runner\n```\n\n### Step 5: Update $HOME/runner/data/deploy.json, $HOME/runner/data/deploy.env\nRefer to the conf/example-deploy.json, conf/example-deploy.env, change to yours configure\n```\ncd $HOME/runner\ncp conf/example-deploy.json data/deploy.json      ## change to yours\ncp conf/example-deploy.env data/deploy.env        ## change to yours\n```\n\n### Step 6: Create Gitlab project on gitlab server\nExample: created `project-A` under the root account on gitlab-server (root/project-A)\n\n### Step 7: Create root/project-A/.gitlab-ci.yml on gitlab server\nCreate and submit `.gitlab-ci.yml` on Gitlab `project-A`\n\n### Step 8: Enjoy CI/CD\n\n# FAQ\n### How to create Helm files for applications project\nIf you use helm to deploy to k8s, change helm-new.sh for yours (default open port 8080 and 8081)\n```\nbash $HOME/runner/bin/helm-new.sh\n## change to yours [$HOME/runner/data/helm/\u003cyour_project\u003e]\n```\n\n### How to resolve gitlab-runner fail\nIf you use Ubuntu, just `rm -f $HOME/.bash_logout`\n\n# Diagram\n```mermaid\ngraph TB;\n\nDev -- pull/push --\u003e Java;\nDev -- pull/push --\u003e PHP;\nDev -- pull/push --\u003e VUE;\nDev -- pull/push --\u003e Python;\nDev -- pull/push --\u003e more[More...];\nJava -- pull/push --\u003e GIT;\nPHP -- pull/push --\u003e GIT;\nVUE -- pull/push --\u003e GIT;\nPython -- pull/push --\u003e GIT;\nmore -- pull/push --\u003e GIT;\nGIT --\u003e CICD[deploy.sh];\nOPS -- shell --\u003e GIT;\nOPS -- shell --\u003e CICD;\nUI_UE -- sketch --\u003e PD;\nPD -- issues --\u003e GIT[GitLab Server];\nQA -- issues--\u003e GIT;\ntestm[Manuel tests] -- test--\u003e QA;\ntesta[Auto tests] -- test--\u003e QA;\nCICD -- deploy --\u003e K8S[k8s/helm];\nCICD -- build --\u003e Build;\nCICD -- database --\u003e db1[Database manage];\nCICD -- cert --\u003e cert[Cert manage];\nCICD -- notify --\u003e notify[Notify manage];\nCICD -- check --\u003e rev[Code Check];\nCICD -- test --\u003e test[Test Center];\nnotify -- notify --\u003e weixin/dingding/telegram/element;\ndb1 -- sql --\u003e flyway;\ncert -- shell --\u003e acme[acme.sh];\nacme -- dns api --\u003e dnsapi;\nacme -- web --\u003e www;\ndnsapi -- dns api --\u003e dns1[dns api CF];\ndnsapi -- dns api --\u003e dns2[dns api ali];\ntest -- test --\u003e testu[Unit tests];\ntestu -- test --\u003e testf[Function tests];\ntestf -- test --\u003e testl[Load tests];\nrev -- style --\u003e format[Style];\nformat --\u003e Lint;\nrev -- quality--\u003e quality[Quality];\nquality --\u003e Sonarqube;\nBuild -- push --\u003e Repo[Docker Registry];\nK8S -- pri --\u003e ENV_D[ENV develop];\nK8S -- pri --\u003e ENV_T[ENV testing];\nK8S -- pri --\u003e ENV_M[ENV master];\nENV_D -- pri --\u003e app_d[app 1,2,3...];\napp_d -- pri --\u003e cache_d[redis cluster];\ncache_d -- pri --\u003e db_d[mysql cluster];\nENV_T -- pri --\u003e app_t[app 1,2,3...];\napp_t -- pri --\u003e cache_t[redis cluster];\ncache_t -- pri --\u003e db_t[mysql cluster];\nENV_M -- pri --\u003e app_m[app 1,2,3...];\napp_m -- pri --\u003e cache_m[redis cluster];\ncache_m -- pri --\u003e db_m[mysql cluster];\n```\n\n# Contributing\nWe welcome contributions to deploy.sh!\n\nPlease make sure to update tests as appropriate and adhere to the project's coding standards.\n\n[deploy.sh Issue](https://github.com/xiagw/deploy.sh/issues)\n\n[deploy.sh PR](https://github.com/xiagw/deploy.sh/pulls)\n\n# Donation\nIf you find this project helpful, consider making a small donation to support its development:\n\n| Alipay | WeChat Pay |\n| ---- | ---- |\n| \u003cimg src=https://github.com/xiagw/deploy.sh/raw/main/docs/img/pay-alipay.jpg width=\"200\" height=\"200\"\u003e | \u003cimg src=https://github.com/xiagw/deploy.sh/raw/main/docs/img/pay-wechatpay.jpg width=\"200\" height=\"200\"\u003e |\n\n### Digital Currency:\n**BitCoin**\n\nBTC native segwit Address: `bc1qaphg63gygfelzq5ptssv3rq6eayhwclghucf8r`\n\nBTC segwit Address: `3LzwrtqD6av77XVN68UXWLKaHEtAPEQiPt`\n\n**ETH/ERC20**\n\nETH/ERC20 Address `0x007779971b2Df368E75F1a660c1308A51f45A02e`\n\n**BSC/ERC20**\n\nBSC/ERC20 Address `0x007779971b2Df368E75F1a660c1308A51f45A02e`\n\n**TRX/TRC20**\n\nTRX/TRC20 Address `TAnZ537r98Jo63aKDTfbWmBeooz29ASd73`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiagw%2Fdeploy.sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiagw%2Fdeploy.sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiagw%2Fdeploy.sh/lists"}