-
-
Notifications
You must be signed in to change notification settings - Fork 0
Implement feedback from #1 #4
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
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9e700cb
Move template.rs to src/template/mod.rs
sbernauer 527079c
Try to gitignore test files
sbernauer 7ab0d20
First try of CI
sbernauer deab2b6
ci: Remove cache
sbernauer 6718c4f
Remove test that only works on my machine :)
sbernauer d764c4e
Move TemplateCommand struct into template mod
sbernauer 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# ============= | ||
# This file is copied (and adopted) from the templates in stackabletech/operator-templating | ||
# ============= | ||
--- | ||
name: Stackable Build Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- staging | ||
- trying | ||
- "renovate/**" | ||
pull_request: | ||
merge_group: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: '0' | ||
CARGO_PROFILE_DEV_DEBUG: '0' | ||
RUST_TOOLCHAIN_VERSION: "1.78.0" | ||
RUSTFLAGS: "-D warnings" | ||
RUSTDOCFLAGS: "-D warnings" | ||
RUST_LOG: "info" | ||
DEV_REPO_HELM_URL: https://repo.stackable.tech/repository/helm-dev | ||
TEST_REPO_HELM_URL: https://repo.stackable.tech/repository/helm-test | ||
STABLE_REPO_HELM_URL: https://repo.stackable.tech/repository/helm-stable | ||
|
||
jobs: | ||
run_rustfmt: | ||
name: Run Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
with: | ||
submodules: recursive | ||
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} | ||
components: rustfmt | ||
- run: cargo fmt --all -- --check | ||
|
||
run_clippy: | ||
name: Run Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
with: | ||
submodules: recursive | ||
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} | ||
components: clippy | ||
- name: Run clippy action to produce annotations | ||
uses: giraffate/clippy-action@13b9d32482f25d29ead141b79e7e04e7900281e0 # v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: env.GITHUB_TOKEN != null | ||
with: | ||
clippy_flags: --all-targets -- -D warnings | ||
reporter: 'github-pr-review' | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Run clippy manually without annotations | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: env.GITHUB_TOKEN == null | ||
run: cargo clippy --color never -q --all-targets -- -D warnings | ||
|
||
run_rustdoc: | ||
name: Run RustDoc | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
with: | ||
submodules: recursive | ||
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} | ||
components: rustfmt | ||
- run: cargo doc --document-private-items | ||
|
||
run_tests: | ||
name: Run Cargo Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
with: | ||
submodules: recursive | ||
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} | ||
- run: cargo test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use std::path::PathBuf; | ||
|
||
use clap::Parser; | ||
|
||
use crate::file_types::FileType; | ||
|
||
/// Fill out variables in config files from either env variables or files directly. | ||
#[derive(Debug, Parser)] | ||
pub struct TemplateCommand { | ||
/// The path to the file that should be templated | ||
pub file: PathBuf, | ||
|
||
/// The optional file type of the file to be templated. If this is not specified this utility will try to infer | ||
/// the type based on the file name. | ||
#[arg(value_enum)] | ||
pub file_type: Option<FileType>, | ||
|
||
/// By default inserted values are automatically escaped according to the deteced file format. You can disable | ||
/// this, e.g. when you need to insert XML tags (as they otherwise would be escaped). | ||
/// NOTE: Please make sure to correctly escape the inserted text on your own! | ||
#[clap(long)] | ||
pub dont_escape: bool, | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
tests/resources/properties/security_from_file.properties.expected
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.
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.