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

Enable repository in Drone when writing configuration #56

Merged
merged 22 commits into from
Sep 13, 2019

Conversation

achilleas-k
Copy link
Member

Creating a drone configuration in the service now enables the repository in Drone, which in turn creates the hook on GIN for triggering builds when the repository receives a push.

Other changes:

Makes the purpose of the key clearer to the user.
No need for prep commands to be a method.
Making it a tuple makes it immutable.
- Names: camelCase to snake_case for all function, argument, and
variable names.
- Prefix functions with the name/type of the service they relate to:
e.g., gin_ensure_token and drone_ensure_secrets.
- Horizontal function signatures (instead of vertically stacking args).
- Removed small one-use functions that were creating single-key
dictionaries and replaced with literals.
- Renamed annexFiles to input_files and backPushFiles to output_files
- Cleared out some catch-all exception handling that seemed unnecessary.
This needs more work since there's a lot of catch-all exception blocks
that need revising.  See issue #54.
The ensure_config function checks if an existing drone configuration
exists, reads it in, checks if the existing lines match the template,
and updates it, fixing mismatched template sections.  This is all
unnecessary since overwriting any existing file will have the same
effect and is much simpler.

I'm keeping the function around to use it for reading the existing
config, validating it, and loading the values into the form for
modification (future feature).
The user enabling the repository may not be the owner so the repository
path is not necessarily {user}/{reponame}.
Order Dockerfile steps from slowest to fastest and from least-frequently
rebuilt to most.
Front-end installation takes the longest.
Back-end doesn't require building so it can be last.
Would cause exceptions when the user data request failed, which happened
every time the login screen was loaded with an invalid token.
Method routing is limited by the decorator
@mpsonntag mpsonntag merged commit f777aaf into master Sep 13, 2019
@mpsonntag mpsonntag deleted the enable-repo-build branch February 22, 2023 08:54
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.

2 participants