mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
Add quick-e2e tool for E2E environment setup
This commit is contained in:
50
tools/quick-e2e/README.md
Normal file
50
tools/quick-e2e/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Quick E2E environment setup
|
||||
|
||||
## Features
|
||||
|
||||
Generate a new E2E environment with the following options:
|
||||
- **Server type**: paper, folia ...
|
||||
- **Server version**: 1.19.4, 1.20.1 ...
|
||||
- **Server Build**: latest, a specific build
|
||||
- **Pre-installed plugins**: links to modrinth
|
||||
- **Custom plugin providers**: build from monorepo
|
||||
- **EULA**: true, false
|
||||
- **OP**: a specific username
|
||||
|
||||
Update an existing E2E environment, if there is a new build or plugin version available.
|
||||
|
||||
Delete an existing E2E environment.
|
||||
|
||||
## Usage
|
||||
|
||||
### Generate a new E2E environment
|
||||
|
||||
Command line arguments:
|
||||
```bash
|
||||
java -jar quick-e2e.jar
|
||||
--<generate|update|delete>
|
||||
--server-type paper
|
||||
--server-version 1.21.4
|
||||
--server-build latest
|
||||
--pre-installed-plugins "viaversion,luckperms,worldedit"
|
||||
--custom-plugin-providers "monorepo"
|
||||
--eula true
|
||||
--op "OliverHD"
|
||||
```
|
||||
|
||||
Configuration file:
|
||||
```json
|
||||
{
|
||||
"serverType": "paper",
|
||||
"serverVersion": "1.21.4",
|
||||
"serverBuild": "latest",
|
||||
"preInstalledPlugins": ["viaversion", "luckperms", "worldedit"],
|
||||
"customPluginProviders": ["monorepo"],
|
||||
"eula": true,
|
||||
"op": "OliverHD"
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
java -jar quick-e2e.jar --generate --config-file config.json
|
||||
```
|
||||
59
tools/quick-e2e/build.gradle.kts
Normal file
59
tools/quick-e2e/build.gradle.kts
Normal file
@@ -0,0 +1,59 @@
|
||||
plugins {
|
||||
id("java")
|
||||
id("maven-publish")
|
||||
id("com.gradleup.shadow")
|
||||
}
|
||||
|
||||
group = "de.oliver"
|
||||
description = "Tool to setup a complete environment for testing"
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://repo.papermc.io/repository/maven-public/")
|
||||
maven("https://repo.fancyplugins.de/releases")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("com.google.code.gson:gson:2.12.1")
|
||||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
implementation("org.jetbrains:annotations:26.0.2")
|
||||
|
||||
implementation("de.oliver.FancyAnalytics:java-sdk:0.0.2")
|
||||
implementation("de.oliver.FancyAnalytics:logger:0.0.6")
|
||||
}
|
||||
|
||||
tasks {
|
||||
jar {
|
||||
manifest {
|
||||
attributes["Main-Class"] = "de.oliver.deployment.Main"
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar{
|
||||
archiveClassifier.set("")
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
|
||||
|
||||
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
|
||||
// See https://openjdk.java.net/jeps/247 for more information.
|
||||
options.release.set(21)
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
|
||||
}
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
|
||||
}
|
||||
}
|
||||
11
tools/quick-e2e/http/paper-downloads-api.http
Normal file
11
tools/quick-e2e/http/paper-downloads-api.http
Normal file
@@ -0,0 +1,11 @@
|
||||
### Get project list
|
||||
GET https://api.papermc.io/v2/projects/
|
||||
|
||||
### Get version list of a project
|
||||
GET https://api.papermc.io/v2/projects/paper
|
||||
|
||||
### Get build list of a version
|
||||
GET https://api.papermc.io/v2/projects/paper/versions/1.21.4
|
||||
|
||||
### Download a build
|
||||
GET https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/211/downloads/paper-1.21.4-211.jar
|
||||
@@ -0,0 +1,9 @@
|
||||
package de.oliver.quicke2e;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user