Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add installation checks + CI Workflow #2119

Merged

Conversation

AlvinSchiller
Copy link
Collaborator

Added and adapted the CI Workflow from V2 (see #2082 and #2092 about the build of the images and caching).
There are multiple test scripts, that use different paths of the installation process to cover the setup steps.

Different to V2 the installation checks are not only used for CI but are integrated in the regual installation process, to abort a corrupt installation. This avoids pretending a successfull installation and let the user handle runtime errors.

Change summary

  • add ci workflow
  • add checks for mandatory setup routines (first failed check will abort installation)
  • make adding rfid reader an optional step (currently the test installation fails if the rfid reader scipt is run during installation -> input redirect goes missing. Therefore it can currently not be tested and must be skipped)
  • added "No RFID Reader" Option to rfid reader setup script + fix on uninitialized rfid_reader setting
  • add check for existing user home
  • moved "os type" check to be run first, to abort early
  • moved / refactores some functions
  • harmonized log output to logfile for better readability
  • add core package installation from file

Not covered by this PR

  • Support for rerunning the Installationprocess on an existing (maybe aborted) installation (currently some configs may be written multiple times, options of first config are not saved and reused)
  • Autohotspot setup has a flaw. The command for WIFI_REGION can return multiple lines, resulting in installation failure.
    This will be addressed in a following PR which focuses on applying changes to the autohotspot logic made to V2.

@AlvinSchiller AlvinSchiller marked this pull request as ready for review November 20, 2023 23:11
ci/installation/run_install_test.sh Outdated Show resolved Hide resolved
ci/installation/run_install_webapp.sh Outdated Show resolved Hide resolved
installation/includes/02_helpers.sh Show resolved Hide resolved
@s-martin s-martin added enhancement future3 Relates to future3 development labels Nov 21, 2023
Update test descriptions.
to not interfere with develop branch
@AlvinSchiller
Copy link
Collaborator Author

Added a testcase to cover the webapp download for releases.
Also needed to rename the workflow files, as they had the same name on develop and interfered with the status badge.

@s-martin
Copy link
Collaborator

s-martin commented Dec 1, 2023

Could we merge this, @AlvinSchiller @pabera ?

@s-martin s-martin merged commit 234cc3c into MiczFlor:future3/develop Dec 2, 2023
19 checks passed
@AlvinSchiller AlvinSchiller deleted the future3/feature/workflowCI branch December 2, 2023 20:12
AlvinSchiller added a commit to AlvinSchiller/RPi-Jukebox-RFID that referenced this pull request Dec 4, 2023
* add ci workflow

* add check for user home

* changes for docker tests

* added verify functions

* exit on failed update

* add check for samba setup

* add check for mpd setup

* add check for jukebox core setup

* add check for git setup

* add check for kiosk mode setup

* add check for optimize boot setup

* add check for webapp setup

* add check for autohotspot setup

* make rfid reader setup an optional step

* Add Option for No Rfid Reader

* moved setup checks to individual scripts

* fix missing iw package

* refactored get_reader_descriptions into function.
be more consistent by using same var for display and index access

* moved function to specific routine script

* make sure verify parameters are all set.
fix functionnames

* added fix for not available interface in CI runs

* check supported os type first

* moved exit_on_error function top level

* moved logging setup to function and added usage

* moved load sources to function

* change function name and var usage

* updated log output for better logfile readability

* harmonize log output

* refactored disable onboard audio.

only execute if flag is true. inlined function

* add restart nginx.service again. use HOME_PATH

* fix and check adding samba user

* fix logging mpd setup routine

* fix Disable boot logs error on existing file

* added timer to log frame

* add core package installation from file

used also for ci optimization

* Dont let remove packages fail install.
ignore for ci

* Update test scripts

use robust path determination
move noninteractive to dockerfile

* fix clear in mpd option

* fix bug in rfid configure

* fix error on uninitialized rfid_reader settings

* add checks for static ip config

* Added test for webapp download in prod.
Update test descriptions.

* renamend workflow files
to not interfere with develop branch

* Update install links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement future3 Relates to future3 development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants