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

Feat/test install script #24

Merged
merged 6 commits into from
Sep 19, 2024
Merged

Feat/test install script #24

merged 6 commits into from
Sep 19, 2024

Conversation

BelfordZ
Copy link
Contributor

@BelfordZ BelfordZ commented Sep 19, 2024

Description:

This PR introduces several improvements to the validator-dashboard installer script to enhance usability, error handling, and compatibility for both interactive and non-interactive environments, especially in CI/CD pipelines such as GitHub Actions.

Key Updates:

  1. Support for Non-Interactive Execution:

    • The script can now run in both interactive and non-interactive modes.
    • Default values are automatically applied in non-interactive environments (e.g., when running in GitHub Actions), allowing the installer to proceed without requiring user input.
    • Interactive prompts are retained when run in a local, interactive shell for flexibility.
  2. Improved Error Handling:

    • Better handling of common errors, such as missing directories, with clear and descriptive error messages.
    • Error trapping and reporting have been added to improve debugging, including capturing and displaying output from failed Docker builds.
  3. Docker Image Build Improvements:

    • Docker image build output is now captured and displayed in the event of a failure, making troubleshooting easier.
    • The installer now lists the built Docker images after a successful build, providing visibility into the build process.
  4. SSL Handling in Curl Requests:

    • The script now supports running curl with the -k option, which allows bypassing SSL verification issues (e.g., self-signed certificates) for testing environments.
    • curl is used with -f and -k in combination to fail gracefully on HTTP errors while ignoring SSL certificate problems.
  5. Directory Setup and Feedback:

    • The script now ensures the target directory for the installation exists and provides feedback when creating or validating directories.
    • Status messages have been added throughout the script for better transparency and progress reporting, especially for critical steps like writing the .env file and building Docker images.

Benefits:

  • CI/CD Compatibility: Improved support for automated environments like GitHub Actions, enabling seamless integration with non-interactive build pipelines.
  • Enhanced Debugging: Better error reporting ensures issues are easier to identify and resolve.
  • User-Friendly Prompts: Interactive and non-interactive modes offer flexibility, while new status messages improve clarity during the installation process.

this is to enable the running of this script in ci
@BelfordZ BelfordZ force-pushed the feat/test-install-script branch from 0d71f53 to b787d40 Compare September 19, 2024 19:50
@BelfordZ BelfordZ force-pushed the feat/test-install-script branch from b787d40 to 9bf7772 Compare September 19, 2024 19:52
@BelfordZ BelfordZ force-pushed the feat/test-install-script branch from c522453 to b138789 Compare September 19, 2024 20:36
@TieDyedSheep
Copy link
Contributor

I just bumped the version of the checkout action in the new workflow to clear out some deprecation warnings and. it looks like that worked so i'll approve and merge this in a sec

@TieDyedSheep TieDyedSheep requested a review from a team September 19, 2024 21:57
@TieDyedSheep
Copy link
Contributor

i'm bypassing this, i approve but it's not letting me approve now since i made changes but the changes are minor enough it doesn't really matter

@TieDyedSheep TieDyedSheep merged commit 308f6f1 into dev Sep 19, 2024
3 checks passed
@muni-corn
Copy link

Giving my retroactive approval 👍

@mhanson-github mhanson-github deleted the feat/test-install-script branch September 23, 2024 02:26
BelfordZ added a commit that referenced this pull request Sep 25, 2024
BelfordZ added a commit that referenced this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants