Skip to content

Commit

Permalink
feat(tf2-competitive): remove TFTrue (#69)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: TFTrue image is deprecated & removed
  • Loading branch information
garrappachc authored Jul 25, 2022
1 parent 458fb34 commit d89a6ec
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 159 deletions.
73 changes: 11 additions & 62 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
name: Checkout
uses: actions/checkout@v3
-
name: Download tf2-sourcmeomd
name: Download tf2-sourcemod
uses: actions/download-artifact@v2
with:
name: tf2-sourcemod
Expand Down Expand Up @@ -150,17 +150,15 @@ jobs:
path: /tmp/tf2-mge.tar.gz
if-no-files-found: error

tf2-tftrue:
tf2-competitive:
runs-on: ubuntu-latest
needs: tf2-sourcemod
outputs:
tf2-tftrue-tag: ${{ steps.docker_meta.outputs.version }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Download tf2-sourcmeomd
name: Download tf2-sourcemod
uses: actions/download-artifact@v2
with:
name: tf2-sourcemod
Expand All @@ -170,70 +168,21 @@ jobs:
id: docker_meta
uses: docker/metadata-action@v4
with:
images: melkortf/tf2-tftrue
images: melkortf/tf2-competitive
tags: type=sha,format=long
-
name: Load tf2-sourcemod
run: |
docker load --input /tmp/tf2-sourcemod.tar.gz
docker image ls
-
name: Build
id: docker_build
uses: docker/build-push-action@v3
with:
context: ./packages/tf2-tftrue
build-args: |
TF2_SOURCEMOD_TAG=${{ needs.tf2-sourcemod.outputs.tf2-sourcemod-tag }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
load: true
pull: false
platforms: linux/amd64
-
name: Save docker image
run: docker save melkortf/tf2-tftrue:${{ steps.docker_meta.outputs.version }} | gzip > /tmp/tf2-tftrue.tar.gz
-
name: Upload docker image
uses: actions/upload-artifact@v2
with:
name: tf2-tftrue
path: /tmp/tf2-tftrue.tar.gz
if-no-files-found: error

tf2-competitive:
runs-on: ubuntu-latest
needs: tf2-tftrue
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Download tf2-tftrue
uses: actions/download-artifact@v2
with:
name: tf2-tftrue
path: /tmp
-
name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: melkortf/tf2-competitive
tags: type=sha,format=long
-
name: Load tf2-tftrue
run: |
docker load --input /tmp/tf2-tftrue.tar.gz
docker image ls
-
name: Build
id: docker_build
uses: docker/build-push-action@v3
with:
context: ./packages/tf2-competitive
build-args: |
TF2_TFTRUE_TAG=${{ needs.tf2-tftrue.outputs.tf2-tftrue-tag }}
TF2_SOURCEMOD_TAG=${{ needs.tf2-sourcemod.outputs.tf2-sourcemod-tag }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
load: true
Expand All @@ -252,16 +201,16 @@ jobs:

tf2-dm:
runs-on: ubuntu-latest
needs: tf2-tftrue
needs: tf2-sourcemod
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Download tf2-tftrue
name: Download tf2-sourcemod
uses: actions/download-artifact@v2
with:
name: tf2-tftrue
name: tf2-sourcemod
path: /tmp
-
name: Docker meta
Expand All @@ -271,9 +220,9 @@ jobs:
images: melkortf/tf2-dm
tags: type=sha,format=long
-
name: Load tf2-tftrue
name: Load tf2-sourcemod
run: |
docker load --input /tmp/tf2-tftrue.tar.gz
docker load --input /tmp/tf2-sourcemod.tar.gz
docker image ls
-
name: Build
Expand All @@ -282,7 +231,7 @@ jobs:
with:
context: ./packages/tf2-dm
build-args: |
TF2_TFTRUE_TAG=${{ needs.tf2-tftrue.outputs.tf2-tftrue-tag }}
TF2_SOURCEMOD_TAG=${{ needs.tf2-sourcemod.outputs.tf2-sourcemod-tag }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
load: true
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"sourcemod"
]
}
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,38 +85,34 @@ $ docker pull melkortf/tf2-sourcemod
TF2 server with [Metamod:Source](https://www.sourcemm.net/) and [SourceMod](https://www.sourcemod.net/) installed.


## tf2-tftrue

```
$ docker pull melkortf/tf2-tftrue
```

TF2 server with [Metamod:Source](https://www.sourcemm.net/), [SourceMod](https://www.sourcemod.net/) and [TFTrue](https://tftrue.esport-tools.net/) addons installed.

Environment variable | Default value | Used in | Description
-------------------- | ------------- | ------- | -----------
LOGS_TF_APIKEY | | `tftrue_logs_apikey ${LOGS_TF_APIKEY}` | The API key used to upload logs to logs.tf.
LOGS_TF_PREFIX | | `tftrue_logs_prefix ${LOGS_TF_PREFIX}` | The prefix to add in the log name when uploading to logs.tf.


## tf2-competitive

```
$ docker pull melkortf/tf2-competitive
```

TF2 server configured to be used in competitive matches.
TF2 server configured to be used in competitive matches. The following plugins, add-ons and configs are installed:

* [TF2 competitive fixes](https://github.com/ldesgoui/tf2-comp-fixes)
* [Updated pause plugin](https://github.com/l-Aad-l/updated-pause-plugin)
* [SrcTV+](https://github.com/dalegaard/srctvplus)
* [Improved Match Timer plugin](https://github.com/dewbsku/Improved-Match-Timer)
* [Supplemental Stats 2](https://github.com/F2/F2s-sourcemod-plugins#supplemental-stats-2-)
* [Medic Stats](https://github.com/F2/F2s-sourcemod-plugins#medic-stats-)
* [RestoreScore](https://github.com/F2/F2s-sourcemod-plugins#restorescore-)
* [LogsTF](https://github.com/F2/F2s-sourcemod-plugins#logstf-)
* [RecordSTV](https://github.com/F2/F2s-sourcemod-plugins#recordstv-)
* [WaitForSTV](https://github.com/F2/F2s-sourcemod-plugins#waitforstv-)
* [FixStvSlot](https://github.com/F2/F2s-sourcemod-plugins#fixstvslot-)
* [AFK](https://github.com/F2/F2s-sourcemod-plugins#afk-)
* [tf2rue](https://github.com/sapphonie/tf2rue)
* [ETF2L.org configs](https://github.com/ETF2L/gameserver-configs)
* [RGL.gg configs](https://github.com/RGLgg/server-resources-updater/tree/master/cfg)

Environment variable | Default value | Used in | Description
-------------------- | ------------- | ------- | -----------
DEMOS_TF_APIKEY | | sm_demostf_apikey ${DEMOS_TF_APIKEY} | The API key used to upload the demo to [demos.tf](https://demos.tf/).
DEMOS_TF_APIKEY | | `sm_demostf_apikey ${DEMOS_TF_APIKEY}` | The API key used to upload the demo to [demos.tf](https://demos.tf/).
LOGS_TF_APIKEY | | `logstf_apikey ${LOGS_TF_APIKEY}` | The API key used to upload logs to logs.tf.


## tf2-dm
Expand Down
50 changes: 46 additions & 4 deletions packages/tf2-competitive/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG TF2_TFTRUE_TAG=latest
FROM melkortf/tf2-tftrue:${TF2_TFTRUE_TAG}
ARG TF2_SOURCEMOD_TAG=latest
FROM melkortf/tf2-sourcemod:${TF2_SOURCEMOD_TAG}
LABEL maintainer="[email protected]"

COPY checksum.md5 .
Expand Down Expand Up @@ -46,10 +46,40 @@ ARG SRCTV_PLUS_VDF_URL=https://github.com/dalegaard/srctvplus/releases/download/
ARG IMPROVED_MATCH_TIMER_PLUGIN_FILE_NAME=Improved-Match-Timer-main.zip
ARG IMPROVED_MATCH_TIMER_PLUGIN_URL=https://github.com/dewbsku/Improved-Match-Timer/archive/refs/heads/main.zip

ARG SUPSTATS2_PLUGIN_FILE_NAME=supstats2.zip
ARG SUPSTATS2_PLUGIN_URL=http://sourcemod.krus.dk/supstats2.zip

ARG MEDIC_STATS_PLUGIN_FILE_NAME=medicstats.zip
ARG MEDIC_STATS_PLUGIN_URL=http://sourcemod.krus.dk/medicstats.zip

ARG RESTORE_SCORE_PLUGIN_FILE_NAME=restorescore.zip
ARG RESTORE_SCORE_PLUGIN_URL=http://sourcemod.krus.dk/restorescore.zip

ARG LOGSTF_PLUGIN_FILE_NAME=logstf.zip
ARG LOGSTF_PLUGIN_URL=http://sourcemod.krus.dk/logstf.zip

ARG RECORD_STV_PLUGIN_FILE_NAME=recordstv.zip
ARG RECORD_STV_PLUGIN_URL=http://sourcemod.krus.dk/recordstv.zip

ARG WAIT_FOR_STV_PLUGIN_FILE_NAME=waitforstv.zip
ARG WAIT_FOR_STV_PLUGIN_URL=http://sourcemod.krus.dk/waitforstv.zip

ARG FIX_STV_SLOT_PLUGIN_FILE_NAME=fixstvslot.zip
ARG FIX_STV_SLOT_PLUGIN_URL=http://sourcemod.krus.dk/fixstvslot.zip

ARG AFK_PLUGIN_FILE_NAME=afk.zip
ARG AFK_PLUGIN_URL=http://sourcemod.krus.dk/afk.zip

ARG TF2RUE_PLUGIN_FILE_NAME=tf2rue.zip
ARG TF2RUE_PLUGIN_VERSION=v0.0.4
ARG TF2RUE_PLUGIN_URL=https://github.com/sapphonie/tf2rue/releases/download/${TF2RUE_PLUGIN_VERSION}/${TF2RUE_PLUGIN_FILE_NAME}

RUN \
# download all the plugins
wget -nv "${SOAP_DM_PLUGIN_URL}" "${DHOOKS_PLUGIN_URL}" "${COMP_FIXES_PLUGIN_URL}" "${UPDATED_PAUSE_PLUGIN_URL}" "${CURL_PLUGIN_URL}" "${CURL_EXTENSION_URL}" \
"${ETF2L_CONFIGS_URL}" "${RGL_CONFIGS_URL}" "${DEMOS_TF_PLUGIN_URL}" "${SRCTV_PLUS_SO_URL}" "${SRCTV_PLUS_VDF_URL}" \
wget -nv "${SOAP_DM_PLUGIN_URL}" "${DHOOKS_PLUGIN_URL}" "${COMP_FIXES_PLUGIN_URL}" "${UPDATED_PAUSE_PLUGIN_URL}" "${CURL_PLUGIN_URL}" \
"${CURL_EXTENSION_URL}" "${ETF2L_CONFIGS_URL}" "${RGL_CONFIGS_URL}" "${DEMOS_TF_PLUGIN_URL}" "${SRCTV_PLUS_SO_URL}" "${SRCTV_PLUS_VDF_URL}" \
"${SUPSTATS2_PLUGIN_URL}" "${MEDIC_STATS_PLUGIN_URL}" "${RESTORE_SCORE_PLUGIN_URL}" "${LOGSTF_PLUGIN_URL}" "${RECORD_STV_PLUGIN_URL}" \
"${WAIT_FOR_STV_PLUGIN_URL}" "${FIX_STV_SLOT_PLUGIN_URL}" "${AFK_PLUGIN_URL}" "${TF2RUE_PLUGIN_URL}" \
&& wget -nv "${MGEMOD_PLUGIN_URL}" -O "${MGEMOD_PLUGIN_FILE_NAME}" \
&& wget -nv "${IMPROVED_MATCH_TIMER_PLUGIN_URL}" -O "${IMPROVED_MATCH_TIMER_PLUGIN_FILE_NAME}" \
# verify md5 checksums
Expand All @@ -70,6 +100,15 @@ RUN \
&& mv "${DEMOS_TF_PLUGIN_FILE_NAME}" "${SERVER_DIR}/tf/addons/sourcemod/plugins/${DEMOS_TF_PLUGIN_FILE_NAME}" \
&& mv "${SRCTV_PLUS_SO_FILE_NAME}" "${SERVER_DIR}/tf/addons/${SRCTV_PLUS_SO_FILE_NAME}" \
&& mv "${SRCTV_PLUS_VDF_FILE_NAME}" "${SERVER_DIR}/tf/addons/${SRCTV_PLUS_VDF_FILE_NAME}" \
&& unzip -q "${SUPSTATS2_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/plugins/" \
&& unzip -q "${MEDIC_STATS_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/plugins/" \
&& unzip -q "${RESTORE_SCORE_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/plugins/" \
&& unzip -q "${LOGSTF_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/plugins/" \
&& unzip -q "${RECORD_STV_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/plugins/" \
&& unzip -q "${WAIT_FOR_STV_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/plugins/" \
&& unzip -q "${FIX_STV_SLOT_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/plugins/" \
&& unzip -q "${AFK_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/plugins/" \
&& unzip -q -n "${TF2RUE_PLUGIN_FILE_NAME}" -d "${SERVER_DIR}/tf/addons/sourcemod/" \
# cleanup
&& rm "${SOAP_DM_PLUGIN_FILE_NAME}" \
&& rm "${DHOOKS_PLUGIN_FILE_NAME}" \
Expand All @@ -80,11 +119,14 @@ RUN \
&& rm "${ETF2L_CONFIGS_FILE_NAME}" \
&& rm -r "${RGL_CONFIGS_FILE_NAME}" "cfg" \
&& rm -r "${IMPROVED_MATCH_TIMER_PLUGIN_FILE_NAME}" "Improved-Match-Timer-main" \
&& rm "${SUPSTATS2_PLUGIN_FILE_NAME}" "${MEDIC_STATS_PLUGIN_FILE_NAME}" "${RESTORE_SCORE_PLUGIN_FILE_NAME}" "${LOGSTF_PLUGIN_FILE_NAME}" \
"${RECORD_STV_PLUGIN_FILE_NAME}" "${WAIT_FOR_STV_PLUGIN_FILE_NAME}" "${FIX_STV_SLOT_PLUGIN_FILE_NAME}" "${AFK_PLUGIN_FILE_NAME}" "${TF2RUE_PLUGIN_FILE_NAME}" \
&& rm "checksum.md5" \
# remove useless (and potentially harmful) plugins
&& rm "$SERVER_DIR/tf/addons/sourcemod/plugins/"{nextmap,funcommands,funvotes}.smx


ENV DEMOS_TF_APIKEY=
ENV LOGS_TF_APIKEY=

COPY cfg/* ${SERVER_DIR}/tf/cfg/
12 changes: 1 addition & 11 deletions packages/tf2-competitive/cfg/server.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,5 @@ tv_maxrate 0

sv_quota_stringcmdspersecond 400

tftrue_no_hats 0
tftrue_no_misc 0
tftrue_no_action 0
tftrue_tv_autorecord 1
tftrue_tv_demos_path demos
tftrue_logs_roundend 0
tftrue_logs_accuracy 1

tftrue_logs_apikey "${LOGS_TF_APIKEY}"
tftrue_logs_prefix "${LOGS_TF_PREFIX}"

logstf_apikey "${LOGS_TF_APIKEY}"
sm_demostf_apikey "${DEMOS_TF_APIKEY}"
9 changes: 9 additions & 0 deletions packages/tf2-competitive/checksum.md5
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ b82f1184a9209e87251a03cfe9aa4221 soap.zip
521fa89da1771fe54fe918433da3963f tf2-comp-fixes.zip
046fe7d2cb239f207ddd8784a4a83faa updated-pause-plugin.zip
7249cf4a042ef356c7f0c7cb0ea184a6 Improved-Match-Timer-main.zip
d3a9601ad2a40ec9b950ab14711c1f72 supstats2.zip
31782661e151d50ab5a9a8b3a9937ea1 medicstats.zip
d3b61538a7081e22198734fd9557945e restorescore.zip
93fd7b36d7c71ab8e66123f673fe9c89 logstf.zip
5a29dfff9df747717858be9b3bf8295e recordstv.zip
f0baf4be1c3273b763d03d4af3e40b2a waitforstv.zip
46d1bcc24e00f007a836452b5fc56adf fixstvslot.zip
0eeaaa1473645e817ce71941033a312b afk.zip
dc5ed138a53c9af951f120cf3e611a3d tf2rue.zip
4 changes: 2 additions & 2 deletions packages/tf2-dm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG TF2_TFTRUE_TAG=latest
FROM melkortf/tf2-tftrue:${TF2_TFTRUE_TAG}
ARG TF2_SOURCEMOD_TAG=latest
FROM melkortf/tf2-sourcemod:${TF2_SOURCEMOD_TAG}
LABEL maintainer="[email protected]"

COPY checksum.md5 .
Expand Down
5 changes: 0 additions & 5 deletions packages/tf2-dm/server.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,3 @@ sm_classrestrict_red_soldiers 2
sm_classrestrict_red_spies 0

mp_tournament_whitelist "cfg/custom_whitelist_11769.txt"

tftrue_gamedesc "deathmatch"
tftrue_no_hats 0
tftrue_no_misc 0
tftrue_no_action 0
32 changes: 0 additions & 32 deletions packages/tf2-tftrue/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions packages/tf2-tftrue/TFTrue.vdf

This file was deleted.

23 changes: 0 additions & 23 deletions packages/tf2-tftrue/server.cfg.template

This file was deleted.

0 comments on commit d89a6ec

Please sign in to comment.