diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..eaef512ccbd32252330dae007c88fef800e33c3a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,14 @@ +build_image: + stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + variables: + IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + script: + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"nah\"}}}" + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG + only: + - tags + diff --git a/Dockerfile b/Dockerfile index 4abddc77b44f02359c2087882faccb5ae0500df0..a7910350b244090bac8ee7b1f5c02831abf5712c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,17 @@ FROM python:2.7-stretch - -COPY ./bombsquad/ /bombsquad +ENV BS_VERSION 1.4.150 +ENV BS_MIRROR https://ant.sr WORKDIR /bombsquad -CMD /bombsquad/bombsquad_server -EXPOSE 43210/tcp +RUN wget -O BombSquad_Server_Linux_64bit_$BS_VERSION.tar.gz $BS_MIRROR/BombSquad_Server_Linux_64bit_$BS_VERSION.tar.gz \ + && tar xzf BombSquad_Server_Linux_64bit_$BS_VERSION.tar.gz \ + && rm BombSquad_Server_Linux_64bit_$BS_VERSION.tar.gz + +COPY ./config.py /bombsquad/BombSquad_Server_Linux_64bit_$BS_VERSION/config.py +COPY ./bsTeamGame.py /bombsquad/BombSquad_Server_Linux_64bit_$BS_VERSION/data/scripts/bsTeamGame.py +COPY ./bsGame.py /bombsquad/BombSquad_Server_Linux_64bit_$BS_VERSION/data/scripts/bsGame.py +COPY ./bsBomb.py /bombsquad/BombSquad_Server_Linux_64bit_$BS_VERSION/data/scripts/bsBomb.py +COPY ./bsSpaz.py /bombsquad/BombSquad_Server_Linux_64bit_$BS_VERSION/data/scripts/bsSpaz.py + +CMD /bombsquad/BombSquad_Server_Linux_64bit_$BS_VERSION/bombsquad_server +EXPOSE 43212/udp diff --git a/config.py b/config.py new file mode 100644 index 0000000000000000000000000000000000000000..c60f07e5dc2a98f42e357731666c6665aabbf835 --- /dev/null +++ b/config.py @@ -0,0 +1,22 @@ +config['partyName'] = os.getenv('BS_SERVER_NAME', 'Boomsicle') +config['maxPartySize'] = int(os.getenv('BS_MAX_CONNECTIONS', 32)) +config['Free-for-All Max Players'] = int(os.getenv('BS_FFA_MAX_PLAYERS', 32)) +config['port'] = int(os.getenv('BS_PORT', 43210)) +config['partyIsPublic'] = bool(os.getenv('BS_PUBLIC', True)) +config['language'] = os.getenv('BS_LANGUAGE', 'English') + +config['sessionType'] = os.getenv('BS_SESSIONTYPE', 'ffa') + +config['playlistCode'] = os.getenv('BS_PLAYLIST', None) +config['playlistShuffle'] = bool(os.getenv('BS_SHUFFLE', True)) + +config['autoBalanceTeams'] = bool(os.getenv('BS_BALANCETEAMS', True)) + +config['enableTelnet'] = bool(os.getenv('BS_TELNET', False)) +config['telnetPort'] = int(os.getenv('BS_TELNETPORT', 43250)) +config['telnetPassword'] = os.getenv('BS_TELNETPW', 'changeme') + +config['teamsSeriesLength'] = int(os.getenv('BS_SERIESLENGTH', 7)) +config['ffaSeriesScoreToWin'] = int(os.getenv('BS_FFASCORE', 69)) + +config['statsURL'] = os.getenv('BS_STATSURL', '')