From d5355cd6a1092340a112abc651f6c085216ed561 Mon Sep 17 00:00:00 2001 From: Vaishnav88sk Date: Sun, 29 Jun 2025 19:12:41 +0530 Subject: [PATCH 1/2] ci updated with pre-installed things --- .github/workflows/ci.yaml | 180 +++++++++++++++++++++++--------------- 1 file changed, 109 insertions(+), 71 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1695576..7f00704 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,88 +9,126 @@ on: branches: - master +# jobs: +# code_quality: +# runs-on: ubuntu-latest # GitHub-hosted runner with many pre-installed tools + +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 + +# - name: Install Common Quality Tools +# run: | +# echo "Installing general code quality tools..." +# # Install tools that aren't pre-installed or need specific versions. +# # Examples: +# # For Markdown linting: +# npm install -g markdownlint-cli +# # For YAML linting: +# sudo apt-get update && sudo apt-get install -y yamllint +# # For Shell Script linting: +# sudo apt-get install -y shellcheck +# # For checking broken links in documentation/markdown: +# pip install rstcheck # Can check ReStructuredText +# pip install linkchecker # A dedicated link checker + +# - name: Run Markdown Linting +# # Adjust '--config' to your markdownlint config file path +# # (e.g., .markdownlint.jsonc) +# # Use '**/*.md' to check all markdown files. +# # '|| true' allows the job to pass even if linting issues are found. +# # Remove it for strict failure. +# run: | +# echo "--- Running Markdownlint ---" +# markdownlint \ +# --config ./.github/linters/.markdownlint.jsonc \ +# '**/*.md' || true + +# - name: Run YAML Linting +# # Assumes a .yamllint configuration file in your repository root. +# # Adjust the path to your YAML files as needed. +# run: | +# echo "--- Running Yamllint ---" +# yamllint . + +# - name: Run Shell Script Linting +# # Finds all .sh files and runs shellcheck. +# # Customize the 'find' command if your scripts are in specific dir +# run: | +# echo "--- Running Shellcheck ---" +# find . \ +# -type f -name "*.sh" -exec shellcheck {} + || true + +# - name: Check for Broken Links in Documentation +# # You'll need to point this to your documentation root or files. +# # This is a very basic example; you might need more sophisticated setup +# # for large docs. Linkchecker might require a configuration file. +# run: | +# echo "--- Running Link Checker ---" +# # Example: check links in all markdown files +# find . -type f -name "*.md" -print0 | xargs -0 linkchecker || true +# # Alternatively, check a specific documentation directory if it serves +# # HTML/Markdown +# # linkchecker \ +# --config .linkcheckerrc https://your-docs-url.com || true + +# - name: Verify Consistent Newlines (LF vs CRLF - basic check) +# run: | +# echo "--- Checking for Mixed Newlines ---" +# # This is a basic check; for precise control, use .gitattributes +# # It finds files with both LF and CRLF, indicate mixed line endings. +# grep -P '\r\n.*[^\r]\n|\n.*[^\n]\r\n' . -r \ +# --exclude-dir={.git,.github,node_modules,vendor} && \ +# { echo "Mixed newlines found!"; exit 1; } || true +# echo "Newline consistency looks good." + +# - name: Check Large Files (Optional) +# run: | +# echo "--- Checking for large files ---" +# # Finds files larger than 10MB; adjust '10M' as needed. +# find . -type f -size +10M -print -exec du -h {} + +# echo "If any large files were listed above, consider using Git LFS or" +# echo "excluding them." + +# - name: Final Code Quality Review +# run: | +# echo "All selected generic code quality checks completed." +# echo "Review the output for any warnings or errors." + jobs: code_quality: - runs-on: ubuntu-latest # GitHub-hosted runner with many pre-installed tools + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Install Common Quality Tools + - name: Cache npm + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-npm-markdownlint + + - name: Cache pip + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-quality-tools + + - name: Install Tools (minimal) run: | - echo "Installing general code quality tools..." - # Install tools that aren't pre-installed or need specific versions. - # Examples: - # For Markdown linting: + echo "Installing only what's necessary..." npm install -g markdownlint-cli - # For YAML linting: - sudo apt-get update && sudo apt-get install -y yamllint - # For Shell Script linting: - sudo apt-get install -y shellcheck - # For checking broken links in documentation/markdown: - pip install rstcheck # Can check ReStructuredText - pip install linkchecker # A dedicated link checker - - - name: Run Markdown Linting - # Adjust '--config' to your markdownlint config file path - # (e.g., .markdownlint.jsonc) - # Use '**/*.md' to check all markdown files. - # '|| true' allows the job to pass even if linting issues are found. - # Remove it for strict failure. - run: | - echo "--- Running Markdownlint ---" - markdownlint \ - --config ./.github/linters/.markdownlint.jsonc \ - '**/*.md' || true - - - name: Run YAML Linting - # Assumes a .yamllint configuration file in your repository root. - # Adjust the path to your YAML files as needed. - run: | - echo "--- Running Yamllint ---" - yamllint . + pip install rstcheck linkchecker - - name: Run Shell Script Linting - # Finds all .sh files and runs shellcheck. - # Customize the 'find' command if your scripts are in specific dir + - name: Run Markdownlint run: | - echo "--- Running Shellcheck ---" - find . \ - -type f -name "*.sh" -exec shellcheck {} + || true - - - name: Check for Broken Links in Documentation - # You'll need to point this to your documentation root or files. - # This is a very basic example; you might need more sophisticated setup - # for large docs. Linkchecker might require a configuration file. - run: | - echo "--- Running Link Checker ---" - # Example: check links in all markdown files - find . -type f -name "*.md" -print0 | xargs -0 linkchecker || true - # Alternatively, check a specific documentation directory if it serves - # HTML/Markdown - # linkchecker \ - --config .linkcheckerrc https://your-docs-url.com || true - - - name: Verify Consistent Newlines (LF vs CRLF - basic check) - run: | - echo "--- Checking for Mixed Newlines ---" - # This is a basic check; for precise control, use .gitattributes - # It finds files with both LF and CRLF, indicate mixed line endings. - grep -P '\r\n.*[^\r]\n|\n.*[^\n]\r\n' . -r \ - --exclude-dir={.git,.github,node_modules,vendor} && \ - { echo "Mixed newlines found!"; exit 1; } || true - echo "Newline consistency looks good." - - - name: Check Large Files (Optional) + markdownlint '**/*.md' || true + + - name: Run Yamllint run: | - echo "--- Checking for large files ---" - # Finds files larger than 10MB; adjust '10M' as needed. - find . -type f -size +10M -print -exec du -h {} + - echo "If any large files were listed above, consider using Git LFS or" - echo "excluding them." + yamllint . - - name: Final Code Quality Review + - name: Run Shellcheck run: | - echo "All selected generic code quality checks completed." - echo "Review the output for any warnings or errors." + find . -type f -name "*.sh" -exec shellcheck {} + || true From 638631ed387544f387aba0a88894c919fc4174f7 Mon Sep 17 00:00:00 2001 From: Vaishnav88sk Date: Sun, 29 Jun 2025 19:17:12 +0530 Subject: [PATCH 2/2] linting problems solved --- .github/workflows/ci.yaml | 86 --------------------------- deploy/kubernetes/rbac.yaml | 1 + deploy/kubernetes/serviceaccount.yaml | 1 + 3 files changed, 2 insertions(+), 86 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7f00704..3d5b0a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,92 +9,6 @@ on: branches: - master -# jobs: -# code_quality: -# runs-on: ubuntu-latest # GitHub-hosted runner with many pre-installed tools - -# steps: -# - name: Checkout repository -# uses: actions/checkout@v4 - -# - name: Install Common Quality Tools -# run: | -# echo "Installing general code quality tools..." -# # Install tools that aren't pre-installed or need specific versions. -# # Examples: -# # For Markdown linting: -# npm install -g markdownlint-cli -# # For YAML linting: -# sudo apt-get update && sudo apt-get install -y yamllint -# # For Shell Script linting: -# sudo apt-get install -y shellcheck -# # For checking broken links in documentation/markdown: -# pip install rstcheck # Can check ReStructuredText -# pip install linkchecker # A dedicated link checker - -# - name: Run Markdown Linting -# # Adjust '--config' to your markdownlint config file path -# # (e.g., .markdownlint.jsonc) -# # Use '**/*.md' to check all markdown files. -# # '|| true' allows the job to pass even if linting issues are found. -# # Remove it for strict failure. -# run: | -# echo "--- Running Markdownlint ---" -# markdownlint \ -# --config ./.github/linters/.markdownlint.jsonc \ -# '**/*.md' || true - -# - name: Run YAML Linting -# # Assumes a .yamllint configuration file in your repository root. -# # Adjust the path to your YAML files as needed. -# run: | -# echo "--- Running Yamllint ---" -# yamllint . - -# - name: Run Shell Script Linting -# # Finds all .sh files and runs shellcheck. -# # Customize the 'find' command if your scripts are in specific dir -# run: | -# echo "--- Running Shellcheck ---" -# find . \ -# -type f -name "*.sh" -exec shellcheck {} + || true - -# - name: Check for Broken Links in Documentation -# # You'll need to point this to your documentation root or files. -# # This is a very basic example; you might need more sophisticated setup -# # for large docs. Linkchecker might require a configuration file. -# run: | -# echo "--- Running Link Checker ---" -# # Example: check links in all markdown files -# find . -type f -name "*.md" -print0 | xargs -0 linkchecker || true -# # Alternatively, check a specific documentation directory if it serves -# # HTML/Markdown -# # linkchecker \ -# --config .linkcheckerrc https://your-docs-url.com || true - -# - name: Verify Consistent Newlines (LF vs CRLF - basic check) -# run: | -# echo "--- Checking for Mixed Newlines ---" -# # This is a basic check; for precise control, use .gitattributes -# # It finds files with both LF and CRLF, indicate mixed line endings. -# grep -P '\r\n.*[^\r]\n|\n.*[^\n]\r\n' . -r \ -# --exclude-dir={.git,.github,node_modules,vendor} && \ -# { echo "Mixed newlines found!"; exit 1; } || true -# echo "Newline consistency looks good." - -# - name: Check Large Files (Optional) -# run: | -# echo "--- Checking for large files ---" -# # Finds files larger than 10MB; adjust '10M' as needed. -# find . -type f -size +10M -print -exec du -h {} + -# echo "If any large files were listed above, consider using Git LFS or" -# echo "excluding them." - -# - name: Final Code Quality Review -# run: | -# echo "All selected generic code quality checks completed." -# echo "Review the output for any warnings or errors." - jobs: code_quality: runs-on: ubuntu-latest diff --git a/deploy/kubernetes/rbac.yaml b/deploy/kubernetes/rbac.yaml index 957ad36..a1a1f4d 100644 --- a/deploy/kubernetes/rbac.yaml +++ b/deploy/kubernetes/rbac.yaml @@ -1,3 +1,4 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: diff --git a/deploy/kubernetes/serviceaccount.yaml b/deploy/kubernetes/serviceaccount.yaml index 2574239..f2cce2e 100644 --- a/deploy/kubernetes/serviceaccount.yaml +++ b/deploy/kubernetes/serviceaccount.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: