Skip to content

Commit

Permalink
Disable deployment of Asset Inventory for versions below 8.16
Browse files Browse the repository at this point in the history
  • Loading branch information
jeniawhite committed Oct 27, 2024
1 parent a1294f0 commit 77da7a6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -419,15 +419,29 @@ jobs:
AZURE_TAGS: ${{ env.AZURE_DEFAULT_TAGS }}
run: ./install_agent_az_cli.sh

- name: Check Asset Inventory supported version
id: asset-inventory-version-check
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_ENV
else
echo "Stack version is below the requirement: $STACK_VERSION < $MIN_VERSION."
echo "asset_inventory_supported=false" >> $GITHUB_ENV
fi
- name: Install Azure Asset Inventory integration
id: azure-asset-inventory-integration
working-directory: ${{ env.INTEGRATIONS_SETUP_DIR }}
if: env.asset_inventory_supported == 'true'
run: |
poetry run python ./install_azure_asset_inventory_integration.py
- name: Deploy Azure Asset Inventory agent
id: azure-asset-inventory-agent
working-directory: deploy/azure
if: env.asset_inventory_supported == 'true'
env:
AZURE_TAGS: ${{ env.AZURE_DEFAULT_TAGS }}
DEPLOYMENT_NAME: "${{ env.DEPLOYMENT_NAME }}-inventory"
Expand Down Expand Up @@ -485,10 +499,12 @@ jobs:
- name: Install AWS Asset Inventory integration
id: aws-asset-inventory
working-directory: ${{ env.INTEGRATIONS_SETUP_DIR }}
if: env.asset_inventory_supported == 'true'
run: |
poetry run python ./install_aws_asset_inventory_integration.py
- name: Deploy AWS Asset Inventory agent
if: env.asset_inventory_supported == 'true'
run: |
scriptname="aws-asset-inventory-linux.sh"
src="../../$INTEGRATIONS_SETUP_DIR/$scriptname"
Expand Down

0 comments on commit 77da7a6

Please sign in to comment.