{"id":21597450,"url":"https://github.com/cerus/deploy-helper","last_synced_at":"2025-04-11T00:52:38.463Z","repository":{"id":43348146,"uuid":"371718041","full_name":"cerus/deploy-helper","owner":"cerus","description":"deploy-helper is a small tool for artifact deployment targetted at software developers.","archived":false,"fork":false,"pushed_at":"2022-03-07T14:31:28.000Z","size":118,"stargazers_count":3,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T00:52:34.015Z","etag":null,"topics":["contributions-welcome","deploy-tool","deployer","deployment","developer-productivity","developer-tools","devops","devtools","good-first-issue","hacktoberfest","java","maven","maven-central","placeholders","productivity","ssh","tool"],"latest_commit_sha":null,"homepage":"","language":"Java","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/cerus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"cerus"}},"created_at":"2021-05-28T13:58:02.000Z","updated_at":"2025-01-09T19:58:53.000Z","dependencies_parsed_at":"2022-08-19T23:50:40.010Z","dependency_job_id":null,"html_url":"https://github.com/cerus/deploy-helper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fdeploy-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fdeploy-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fdeploy-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fdeploy-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cerus","download_url":"https://codeload.github.com/cerus/deploy-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322610,"owners_count":21084336,"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":["contributions-welcome","deploy-tool","deployer","deployment","developer-productivity","developer-tools","devops","devtools","good-first-issue","hacktoberfest","java","maven","maven-central","placeholders","productivity","ssh","tool"],"created_at":"2024-11-24T18:09:02.725Z","updated_at":"2025-04-11T00:52:38.444Z","avatar_url":"https://github.com/cerus.png","language":"Java","readme":"\u003cbr\u003e\n\u003ch2 align=\"center\"\u003edeploy-helper\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n    deploy-helper is a small tool for artifact deployment targetted at software developers.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://github.com/cerus/deploy-helper\" align=\"center\"\u003e\n       \u003cimg align=\"center\" width=\"90%\" height=\"90%\" src=\"https://i.imgur.com/qumITZf.png\"\u003e\u003c/img\u003e\n   \u003c/a\u003e\n   \n    \n   \u003cp align=\"center\"\u003e\u003cimg src=\"https://img.shields.io/github/license/cerus/deploy-helper\" alt=\"GitHub\"\u003e \u003cimg src=\"https://img.shields.io/codacy/grade/0d786807a3104bce869089c34c922945/master\" alt=\"Codacy branch grade\"\u003e \u003ca href=\"https://github.com/cerus/deploy-helper/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/cerus/deploy-helper\" alt=\"GitHub issues\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/cerus/deploy-helper/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/cerus/deploy-helper\" alt=\"GitHub release (latest by date)\"\u003e\u003c/a\u003e \u003cimg src=\"https://img.shields.io/github/stars/cerus/deploy-helper\" alt=\"GitHub Repo stars\"\u003e \u003ca href=\"https://github.com/sponsors/cerus\"\u003e\u003cimg src=\"https://img.shields.io/github/sponsors/cerus\" alt=\"GitHub Sponsors\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003c/p\u003e\n\n## Table of contents\n\n- [Requirements](#requirements)\n- [Purpose](#purpose)\n- [Drawbacks](#drawbacks)\n- [Features](#features)\n- [Configuration](#configuration)\n- [Placeholders / Variables](#placeholders--variables)\n- [Arguments](#arguments)\n- [Installation](#installation)\n- [How to run (examples)](#how-to-run-examples)\n- [Building from source](#building-from-source)\n- [Contributing](#contributing)\n\n## Requirements\n\n- **Java 15!**\n- OpenSSH (or an equivalent) for ssh sessions\n    - 'sshpass' if you want to use plaintext password auth\n\n## Purpose\n\nI wrote deploy-helper to help me deploy artifacts to a test network when I'm working on things. I probably could have used my IDE for that, but that's\nnot fun!\n\nSteps without deploy-helper:\n\n1. Compile\n2. Open file explorer\n3. Delete old artifact from server\n4. Drag and drop the new artifact to server\n\nSteps with deploy-helper:\n\n1. Compile\n2. Run deploy-helper\n\n## Drawbacks\n\n- It's written in Java\n- It doesn't have a lot of features\n\n## Features\n\n- Multiple deploy destinations\n- Local commands\n- SSH session\n\n## Configuration\n\nThe default configuration file `deploy-helper.json` needs to be in your working directory.\\\nExample config:\n\n```json5\n{\n  // Required\n  \"destinations\": [\n    {\n      // Name of the destination\n      \"name\": \"service1\",\n      // Normally you would set a real address or a ip here,\n      // but you could also use aliases from your ssh config (like I did here)\n      \"address\": \"test-network\",\n      // The path for our destination (used for the ssh session)\n      \"path\": \"/home/user/services/service1/data/\",\n      // SSH_COMMANDS (ssh first, then commands) or \n      // COMMANDS_SSH (commands first, then ssh)\n      \"order\": \"SSH_COMMANDS\"\n    },\n    {\n      \"name\": \"service2\",\n      \"address\": \"test-network\",\n      \"path\": \"/home/user/services/service1/data/\",\n      \"order\": \"SSH_COMMANDS\"\n    }\n  ],\n  // Required\n  \"artifact\": {\n    // Directory that contains the artifact\n    \"directory\": \"./target\",\n    // Name regex that matches the artifact\n    \"name\": \"my-software-[\\\\d.A-Za-z-]+\\\\.jar\",\n    // Sorting operation for possible artifacts\n    // LAST_MODIFIED_ASC (oldest file first) or\n    // LAST_MODIFIED_DESC (newest file first)\n    \"sort\": \"LAST_MODIFIED_DESC\"\n  },\n  // Optional\n  \"commands\": [\n    // Can be either a string or an array of strings\n    \"scp {ARTIFACT_PATH} {SSH_USER}@{DEST_ADDRESS}:{DEST_PATH}{ARTIFACT_NAME}\"\n  ],\n  // Optional\n  \"ssh\": {\n    // If port is \u003e 0, the ssh command will be USER@HOST:PORT\n    // If the port is \u003c= 0, the ssh command will be USER@HOST\n    \"port\": 0,\n    // How long to wait for the connection to establish\n    \"sleep\": \"2000\",\n    // The ssh user\n    \"user\": \"user\",\n    // Plaintext password auth requires 'sshpass'\n    // \"password\": \"foobar\",\n    \"commands\": [\n      // Commands have to be a string\n      \"rm my-software-*.jar\"\n    ]\n  }\n}\n```\n\nThis example config does the following:\n\n1. Start ssh session\n2. Run `rm` command to delete old artifact\n3. Exit ssh session\n4. Run `scp` command to copy new artifact to server\n\nYou should also add `deploy-helper.json` to your `.gitignore` file.\n\n\u003e **Note:** There can only be one artifact.\n\n## Placeholders / Variables\n\n`{DEST_ADDRESS}`: Destination address\\\n`{DEST_NAME}`: Destination name\\\n`{DEST_PATH}`: Destination path\\\n`{SSH_USER}`: SSH user\\\n`{SSH_PORT}`: SSH port\\\n`{ARTIFACT_PATH}`: Artifact path\\\n`{ARTIFACT_NAME}`: Artifact name\n\n## Arguments\n\n| Long | Short | Description |\n| --- | --- | --- |\n| --config | -c | Override the config location |\n| --verbose | -v | If enabled the process output will be redirected to stdout \u0026 stderr |\n| --destination | -d | Override the destinations (comma seperated list) |\n\n## Installation\n\nInstalling deploy-helper is as easy as downloading the Jar from the latest release (in theory). However, you should probably keep the Jar at some sort of central location.\n\nThis is how I 'installed' deploy-helper on my Linux machine with Zsh:\n\n1. `sudo mkdir /opt/deploy-helper`\n2. `sudo chown max:max /opt/deploy-helper`\n3. `mv ~/Downloads/deploy-helper-*.jar /opt/deploy-helper`\n4. `echo \"alias deploy='java --enable-preview -jar /opt/deploy-helper/deploy-helper-VERSION.jar'\" \u003e\u003e ~/.zshrc`\n\nThen simply reopen your terminal (or `source ~/.zshrc`) and you're done!\n\n## How to run (examples)\n\nBasic command:\\\n`java --enable-preview -jar deploy-helper-VERSION.jar OPTIONS`\n\nBinding the command to an alias:\\\n`alias deploy='java --enable-preview -jar /opt/deploy-helper/deploy-helper-VERSION.jar'`\n\nRunning deploy-helper with another config:\\\n`deploy -c ~/my-deploy-config.json`\n\nRunning deploy-helper with specified destinations:\\\n`deploy -d service1,service4,service5`\n\n## Building from source\n\n**Prerequisites:**\n- Java 15\n- Maven\n- Git\n- A terminal\n\n**Steps:**\n1. Open your terminal\n2. Clone the repository `git clone https://github.com/cerus/deploy-helper.git`\n3. Go into the new folder `cd deploy-helper`\n4. Run Maven `mvn clean package`\n5. Get your fresh Jar from the target directory\n\n## Contributing\n\nPlease follow the [contribution guidelines](CONTRIBUTING.md)\n","funding_links":["https://github.com/sponsors/cerus"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerus%2Fdeploy-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcerus%2Fdeploy-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerus%2Fdeploy-helper/lists"}