Skip to content

Commit

Permalink
fix issue with installation of binary files
Browse files Browse the repository at this point in the history
  • Loading branch information
bodsch committed Oct 17, 2022
1 parent 1dad6b9 commit c972589
Show file tree
Hide file tree
Showing 24 changed files with 364 additions and 298 deletions.
5 changes: 4 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
skip_list:
- role-name
- fqcn[action-core] # Use FQCN for builtin module actions
- fqcn[action] # Use FQCN for module actions, such `<namespace>.<collection>.docker_container`. (warning)
- name[casing] # All names should start with an uppercase letter. (warning)
- name[template] # Jinja templates should only be at the end of 'name'
80 changes: 27 additions & 53 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,51 @@
---
name: CI
'on':
pull_request:
push:
branches:
- main

on:
schedule:
- cron: "0 2 * * 0"
- cron: "0 4 * * 0"
workflow_dispatch:
workflow_run:
workflows:
- "code linter"
# branches:
# - main
# - feature/**
# - fix/**
types:
- completed

defaults:
run:
working-directory: 'ansible-urbanterror'

jobs:
lint:
name: linting
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: lint
uses: docker://ghcr.io/github/super-linter:slim-v4
env:
# DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GH_REGISTRY_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_ANSIBLE: true
# VALIDATE_MARKDOWN: trues
VALIDATE_YAML: true

test:
name: "${{ matrix.image }} / python: ${{ matrix.python-version }}, ansible: ${{ matrix.ansible-version }}"
needs:
- lint
runs-on: ubuntu-18.04
deb:
name: "${{ matrix.image }} / ansible: ${{ matrix.ansible-version }}"
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'schedule' || github.event.workflow_run.conclusion == 'success' }}
strategy:
fail-fast: false
matrix:
image:
- debian:10
- debian:11
- ubuntu:20.04
python-version:
- '3.9'
ansible-version:
- '4.1.0'
- '5.1.0'
- '5.1'
- '6.1'
scenario:
- default

steps:
- name: check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: 'ansible-urbanterror'

- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: 🐍 set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: '3.x'

- name: install dependencies
run: |
Expand All @@ -68,21 +54,9 @@ jobs:
- name: test with tox
run: |
tox -e py$(printf "${{ matrix.python-version }}" | tr -d '.')-ansible$(printf "${{ matrix.ansible-version }}" | tr -d '.') \
-- molecule test
tox -e ansible_$(printf "${{ matrix.ansible-version }}") \
-- molecule test --scenario-name default
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
DISTRIBUTION: ${{ matrix.image }}

publish:
if: github.ref == 'refs/heads/main'
needs:
- test
runs-on: ubuntu-18.04
steps:
- name: galaxy
uses: robertdebock/galaxy-action@1.2.0
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: main
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.tox
__pycache__
.galaxy_install_info
*kate-swp
__pycache__

.cache
29 changes: 15 additions & 14 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ rules:
line-length:
max: 195
level: warning
braces:
min-spaces-inside: 0
max-spaces-inside: 1
brackets:
min-spaces-inside: 0
max-spaces-inside: 1
indentation:
spaces: 2
comments: disable
comments-indentation: disable
truthy: disable
# braces:
# min-spaces-inside: 0
# max-spaces-inside: 1
# brackets:
# min-spaces-inside: 0
# max-spaces-inside: 1
# indentation:
# spaces: 2
# comments: disable
# comments-indentation: disable

ignore: |
tests/
molecule/
.tox
.github
.molecule/
.tox
.travis.yml
molecule/
tests/
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
export TOX_SCENARIO ?= default
export TOX_PYTHON ?= py310
export TOX_ANSIBLE ?= ansible510
# export TOX_PYTHON ?= py310
export TOX_ANSIBLE ?= ansible_6.1

.PHONY: converge destroy verify lint

Expand Down
4 changes: 3 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

urbanterror_admin_password: s3cr3T-are-p0ssiBL3

urbanterror_version: 4.3.4

urbanterror_start_map: ut4_riyadh
urbanterror_game_type: CaptureTheFlag

Expand All @@ -13,7 +15,7 @@ urbanterror_binary: "Quake3-UrT-Ded.{{ ansible_machine }}"

urbanterror_config:
# intition version: 4.0.3
current_version: '4.0.3'
current_version: "{{ urbanterror_version }}"
# id: 2 =
download_server: '2'
# id: 1 = Quake3-UrT (default)
Expand Down
2 changes: 1 addition & 1 deletion files/updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function doBrowser ()
$BROWSER "$TMPFILE"
fi

rm -f "$TMPFILE"
# rm -f "$TMPFILE"
}

function drawLicence ()
Expand Down
9 changes: 2 additions & 7 deletions hooks/converge
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/usr/bin/env bash

TOX_ARGS=
. hooks/_tox_base

if [ -n "${TOX_SCENARIO}" ]
then
TOX_ARGS="--scenario-name ${TOX_SCENARIO}"
fi

tox -e ${TOX_PYTHON}-${TOX_ANSIBLE} -- molecule converge ${TOX_ARGS}
tox ${TOX_OPTS} -- molecule converge ${TOX_ARGS}
9 changes: 2 additions & 7 deletions hooks/destroy
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/usr/bin/env bash

TOX_ARGS=
. hooks/_tox_base

if [ -n "${TOX_SCENARIO}" ]
then
TOX_ARGS="--scenario-name ${TOX_SCENARIO}"
fi

tox -e ${TOX_PYTHON}-${TOX_ANSIBLE} -- molecule destroy ${TOX_ARGS}
tox ${TOX_OPTS} -- molecule destroy ${TOX_ARGS}
9 changes: 2 additions & 7 deletions hooks/lint
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/usr/bin/env bash

TOX_ARGS=
. hooks/_tox_base

if [ -n "${TOX_SCENARIO}" ]
then
TOX_ARGS="--scenario-name ${TOX_SCENARIO}"
fi

tox -e ${TOX_PYTHON}-${TOX_ANSIBLE} -- molecule lint ${TOX_ARGS}
tox ${TOX_OPTS} -- molecule lint ${TOX_ARGS}
9 changes: 2 additions & 7 deletions hooks/verify
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/usr/bin/env bash

TOX_ARGS=
. hooks/_tox_base

if [ -n "${TOX_SCENARIO}" ]
then
TOX_ARGS="--scenario-name ${TOX_SCENARIO}"
fi

tox -e ${TOX_PYTHON}-${TOX_ANSIBLE} -- molecule verify ${TOX_ARGS}
tox ${TOX_OPTS} -- molecule verify ${TOX_ARGS}
Loading

0 comments on commit c972589

Please sign in to comment.