File tree Expand file tree Collapse file tree 7 files changed +57
-89
lines changed
Expand file tree Collapse file tree 7 files changed +57
-89
lines changed Original file line number Diff line number Diff line change 1+ # Development Container Usage
2+
3+ Full development setup available as [ Development Container] ( https://containers.dev/ ) .
4+ Please use it for being able to tell "It works on my machine".
5+
6+ ** Docker is required to be installed on your machine!**
7+
8+ ## IntelliJ IDEA
9+
10+ - Open IntelliJ (Welcome screen)
11+ - Navigate to ` Remote Development ` - ` Dev Containers `
12+ - Press ` New Dev Container `
13+ - Select ` From VCS Project `
14+ - Select and connect with ` Docker `
15+ - Select ` IntelliJ IDEA `
16+ - Enter ` Git Repository ` : ` https://github.com/o7studios/cheetah-plugin `
17+ - Select ` Detection for devcontainer.json file ` ` Automatic `
18+ - Press ` Build Container and Continue `
19+
20+ ## Development Container Issues
21+
22+ If you encounter an issue with setting up a development container, please
23+ try to rebuild it first before opening a GitHub Issue. It's not uncommon
24+ that some issues may fix themselves after a fresh container rebuild.
25+
Original file line number Diff line number Diff line change 11{
2- "name" : " Cheetah plugin" ,
2+ "name" : " o7studios/cheetah- plugin" ,
33 "image" : " ubuntu:latest" ,
44 "customizations" : {
55 "jetbrains" : {
1515 "ghcr.io/devcontainers/features/docker-outside-of-docker:1" : {},
1616 "ghcr.io/rio/features/k3d:1" : {},
1717 "ghcr.io/devcontainers/features/kubectl-helm-minikube:1" : {},
18- "ghcr.io/devcontainers/features/java:1" : {
19- "version" : " 23" ,
20- "installGradle" : true
21- }
22- },
23- "runArgs" : [
24- " --add-host=host.docker.internal:host-gateway" ,
25- " --env-file=${localEnv:HOME}/dev.env"
26- ],
27- "containerEnv" : {
28- "TEST_CLUSTER_NAME" : " o7-test-cluster"
18+ "ghcr.io/devcontainers/features/java:1" : {"version" : " 23" , "installGradle" : true }
2919 },
20+ "runArgs" : [" --add-host=host.docker.internal:host-gateway" , " --env-file=${localEnv:HOME}/dev.env" ],
21+ "containerEnv" : {"TEST_CLUSTER_NAME" : " o7-test-cluster" },
3022 "remoteUser" : " ubuntu"
3123}
Original file line number Diff line number Diff line change 1- FROM --platform=$BUILDPLATFORM debian AS paper
2-
3- RUN apt-get update
4- RUN apt-get install jq curl wget -y
1+ FROM --platform=$BUILDPLATFORM ghcr.io/o7studios/scripts:latest AS paper
52
63WORKDIR /paper
74
8- COPY test/paper/install.sh ./install.sh
9-
10- RUN chmod +x ./install.sh && ./install.sh
11- RUN rm ./install.sh -rf
12-
5+ RUN paper 1.21.8
6+ RUN floodgate latest ./plugins/floodgate.jar
7+ RUN viaversion latest ./plugins/viaversion.jar
8+ RUN octopus latest ./plugins/octopus.jar
139
1410FROM --platform=$BUILDPLATFORM ghcr.io/graalvm/jdk-community:25 AS prerun
1511
1612WORKDIR /paper
1713
1814COPY --from=paper /paper/ .
1915
20- COPY test/paper/bukkit.yml .
21- COPY test/paper/spigot.yml .
22- COPY test/paper/server.properties .
16+ COPY test/paper/* ./
2317
2418RUN java -jar paperclip.jar --nogui
2519
Original file line number Diff line number Diff line change @@ -25,25 +25,4 @@ depend:
2525
2626## Development
2727
28- Full development setup available as [Development Container](https://containers.dev/).
29- Please use it for being able to tell "It works on my machine".
30-
31- **Docker is required to be installed on your machine!**
32-
33- ### IntelliJ IDEA
34-
35- - Open IntelliJ (Welcome screen)
36- - Navigate to ` Remote Development` - `Dev Containers`
37- - Press `New Dev Container`
38- - Select `From VCS Project`
39- - Select and connect with `Docker`
40- - Select `IntelliJ IDEA`
41- - Enter `Git Repository` : ` https://github.com/o7studios/cheetah-plugin`
42- - Select `Detection for devcontainer.json file` `Automatic`
43- - Press `Build Container and Continue`
44-
45- # ## Development Container Issues
46-
47- If you encounter an issue with setting up a development container, please
48- try to rebuild it first before opening a GitHub Issue. It's not uncommon
49- that some issues may fix themselves after a fresh container rebuild.
28+ Please check out [Development Container](.devcontainer/README.md) for project setup.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44API_PORT=6550
55API_HOST=host.docker.internal
66
7+ while [[ " $# " -gt 0 ]]; do
8+ case $1 in
9+ --delete)
10+ echo " π Deleting cluster $TEST_CLUSTER_NAME ..."
11+ k3d cluster delete " $TEST_CLUSTER_NAME " || true
12+ exit 0
13+ ;;
14+ --recreate)
15+ echo " π Recreating cluster $TEST_CLUSTER_NAME ..."
16+ k3d cluster delete " $TEST_CLUSTER_NAME " || true
17+ ;;
18+ * )
19+ echo " β Unknown parameter: $1 "
20+ exit 1
21+ ;;
22+ esac
23+ shift
24+ done
25+
726if ! k3d cluster list | grep -qw " $TEST_CLUSTER_NAME " ; then
827 echo " π§ K3d cluster $TEST_CLUSTER_NAME not found. Creating it..."
928 k3d cluster create " $TEST_CLUSTER_NAME " --api-port " $API_PORT " -p " 25565:25565@loadbalancer" -p " 19132:19132/udp@loadbalancer"
@@ -28,6 +47,8 @@ kubectl config set-cluster k3d-"$TEST_CLUSTER_NAME" \
2847
2948kubectl config use-context k3d-" $TEST_CLUSTER_NAME "
3049
50+ pids=()
51+
3152if ! kubectl get secret github-token > /dev/null 2>&1 ; then
3253 echo " π Creating secret for github-token on K3d cluster $TEST_CLUSTER_NAME ..."
3354 kubectl create secret generic github-token --from-literal=" GITHUB_TOKEN=$GITHUB_TOKEN "
Load Diff This file was deleted.
You canβt perform that action at this time.
0 commit comments