Skip to content

Commit

Permalink
Merge pull request #20 from Johnny-Knighten/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
Johnny-Knighten authored Nov 30, 2023
2 parents 328fece + 64408f0 commit 3f5c971
Show file tree
Hide file tree
Showing 39 changed files with 2,757 additions and 970 deletions.
55 changes: 51 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ jobs:
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: "Dockerfile"
failure-threshold: error

- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
severity: error
scandir: './bin'

- name: Lint Python Files Using Black
uses: psf/black@stable
with:
options: "--check --verbose"
src: "./config_from_env_vars"
version: "~= 23.0"

- name: Build Docker image (Push To Cache)
uses: docker/build-push-action@v3
Expand Down Expand Up @@ -57,10 +71,43 @@ jobs:
- name: Set Execute Permission For All Test Scripts
run: chmod -R +x ./tests/

- name: Peform Dependencies Tests
- name: Dependencies Tests
run: |
./tests/dependencies.sh
- name: Config File Generation Tests (Core)
run: |
./tests/config_file_generation_core.sh
- name: Config File Generation Tests (Advanced)
run: |
./tests/config_file_generation_adv.sh
- name: Bin Script - system-bootstrap Tests
run: |
./tests/docker_dependencies.sh
./tests/bin_scripts/system-bootstrap.sh
- name: Bin Script - ark-sa-boostrap Tests
run: |
./tests/bin_scripts/ark-sa-bootstrap.sh
- name: Bin Script - ark-sa-updater Tests
run: |
./tests/bin_scripts/ark-sa-updater.sh
- name: Bin Script - ark-sa-server Tests
run: |
./tests/bin_scripts/ark-sa-server.sh
- name: Bin Script - ark-sa-backup Tests
run: |
./tests/bin_scripts/ark-sa-backup.sh
- name: Ensure Python 3.10 Is Installed For Unit Testing of config_from_env_vars
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Peform Environment Variable Tests
- name: Unit Tests - config_from_env_vars
run: |
./tests/docker_environment_variables.sh
python3 -m unittest tests/config_from_env_vars/test_main.py -v
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,17 @@ jobs:
echo "The Following Images Would Have Been Pushed:"
echo "${{ steps.meta-dry-run.outputs.tags }}"
- name: Update DockerHub description
if: ${{ !env.ACT }}
- name: Update DockerHub Description
if: ${{ !env.ACT && github.ref == 'refs/heads/main' }}
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: johnnyknighten/ark-sa-server
short-description: ${{ github.event.repository.description }}
enable-url-completion: true

- name: Update DockerHub Description (DRY RUN)
if: ${{ env.ACT && github.ref == 'refs/heads/main' }}
run: |
echo "DRY RUN - Pushing Dockerhub Description Update"
163 changes: 163 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# Python
# From: https://github.com/github/gitignore/blob/main/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
82 changes: 82 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,85 @@
## [2.0.0-next.4](https://github.com/Johnny-Knighten/ark-sa-server/compare/2.0.0-next.3...2.0.0-next.4) (2023-11-30)


### Bug Fixes

* added info log to list configs updated ([31f1ca5](https://github.com/Johnny-Knighten/ark-sa-server/commit/31f1ca5f70bbfb1a633b70ca3f13aaa6d10e8d10))
* added python3 to dockerfile install and updated dependency tests ([b6db7e2](https://github.com/Johnny-Knighten/ark-sa-server/commit/b6db7e2e39f9bfa355eb36fab41f006880de2fdc))
* caught edge case of no backups existing if it is first time creating config ([6e92fdf](https://github.com/Johnny-Knighten/ark-sa-server/commit/6e92fdf9bc6f94dbe3c0149ed64a6e62b1db6a15))
* corrected syntax issue in ark-sa-bootstrap ([b85efc0](https://github.com/Johnny-Knighten/ark-sa-server/commit/b85efc0a5119cc5de30f04a1105891ad7850668f))
* fixed bug that stopped new configs being updated when CONFIG_ values changed ([be8e4e3](https://github.com/Johnny-Knighten/ark-sa-server/commit/be8e4e3614b7dfdaf518de16efd4c67c9dd2b6f6))
* integrated new python config generation into ark-sa-bootstrap ([8060e1a](https://github.com/Johnny-Knighten/ark-sa-server/commit/8060e1ae3f79017ced1c98f338bfb8193fb41c9a))
* updated config_from_env_vars to main capitalization and remove spaces around = ([ae9e790](https://github.com/Johnny-Knighten/ark-sa-server/commit/ae9e7901437d4738caddeea2513079a394e5b5fd))


### Features

* configs are now backedup instead of overwritten, and removing CONFIG_ vars now also remove it from config ([d204ee6](https://github.com/Johnny-Knighten/ark-sa-server/commit/d204ee633d9c7cdbcbbf3cd5a12ec4c839de992d))
* created python script to extract env vars and convert to ini files ([26745c4](https://github.com/Johnny-Knighten/ark-sa-server/commit/26745c4e4a61d5fb75c729673f47c8fe0eef888e))
* introduced MANUAL_CONFIG to control if config file generation should be used ([3b72b1f](https://github.com/Johnny-Knighten/ark-sa-server/commit/3b72b1f0bd935a370ab8d466f5705311c94d907f))

## [2.0.0-next.3](https://github.com/Johnny-Knighten/ark-sa-server/compare/2.0.0-next.2...2.0.0-next.3) (2023-11-27)


### ⚠ BREAKING CHANGES

* every existing container deployment will need their env var names updated

### Code Refactoring

* renamed all env vars to drop ARK prefix ([d77c80c](https://github.com/Johnny-Knighten/ark-sa-server/commit/d77c80ce2620ec2dbdb0224e97ab46ebf0e4be8b))

## [2.0.0-next.2](https://github.com/Johnny-Knighten/ark-sa-server/compare/2.0.0-next.1...2.0.0-next.2) (2023-11-27)


### Bug Fixes

* added unzip to container and related test ([470e128](https://github.com/Johnny-Knighten/ark-sa-server/commit/470e128cbccde16c5dfde081ee4c7396010616cb))

## [2.0.0-next.1](https://github.com/Johnny-Knighten/ark-sa-server/compare/1.1.0-next.2...2.0.0-next.1) (2023-11-27)


### ⚠ BREAKING CHANGES

* breaking out into multiple volumes will require data transfer

### Features

* added backup on container stop ([e4c704c](https://github.com/Johnny-Knighten/ark-sa-server/commit/e4c704c72f447678ef6891b8512d1c04d72f7abd))
* added option to limit # of backups stored ([dbe7dfd](https://github.com/Johnny-Knighten/ark-sa-server/commit/dbe7dfd1bbd80d7fa234b6f4feca446f141ed72a))
* added scheduled update cron ([51bf6a5](https://github.com/Johnny-Knighten/ark-sa-server/commit/51bf6a527f37d563ef15278e1b8ba70972be7135))
* introduce the option to store backups as zip instead of tar.gz ([1a26e08](https://github.com/Johnny-Knighten/ark-sa-server/commit/1a26e08f24e1c39987f780a40f4feaad76b3987b))
* introduced backups on restarts and before updates ([183629f](https://github.com/Johnny-Knighten/ark-sa-server/commit/183629f19a8ac466c3536b6050eae2bf0cc97bfe))

## [1.1.0-next.2](https://github.com/Johnny-Knighten/ark-sa-server/compare/1.1.0-next.1...1.1.0-next.2) (2023-11-24)


### Bug Fixes

* prevent early shootergame log tail by deleteing old logs first ([0524b82](https://github.com/Johnny-Knighten/ark-sa-server/commit/0524b8279f7434b9d7924c10337395321837c343))
* removes user/pw from supervisord conf due to launch issues ([91cf811](https://github.com/Johnny-Knighten/ark-sa-server/commit/91cf81191882de245ecaf4bd2f6f3535c38ce2fe))

## [1.1.0-next.1](https://github.com/Johnny-Knighten/ark-sa-server/compare/1.0.2...1.1.0-next.1) (2023-11-24)


### Bug Fixes

* added -l to useradd and made PGID and PUID build args ([e121ad1](https://github.com/Johnny-Knighten/ark-sa-server/commit/e121ad1cc76a9357a154a5c8a78d5fa1aef49392))
* added dummy user/password to prevent warning msg at boot ([86a555e](https://github.com/Johnny-Knighten/ark-sa-server/commit/86a555eded96fbd0d81e3fe4ea760c7e545a3edf))
* converted proton env vars to build args ([84f3eaf](https://github.com/Johnny-Knighten/ark-sa-server/commit/84f3eaf6049d385d0621a7b8b27cc426e8281ca4))
* made ark-sa-server responsible for starting ark-sa-updater ([a27c950](https://github.com/Johnny-Knighten/ark-sa-server/commit/a27c95090df20ebd23a768ea505550c1a22f79fc))


### Features

* added scheduled restarts ([16ca5f1](https://github.com/Johnny-Knighten/ark-sa-server/commit/16ca5f114fd238599cf0f1d47e78df3b236dfca2))
* added scheduled updates ([765af0c](https://github.com/Johnny-Knighten/ark-sa-server/commit/765af0c1c4adebce3cda5214a7e50fb1df258a32))
* added timezone config to container ([90c053e](https://github.com/Johnny-Knighten/ark-sa-server/commit/90c053e19325f510ef8c47fc8c99a9f29ecda85a))
* created supervisord controlled process to install/update server ([b07adef](https://github.com/Johnny-Knighten/ark-sa-server/commit/b07adef7898cc5097174d9142f589ac01038056a))
* created supervisord controlled process to start ark sa server ([acbe0e8](https://github.com/Johnny-Knighten/ark-sa-server/commit/acbe0e8825ad0472773ac787835915535455aa69))
* installed cron inside container ([28d6d6e](https://github.com/Johnny-Knighten/ark-sa-server/commit/28d6d6e37a5c3d2bd3ce1cb4b49197f2278ac5e7))
* now using supervisor as our process manager ([02dbc14](https://github.com/Johnny-Knighten/ark-sa-server/commit/02dbc1484bc76cbbfb9a222abf265b54b7443f61))

## [1.0.2](https://github.com/Johnny-Knighten/ark-sa-server/compare/1.0.1...1.0.2) (2023-11-20)


Expand Down
Loading

0 comments on commit 3f5c971

Please sign in to comment.