MineCICD is a tool used for Minecraft Server and Network development, which can massively speed up all setup- and configuration processes. It tracks all changes with Version Control System Integration, allows for fast and safe reverts, rollbacks, insight into changes / bug tracking and much more.
Developers can use their personal IDE to edit files on their own Machine, push changes to the Repository, which automatically applies the changes on the server and performs arbitrarily defined actions / commands / scripts, with support for server shell commands.
Networks may make use of MineCICD to manage multiple servers, plugins, and configurations across all servers simultaneously, with the ability to track changes and apply them to all servers at once!
- Download the plugin from the latest release on GitHub (https://github.com/Konstanius/MineCICD/releases)
- Add the plugin into your plugins folder
- Restart the Minecraft server
- Create a Git repository (For example on GitHub at https://github.com/new or similar)
- Link the repository and your access credentials in the config
- For GitHub, you must use a Personal Access Token
- Get the token from https://github.com/settings/tokens
- It must have full repo permissions
- Set it in the config.yml under both
git.user
andgit.pass
- Other Git providers may require different credentials
- Set them in the config.yml under
git.user
andgit.pass
accordingly
- Set them in the config.yml under
- For GitHub, you must use a Personal Access Token
- Reload the config with
/minecicd reload
- Load the repository with
/minecicd pull
- Add files to Git Tracking with
/minecicd add <file>
- Load changes made to the repository with
/minecicd pull
- (Optionally) push changes from your server to the repository with
/minecicd push <commit message>
- All files that are part of the server setup and configuration should be tracked
- This includes plugins, server configurations, scripts, and other files that are part of the server setup
- You should NOT track player data, world data, or other files that are generated and updated dynamically
- Tracking world or player data will inevitably lead to conflicts and issues
- Create a webhook for your repository (Repo settings -> Webhooks -> Add webhook)
- Payload URL:
http://<your server ip>:8080/minecicd
(Port / Path configurable inconfig.yml
) - Content type:
application/json
- Set it to trigger only for
The push event
- Payload URL:
- You're all set! Now you can also use commit actions
Commit Actions are actions that are performed when a commit is pushed to the repository.
They can range from restarting / reloading the server or individual plugins to executing game commands or
defined scripts containing game commands or shell commands.
You can define commit actions as follows:
# Execution order is top to bottom for commands, scripts and restart / reload
# Only one of restart / global-reload / reload (plugin(s)) is performed.
<any other commit message>
CICD restart (Will only stop the server, starting relies on your restart script / server host)
CICD global-reload (Reload the entire server using the reload command)
CICD reload <plugin-name> (Multiple plugins via separate lines can be specified (Requires PlugManX))
CICD run <command> (Multiple commands via separate lines can be specified)
CICD script <script-name> (Multiple scripts via separate lines can be specified)
<...>
Secrets are a way of storing sensitive information, such as passwords or API keys, in a dedicated, untracked file.
They are defined in the /secrets.yml
directory, following the following format:
# secrets.yml
# For each file, create an index here
# (It is not used for anything, only to uniquely identify each secrets config block)
1:
# Each block needs to have its file path specified
file: "plugins/example-plugin-1/config.yml"
# Add secrets for each block
# the key (before the ":" will be the value that replaces the secret)
# the value (after the ":") will be the actual secret
database_password: "password"
database_username: "username"
2:
file: "plugins/example-plugin-2/config.yml"
license_key: "license_key"
After modifying this file, make sure to reload the plugin with /minecicd reload
to apply the changes.
These secrets will never be visible in the repository, but will be only be contained in the local server files.
Since Windows does not come with the sed
command, MineCICD ships with a custom implementation for Windows: plugins/MineCICD/tools/windows-replace.exe
.
If your Linux installation does not have sed
, MineCICD will use another custom implementation: plugins/MineCICD/tools/linux-replace.exe
.
Scripts are a way of storing procedures of Minecraft commands and system shell commands.
They are defined in the plugins/MineCICD/scripts
directory as <script_name>.sh
files.
For a detailed description about the syntax, see the plugins/MineCICD/scripts/example_script.sh
file.
Tracking plugin jarfiles with Git is currently only experimentally supported and can cause issues.
This is due to issues with File Locks and the way Java handles jar files, but is being worked on.
This feature is disabled by default, to enable it, do the following:
- Remove the
*.jar
line from the.gitignore
file in the server root - Install PlugManX on your server (https://www.spigotmc.org/resources/plugmanx.88135/)
- Enable the
experimental-jar-loading
option in the config.yml and reload MineCICD (/minecicd reload
)
This will unload and load plugins if their jarfiles change, are removed. or new ones are added
minecicd pull
- Pulls the latest changes from the remote or sets up the local repository if run for the first time.minecicd push <commit message>
- Pushes the latest changes to the remote.minecicd add <file / 'directory/'>
- Adds a file or directory to the repository.minecicd remove <file / 'directory/'>
- Removes a file or directory from the repository.minecicd reset <commit hash / link>
- Hard resets the current branch to the specified commit. (Commits will not be reverted)minecicd rollback <dd.MM.yyyy HH:mm:ss>
- Hard resets the current branch to the latest commit before the specified date. (Commits will not be reverted)minecicd revert <commit hash / link>
- Attempts to revert a specific commits changes.minecicd script <script name>
- Runs a script from the scripts folder.minecicd log <page / commit hash / link>
- Shows the commits made on the current branch.minecicd status
- Shows the current status of the plugin, repository, Webhook listener, and changes.minecicd resolve <merge-abort / repo-reset / reset-local-changes>
- Resolves conflicts by either aborting the merge, resetting the repository, or removing local changes.minecicd diff <local / remote>
- Shows uncommited changes (local) or unpulled changes on the remote branch (remote).minecicd reload
- Reloads the plugin configuration and webhook webserver.minecicd help
- Shows this help message.
minecicd.<subcommand>
- Allows the user to use the subcommandminecicd.notify
- Allows the user to receive notifications from actions performed by MineCICD
- Push any changes made on your server to the repository!
- Install the new version of MineCICD
- Copy the existing token from the old config and save them somewhere
- The entire plugin directory of MineCICD will reset (No server files are affected)
- Set up the new config with the token, repository url, branch name and other settings
- Run
/minecicd pull
to clone the repository
- MineCICD should automatically detect which files were added to the repository
- If not, manually add them with
/minecicd add <file / 'directory/'>