alpha
Login
or
Join now
sickday.tngl.sh
/
hla-client
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
A RuneTek3 client (377) that is deobfuscated, converted to Kotlin, and includes QoL improvements.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
feat: support multi-region test boxes
author
Patrick W.
date
1 month ago
(May 7, 2026, 3:17 PM -0400)
commit
cab68a3e
cab68a3e214cc1f27ab0fe3481a84db7fa6be04a
parent
6ef2e08b
6ef2e08b36f749f46078a843c10618f3fe4a7295
+93
-8
1 changed file
Expand all
Collapse all
Unified
Split
.gitlab-ci.yml
+93
-8
.gitlab-ci.yml
Reviewed
···
4
4
5
5
variables:
6
6
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
7
7
-
PACKAGE_NAME: "rs377-client"
7
7
+
PACKAGE_NAME: "hla-client"
8
8
JAR_NAME: "377.jar"
9
9
-
ZIP_NAME: "rs377-client.zip"
9
9
+
# Server connection defaults (same across regions)
10
10
+
GAME_PORT: "43594"
11
11
+
ONDEMAND_PORT: "43594"
12
12
+
JAGGRAB_PORT: "43595"
13
13
+
HTTP_PORT: "8080"
14
14
+
RSA_PUB: "65537"
10
15
16
16
+
# Per-region build. Each matrix row produces hla-<REGION>-client.zip with the
17
17
+
# correct server host + RSA modulus baked into config/client-config.yaml.
18
18
+
#
19
19
+
# CI/CD variables required (set in Settings → CI/CD → Variables, regular type):
20
20
+
# HLA_HOST_USE # e.g. use.objects.pw
21
21
+
# HLA_HOST_USW # e.g. usw.objects.pw
22
22
+
# HLA_RSA_MODULUS_USE # decimal modulus from rsa.yml on use.objects.pw
23
23
+
# HLA_RSA_MODULUS_USW # decimal modulus from rsa.yml on usw.objects.pw
24
24
+
#
25
25
+
# To add a region: append a row to the matrix below and add HLA_HOST_<X> +
26
26
+
# HLA_RSA_MODULUS_<X> variables. Modulus values are public (anyone connecting
27
27
+
# sees them) so they don't need to be masked.
11
28
build:
12
29
stage: build
13
30
image: eclipse-temurin:21-jdk-alpine
14
31
tags:
15
32
- docker
33
33
+
parallel:
34
34
+
matrix:
35
35
+
- REGION: "us-east"
36
36
+
- REGION: "us-west"
16
37
before_script:
17
38
- apk add --no-cache zip
18
39
- chmod +x gradlew
19
40
script:
41
41
+
# Resolve region-specific values from CI variables
42
42
+
- |
43
43
+
case "$REGION" in
44
44
+
us-east)
45
45
+
HOST="${HLA_HOST_USE:?HLA_HOST_USE not set in CI vars}"
46
46
+
MODULUS="${HLA_RSA_MODULUS_USE:?HLA_RSA_MODULUS_USE not set in CI vars}"
47
47
+
;;
48
48
+
us-west)
49
49
+
HOST="${HLA_HOST_USW:?HLA_HOST_USW not set in CI vars}"
50
50
+
MODULUS="${HLA_RSA_MODULUS_USW:?HLA_RSA_MODULUS_USW not set in CI vars}"
51
51
+
;;
52
52
+
*)
53
53
+
echo "Unknown region: $REGION" >&2
54
54
+
exit 1
55
55
+
;;
56
56
+
esac
57
57
+
export HOST MODULUS
58
58
+
59
59
+
- export ZIP_NAME="hla-${REGION}-client.zip"
60
60
+
- echo "Building ${ZIP_NAME} for ${HOST} (modulus ${MODULUS:0:16}…)"
61
61
+
62
62
+
# Build the fat jar (same for all regions)
20
63
- ./gradlew clean jar
64
64
+
65
65
+
# Stage the dist directory
21
66
- mkdir -p dist/config
22
67
- cp build/libs/${JAR_NAME} dist/
23
23
-
- cp config/EXAMPLE-client-config.yaml dist/config/client-config.yaml
68
68
+
69
69
+
# Generate region-specific client-config.yaml
70
70
+
- |
71
71
+
cat > dist/config/client-config.yaml <<EOF
72
72
+
# Generated by CI for region: ${REGION}
73
73
+
# Server: ${HOST}
74
74
+
# Build: ${CI_COMMIT_SHORT_SHA}
75
75
+
net:
76
76
+
address: ${HOST}
77
77
+
game_port: ${GAME_PORT}
78
78
+
ondemand_port: ${ONDEMAND_PORT}
79
79
+
jaggrab_port: ${JAGGRAB_PORT}
80
80
+
http_port: ${HTTP_PORT}
81
81
+
cache:
82
82
+
cacheDir: ./.377
83
83
+
jaggrabEnabled: true
84
84
+
rsa:
85
85
+
rsaEnabled: true
86
86
+
rsaPub: ${RSA_PUB}
87
87
+
rsaModulus: ${MODULUS}
88
88
+
login:
89
89
+
useStaticCredentials: false
90
90
+
username: ""
91
91
+
password: ""
92
92
+
game:
93
93
+
roofsEnabled: true
94
94
+
freeTeleports: false
95
95
+
debugContext: false
96
96
+
EOF
97
97
+
98
98
+
# Launchers (matches the previous CI's behavior)
24
99
- echo '#!/bin/sh' > dist/run.sh
25
100
- echo 'cd "$(dirname "$0")" && java -jar 377.jar' >> dist/run.sh
26
101
- chmod +x dist/run.sh
27
102
- cp dist/run.sh dist/run.command
28
103
- chmod +x dist/run.command
29
104
- printf '@echo off\r\ncd /d "%%~dp0"\r\njava -jar 377.jar\r\npause\r\n' > dist/run.bat
30
30
-
- cd dist && zip -r ../${ZIP_NAME} ${JAR_NAME} config/ run.sh run.command run.bat
105
105
+
106
106
+
# Bundle
107
107
+
- cd dist && zip -r "../${ZIP_NAME}" ${JAR_NAME} config/ run.sh run.command run.bat
31
108
artifacts:
32
109
paths:
33
33
-
- ${ZIP_NAME}
110
110
+
- "hla-${REGION}-client.zip"
34
111
expire_in: 90 days
35
112
cache:
36
113
key:
···
44
121
image: curlimages/curl:latest
45
122
tags:
46
123
- docker
124
124
+
parallel:
125
125
+
matrix:
126
126
+
- REGION: "us-east"
127
127
+
- REGION: "us-west"
47
128
needs:
48
129
- job: build
130
130
+
parallel:
131
131
+
matrix:
132
132
+
- REGION: $REGION
49
133
artifacts: true
50
134
rules:
51
135
- if: $CI_COMMIT_BRANCH == "main"
52
136
script:
53
53
-
- echo "Publishing ${PACKAGE_NAME} @ ${CI_COMMIT_SHORT_SHA}"
137
137
+
- export ZIP_NAME="hla-${REGION}-client.zip"
138
138
+
- echo "Publishing ${ZIP_NAME} @ ${CI_COMMIT_SHORT_SHA}"
54
139
- |
55
55
-
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
140
140
+
curl --fail --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
56
141
--upload-file "${ZIP_NAME}" \
57
57
-
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/latest/rs377-client-latest.zip"
142
142
+
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/latest/${ZIP_NAME}"