Skip to content

Commit

Permalink
Merge pull request #77 from startersclan/enhancement/bump-bf2stats-va…
Browse files Browse the repository at this point in the history
…riants-to-bf2stats-2.3.7-and-bf2stats-2.4.5

Enhancement: Bump `bf2stats` variants to `bf2stats-2.3.7` and `bf2stats-2.4.5`
  • Loading branch information
leojonathanoh committed Jan 31, 2023
2 parents fdbed5a + 661624f commit cd207c4
Show file tree
Hide file tree
Showing 35 changed files with 3,861 additions and 23 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,11 @@ jobs:
run: docker logout
if: always()

build-v1-5-3153-0-bf2all64-bf2stats-2-3-6:
build-v1-5-3153-0-bf2all64-bf2stats-2-3-7:
runs-on: ubuntu-latest
env:
VARIANT_TAG: v1.5.3153.0-bf2all64-bf2stats-2.3.6
VARIANT_BUILD_DIR: variants/v1.5.3153.0-bf2all64-bf2stats-2.3.6
VARIANT_TAG: v1.5.3153.0-bf2all64-bf2stats-2.3.7
VARIANT_BUILD_DIR: variants/v1.5.3153.0-bf2all64-bf2stats-2.3.7
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -556,11 +556,11 @@ jobs:
run: docker logout
if: always()

build-v1-5-3153-0-bf2all64-bf2stats-2-4-4:
build-v1-5-3153-0-bf2all64-bf2stats-2-4-5:
runs-on: ubuntu-latest
env:
VARIANT_TAG: v1.5.3153.0-bf2all64-bf2stats-2.4.4
VARIANT_BUILD_DIR: variants/v1.5.3153.0-bf2all64-bf2stats-2.4.4
VARIANT_TAG: v1.5.3153.0-bf2all64-bf2stats-2.4.5
VARIANT_BUILD_DIR: variants/v1.5.3153.0-bf2all64-bf2stats-2.4.5
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1236,11 +1236,11 @@ jobs:
run: docker logout
if: always()

build-v1-5-3153-0-bf2stats-2-3-6:
build-v1-5-3153-0-bf2stats-2-3-7:
runs-on: ubuntu-latest
env:
VARIANT_TAG: v1.5.3153.0-bf2stats-2.3.6
VARIANT_BUILD_DIR: variants/v1.5.3153.0-bf2stats-2.3.6
VARIANT_TAG: v1.5.3153.0-bf2stats-2.3.7
VARIANT_BUILD_DIR: variants/v1.5.3153.0-bf2stats-2.3.7
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1372,11 +1372,11 @@ jobs:
run: docker logout
if: always()

build-v1-5-3153-0-bf2stats-2-4-4:
build-v1-5-3153-0-bf2stats-2-4-5:
runs-on: ubuntu-latest
env:
VARIANT_TAG: v1.5.3153.0-bf2stats-2.4.4
VARIANT_BUILD_DIR: variants/v1.5.3153.0-bf2stats-2.4.4
VARIANT_TAG: v1.5.3153.0-bf2stats-2.4.5
VARIANT_BUILD_DIR: variants/v1.5.3153.0-bf2stats-2.4.5
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1917,7 +1917,7 @@ jobs:
if: always()

update-draft-release:
needs: [build-v1-5-3153-0, build-v1-5-3153-0-bf2all64, build-v1-5-3153-0-bf2all64-bf2stats-2-2-0, build-v1-5-3153-0-bf2all64-bf2stats-2-3-6, build-v1-5-3153-0-bf2all64-bf2stats-2-4-4, build-v1-5-3153-0-bf2all64-bf2stats-3-1-0, build-v1-5-3153-0-bf2all64-bf2stats-3-1-2, build-v1-5-3153-0-bf2hub, build-v1-5-3153-0-bf2stats-2-2-0, build-v1-5-3153-0-bf2stats-2-3-6, build-v1-5-3153-0-bf2stats-2-4-4, build-v1-5-3153-0-bf2stats-3-1-0, build-v1-5-3153-0-bf2stats-3-1-2, build-v1-5-3153-0-fh2-4-6-304]
needs: [build-v1-5-3153-0, build-v1-5-3153-0-bf2all64, build-v1-5-3153-0-bf2all64-bf2stats-2-2-0, build-v1-5-3153-0-bf2all64-bf2stats-2-3-7, build-v1-5-3153-0-bf2all64-bf2stats-2-4-5, build-v1-5-3153-0-bf2all64-bf2stats-3-1-0, build-v1-5-3153-0-bf2all64-bf2stats-3-1-2, build-v1-5-3153-0-bf2hub, build-v1-5-3153-0-bf2stats-2-2-0, build-v1-5-3153-0-bf2stats-2-3-7, build-v1-5-3153-0-bf2stats-2-4-5, build-v1-5-3153-0-bf2stats-3-1-0, build-v1-5-3153-0-bf2stats-3-1-2, build-v1-5-3153-0-fh2-4-6-304]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
Expand All @@ -1930,7 +1930,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-draft-release:
needs: [build-v1-5-3153-0, build-v1-5-3153-0-bf2all64, build-v1-5-3153-0-bf2all64-bf2stats-2-2-0, build-v1-5-3153-0-bf2all64-bf2stats-2-3-6, build-v1-5-3153-0-bf2all64-bf2stats-2-4-4, build-v1-5-3153-0-bf2all64-bf2stats-3-1-0, build-v1-5-3153-0-bf2all64-bf2stats-3-1-2, build-v1-5-3153-0-bf2hub, build-v1-5-3153-0-bf2stats-2-2-0, build-v1-5-3153-0-bf2stats-2-3-6, build-v1-5-3153-0-bf2stats-2-4-4, build-v1-5-3153-0-bf2stats-3-1-0, build-v1-5-3153-0-bf2stats-3-1-2, build-v1-5-3153-0-fh2-4-6-304]
needs: [build-v1-5-3153-0, build-v1-5-3153-0-bf2all64, build-v1-5-3153-0-bf2all64-bf2stats-2-2-0, build-v1-5-3153-0-bf2all64-bf2stats-2-3-7, build-v1-5-3153-0-bf2all64-bf2stats-2-4-5, build-v1-5-3153-0-bf2all64-bf2stats-3-1-0, build-v1-5-3153-0-bf2all64-bf2stats-3-1-2, build-v1-5-3153-0-bf2hub, build-v1-5-3153-0-bf2stats-2-2-0, build-v1-5-3153-0-bf2stats-2-3-7, build-v1-5-3153-0-bf2stats-2-4-5, build-v1-5-3153-0-bf2stats-3-1-0, build-v1-5-3153-0-bf2stats-3-1-2, build-v1-5-3153-0-fh2-4-6-304]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ All images contain [`Battlefield 2 Server 1.50`](https://www.bf-games.net/downlo
| `:v1.5.3153.0`, `:latest` | [View](variants/v1.5.3153.0 ) |
| `:v1.5.3153.0-bf2all64` | [View](variants/v1.5.3153.0-bf2all64 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.2.0` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.2.0 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.3.6` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.3.6 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.4.4` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.4.4 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.3.7` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.3.7 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-2.4.5` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.4.5 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-3.1.0` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-3.1.0 ) |
| `:v1.5.3153.0-bf2all64-bf2stats-3.1.2` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-3.1.2 ) |
| `:v1.5.3153.0-bf2hub` | [View](variants/v1.5.3153.0-bf2hub ) |
| `:v1.5.3153.0-bf2stats-2.2.0` | [View](variants/v1.5.3153.0-bf2stats-2.2.0 ) |
| `:v1.5.3153.0-bf2stats-2.3.6` | [View](variants/v1.5.3153.0-bf2stats-2.3.6 ) |
| `:v1.5.3153.0-bf2stats-2.4.4` | [View](variants/v1.5.3153.0-bf2stats-2.4.4 ) |
| `:v1.5.3153.0-bf2stats-2.3.7` | [View](variants/v1.5.3153.0-bf2stats-2.3.7 ) |
| `:v1.5.3153.0-bf2stats-2.4.5` | [View](variants/v1.5.3153.0-bf2stats-2.4.5 ) |
| `:v1.5.3153.0-bf2stats-3.1.0` | [View](variants/v1.5.3153.0-bf2stats-3.1.0 ) |
| `:v1.5.3153.0-bf2stats-3.1.2` | [View](variants/v1.5.3153.0-bf2stats-3.1.2 ) |
| `:v1.5.3153.0-fh2-4.6.304` | [View](variants/v1.5.3153.0-fh2-4.6.304 ) |
Expand Down Expand Up @@ -58,7 +58,7 @@ docker run --rm -it -p 16567:16567/udp -p 29900:29900/udp \
-v serversettings.con:/server/bf2/mods/bf2/settings/serversettings.con \
-v maplist.con:/server/bf2/mods/bf2/settings/maplist.con \
-v BF2StatisticsConfig.py:/server/bf2/python/bf2/BF2StatisticsConfig.py:ro \
startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.4.4
startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.4.5

# bf2 server with bf2stats 3 python files and custom configs
docker run --rm -it -p 16567:16567/udp -p 29900:29900/udp \
Expand Down
10 changes: 6 additions & 4 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ $local:VARIANTS_MATRIX = @(
@{ components = @(); tag_as_latest = $true }
@{ components = @( 'bf2all64' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.2.0' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.3.6' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.4.4' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.3.7' ) }
@{ components = @( 'bf2all64', 'bf2stats-2.4.5' ) }
@{ components = @( 'bf2all64', 'bf2stats-3.1.0' ) }
@{ components = @( 'bf2all64', 'bf2stats-3.1.2' ) }
@{ components = @( 'bf2hub' ) }
@{ components = @( 'bf2stats-2.2.0' ) }
@{ components = @( 'bf2stats-2.3.6' ) }
@{ components = @( 'bf2stats-2.4.4' ) }
@{ components = @( 'bf2stats-2.3.7' ) }
@{ components = @( 'bf2stats-2.4.5' ) }
@{ components = @( 'bf2stats-3.1.0' ) }
@{ components = @( 'bf2stats-3.1.2' ) }
@{ components = @( 'fh2-4.6.304' ) }
Expand Down Expand Up @@ -67,11 +67,13 @@ b9569819f7c58b70ff3e66d9219aed78ad6433d5cbba58f46b7bc0bf9eeb6d89 2.3.1.zip
37b6c6f08d5ac146185db8f3b2eb41add5f3dfb30ec79dda1b3c86ae7cac17e0 2.3.4.zip
81d37e150a44261dbac82b0f2590268ec8a9dc4a311bec0f0bf3a45d2969fb8d 2.3.5.zip
af34261aec86749a65b358b5325639f724ae84f52c97f8cdddba6e867836e8eb 2.3.6.zip
89a0f56becd310c02cc7a8200c3a235bde7a7edf0b8b221c42aa60de02ae2d9a 2.3.7.zip
adb1c8d60b9cafc6f27d6722aa084b0bfefe828653abe8845c8858607cb7e3e0 2.4.0.zip
f1126f700eabf0164e389bfbf62d74cefe891fe2a888811c1da57a071a35f89f 2.4.1.zip
f7c47b22e30548737b05ddb9f8ef8e33a108b9184b4b2818759a318bd621f374 2.4.2.zip
8dc15a5398c070f1ceb236c2e78b5d6095338f6e075e4e7ca4345a50f0091cee 2.4.3.zip
e9b6fe8ae1f2306b50d60a4ca05a39d02036b40e741884d3860959aa70b2500a 2.4.4.zip
b0a8b23841c5d3fac51650a6da8ff0e77c1d143a7aaf37c40c498077d71a2a2f 2.4.5.zip
"@
bf2stats_3_statspython_sha256sum = @"
ab6d0f2dc3c90223524a6d97dd3100796fdf266444b5cd2f066116b977d3551c 3.1.0.zip
Expand Down
87 changes: 87 additions & 0 deletions variants/v1.5.3153.0-bf2all64-bf2stats-2.3.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
FROM ubuntu:16.04 as install
ARG TARGETPLATFORM=linux/amd64
ARG BUILDPLATFORM=linux/amd64
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

# Install network utilities which can be useful for debugging issues
# Install unzip and zip for the sake of applying ESAI strategies in ./mods/*/levels/*/server.zip at './GameModes/[gpm_coop|gpm_cq|sp1|sp2|sp3]/[16|32|64]/AI/Strategies.ai'
RUN export DEBIAN_FRONTEND=noninteractive; \
apt-get update; \
apt-get install --no-install-recommends -y \
ca-certificates \
curl \
conntrack dnsutils iproute2 netcat net-tools tcpdump \
unzip zip \
; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

# Install Battlefield 2 server
WORKDIR /root
RUN set -eux; \
curl -sSLO https://files.startersclan.com/ea/bf2/bf2-linuxded-1.5.3153.0-installer.tgz; \
sha256sum bf2-linuxded-1.5.3153.0-installer.tgz | grep "^4d849218c1725e7bd6a7e7f164e27b036248f8ded2e30340dd0722c1dfffbab6 "; \
tar -zxvf bf2-linuxded-1.5.3153.0-installer.tgz; \
sh bf2-linuxded-1.5.3153.0-installer.sh --target /install --noexec --info; \
sh bf2-linuxded-1.5.3153.0-installer.sh --target /install --noexec; \
rm -v bf2-linuxded-1.5.3153.0-installer.sh; \
rm -v bf2-linuxded-1.5.3153.0-installer.tgz; \
cd /install; \
mkdir -p /server; \
# Show the licenses without a pager
cat /install/license.sh | sed 's/^more/cat/' > /install/license-fixed.sh; \
# Agree to licenses
printf '\naccept\n\nyes\n/server\ny\n' | sh /install/license-fixed.sh; \
find /server; \
rm -rf /install;

# Install bf2all64 mod
WORKDIR /root
RUN set -eux; \
curl -sSLO https://files.startersclan.com/ea/bf2/bf2all64_v1.0_setup.zip; \
sha256sum bf2all64_v1.0_setup.zip | grep '^4ee82d91043c4afbf1bed50787cbf98af124bd7e6c608cdb0f5115c7761024f1 '; \
unzip bf2all64_v1.0_setup.zip -d extract; \
rm -rf /server/bf2/mods/bf2all64; \
mv extract/bf2all64 /server/bf2/mods; \
rm -fv bf2all64_v1.0_setup.zip;

# Install bf2stats 2.3.7
WORKDIR /root
RUN set -eux; \
curl -sSLO https://github.com/startersclan/bf2stats/archive/refs/tags/2.3.7.zip; \
echo "89a0f56becd310c02cc7a8200c3a235bde7a7edf0b8b221c42aa60de02ae2d9a 2.3.7.zip" | sha256sum -c -; \
unzip 2.3.7.zip -d extract; \
rm -rf /server/bf2/python; \
mv extract/bf2stats-2.3.7/src/python /server/bf2/python; \
rm -fv 2.3.7.zip;

# Install ESAI in all mods
WORKDIR /root
COPY ESAI-Standard-v4.2.zip ESAI-Standard-v4.2.zip
COPY lowercase-helper /usr/local/bin/lowercase-helper
RUN set -eux; \
sha256sum ESAI-Standard-v4.2.zip | grep '^ef4e5d0f1446b9a2ddb0b350f1334273681c0f64d9c38c506320db769b24499c '; \
# Lowercase all files in ESAI folder
for i in $( ls /server/bf2/mods ); do \
unzip ESAI-Standard-v4.2.zip -d /server/bf2/mods/$i; \
lowercase-helper --dir "/server/bf2/mods/$i/ESAI"; \
done; \
# Lowercase ESAI mapfiles' content
for i in $( find /server/bf2/mods/*/esai/mapfiles -type f ); do \
CONTENT=$( cat "$i" ); \
echo "$CONTENT" | tr '[:upper:]' '[:lower:]' > "$i"; \
done;

# Install esai-helper and configs
COPY esai-helper /usr/local/bin/esai-helper
COPY esai-optimized-strategies-bf2.txt /esai-optimized-strategies-bf2.txt
COPY esai-optimized-strategies-bf2all64.txt /esai-optimized-strategies-bf2all64.txt
COPY esai-optimized-strategies-xpack.txt /esai-optimized-strategies-xpack.txt

COPY healthcheck /healthcheck

# EXPOSE 16567/udp
# EXPOSE 29900/udp
# HEALTHCHECK CMD /healthcheck
WORKDIR /server/bf2
CMD [ "./start.sh", "+modPath", "mods/bf2all64" ]
Binary file not shown.
Loading

0 comments on commit cd207c4

Please sign in to comment.