Do some better linting (#13)

* Do some better linting

* Update names, Packer version, and more

* Do not lint on push

* More linting and scripting

* Cleanup shellcheck lint

* Add Packer format check

* Fix Packer formatting

* Limit to only one

* Remove generated HCL files

* Only lint checked files

* Use pipes instead

* Improve attempt to build

Actually go back to attempting to build boxes on GitHub. Maybe it will
work better with this structure

* Change to using environment files

* Initialize plugins, first

* More verbose usage of the file

* Do the output properly this time

* PACKER_LOG set to 1

* No need for python3 anymore

* Limit to only one result

* Choose a specific CPU model

* Init separately

* Update actions version

* Add version outputting

* Correct actions version

* Try to execute qemu properly

* Fix CPU model name

* Do not over-subscribe GitHub runners

* Try type instead of command to guard runs

* Do not write to non-existent folder

* Cache packer plugins

* Use ~ instead of /home/greg

* Try the proper path

* Move to intelligent matrix

* Set global env path

* Add lots of waits for VBoxManage on hosted runners

* Add more waits

* Add more waits
This commit is contained in:
Greg Hellings
2023-12-06 10:21:32 -06:00
committed by GitHub
parent 86dfe113a0
commit 634aae8d75
55 changed files with 536 additions and 495 deletions
+8 -1
View File
@@ -5,6 +5,7 @@ import sys
sys.path.append(str(Path(__file__).parent / "lib"))
from support import Support, BASE
import time
import json
source test.xsh
@@ -25,6 +26,9 @@ parser.add_argument("--stamp", "-s", help="Time stamp for builds", default=STAMP
args = parser.parse_args()
my_list = []
# Now provide menus if we don't have defaults
def process_all():
if args.distro:
@@ -55,7 +59,7 @@ def do_build(build):
headless = "headless=false"
if args.list:
print(f"Would build: {build.var_file}")
my_list.append(build)
else:
if args.upload:
if "VAGRANT_CLOUD_TOKEN" not in ${...}:
@@ -73,5 +77,8 @@ def do_build(build):
if args.all or args.list or (args.distro and args.version and args.build):
process_all()
if args.list:
my_list = [d.matrix for d in my_list if d.is_github]
print(json.dumps({"include": my_list}))
else:
print("Doing menu stuff")