-
Notifications
You must be signed in to change notification settings - Fork 0
add BinaryApp app type #26
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
9db7076
add BinaryApp app type
gilesknap 2fed19a
better comments in ParentModel
gilesknap 1cfbc5d
add constant for read-execute permissions
gilesknap af912b2
fix error wording in _create_binary_file
gilesknap d2ce40e
fix BinaryApp docstring
gilesknap a48e076
fix schema to include docstring changes
gilesknap cece3a2
fix incorrect comment
gilesknap 899eee7
fix HashType comment format
gilesknap 0756498
reorder fields in BinaryApp
gilesknap 63acfa7
add BinaryApp app type
gilesknap 9005654
better comments in ParentModel
gilesknap 6ff1d5e
add constant for read-execute permissions
gilesknap ceddf12
fix error wording in _create_binary_file
gilesknap cd6a04e
fix BinaryApp docstring
gilesknap 85dbc63
fix schema to include docstring changes
gilesknap 09e5c3b
fix incorrect comment
gilesknap 2c2ac16
fix HashType comment format
gilesknap c6c686f
reorder fields in BinaryApp
gilesknap 6442671
remove redundant SCHEMAS path
gilesknap f2267da
update test sample output
gilesknap 272d558
merge in main rebase
gilesknap 464f20f
move ALL_READ_EXECUTE_PERMISSIONS to approved location
gilesknap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # yaml-language-server: $schema=/workspaces/deploy-tools/src/deploy_tools/models/schemas/release.json | ||
|
|
||
| module: | ||
| name: argocd | ||
| version: "0.1" | ||
| description: Demonstration of binary download | ||
|
|
||
| applications: | ||
| - app_type: binary | ||
| name: argocd | ||
| url: https://github.com/argoproj/argo-cd/releases/download/v2.14.10/argocd-linux-amd64 | ||
| hash_type: sha256 | ||
MJGaughran marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| hash: d1750274a336f0a090abf196a832cee14cb9f1c2fc3d20d80b0dbfeff83550fa | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| from enum import StrEnum | ||
| from typing import Literal | ||
|
|
||
| from pydantic import Field | ||
|
|
||
| from .parent import ParentModel | ||
|
|
||
|
|
||
| class HashType(StrEnum): | ||
| """Type of hash to use for the binary.""" | ||
|
|
||
| SHA256 = "sha256" | ||
| SHA512 = "sha512" | ||
| MD5 = "md5" | ||
| NONE = "none" | ||
|
|
||
|
|
||
| class BinaryApp(ParentModel): | ||
| """ | ||
| Represents a standalone Binary application. | ||
gilesknap marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| This will fetch a standalone binary, validate its hash and add its | ||
| location to that path. | ||
| """ | ||
|
|
||
| app_type: Literal["binary"] | ||
| name: str = Field( | ||
| ..., | ||
| description="Binary filename to use locally", | ||
| ) | ||
| url: str = Field( | ||
| ..., | ||
| description="URL to download the binary from.", | ||
| ) | ||
| hash: str = Field( | ||
| "", | ||
| description="Hash to verify binary integrity", | ||
| ) | ||
| hash_type: HashType = Field( | ||
| ..., | ||
| description="Type of hash used to check the binary.", | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.