Skip to content

Commit

Permalink
Fix skipped assets inventory CI (#3008)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2a2e962)
  • Loading branch information
orouz authored and mergify[bot] committed Feb 12, 2025
1 parent fe55f3e commit 5031940
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,33 @@ jobs:
with:
init-tools: 'true'

check-asset-inventory-supported-version:
needs: [ init-hermit ]
name: Check Asset Inventory supported version
runs-on: ubuntu-22.04
outputs:
asset_inventory_supported: ${{ steps.check-asset-inventory-supported-version.outputs.asset_inventory_supported }}
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Hermit Environment
uses: ./.github/actions/hermit

- name: Check Asset Inventory supported version
id: check-asset-inventory-supported-version
env:
STACK_VERSION: ${{ env.ELK_VERSION }}
run: |
MIN_VERSION="8.16.0"
if [[ "$(echo -e "$MIN_VERSION\n$STACK_VERSION" | sort -V | head -n 1)" == "$MIN_VERSION" ]]; then
echo "Stack version meets the requirement: $STACK_VERSION >= $MIN_VERSION."
echo "asset_inventory_supported=true" >> $GITHUB_OUTPUT
else
echo "Stack version is below the requirement: $STACK_VERSION < $MIN_VERSION."
echo "asset_inventory_supported=false" >> $GITHUB_OUTPUT
fi
ci-azure:
needs: [ init-hermit ]
name: CIS Azure CI
Expand Down
8 changes: 4 additions & 4 deletions tests/product/tests/data/azure_asset_inventory/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
category="Database",
type_="Azure SQL Server",
),
"[Asset Inventory][Azure][Azure Principal] assets found": AssetInventoryCase(
category="Identity",
type_="Azure Principal",
),
# "[Asset Inventory][Azure][Azure Principal] assets found": AssetInventoryCase(
# category="Identity",
# type_="Azure Principal",
# ),
"[Asset Inventory][Azure][Azure Elastic Pool] assets found": AssetInventoryCase(
category="Database",
type_="Azure Elastic Pool",
Expand Down

0 comments on commit 5031940

Please sign in to comment.