-
Notifications
You must be signed in to change notification settings - Fork 115
ama-logs deployment and test in dev clusters #1625
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
20 commits
Select commit
Hold shift + click to select a range
f404bad
feat: CI agent auto-deploy pipeline with e2e testing
zanejohnson-azure 8c58fc6
simplify feature support
zanejohnson-azure bf2c196
clean up
zanejohnson-azure c8f57c1
minor fix
zanejohnson-azure 94f7b2e
separate win and linux image
zanejohnson-azure 63ed3d6
temporarily disable trivy failure
zanejohnson-azure cadf2d6
fix typo
zanejohnson-azure 02fb781
fix imageRepository var
zanejohnson-azure 1b91fe8
temp test
zanejohnson-azure fd8b687
temp test
zanejohnson-azure 8cd773f
temp test
zanejohnson-azure 5cabe38
tmp switch branch for test scripts
zanejohnson-azure 2eb48ba
law id fix
zanejohnson-azure ecd4a3b
clean up
zanejohnson-azure e615f10
remove fast test setup
zanejohnson-azure d293b23
udpate prod release for helm template change
zanejohnson-azure 9335a97
clean up
zanejohnson-azure dffa132
ignore cve temporarily to unblock merge
zanejohnson-azure 152085d
set up condition that trigger the test
zanejohnson-azure 57d864f
bypass cve
zanejohnson-azure 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
115 changes: 115 additions & 0 deletions
115
.pipelines/e2e-test-templates/test-ci-image-in-aks-cluster.yml
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,115 @@ | ||
| parameters: | ||
| - name: clusterName | ||
| type: string | ||
| - name: resourceGroup | ||
| type: string | ||
| - name: azureSubscription | ||
| type: string | ||
| default: 'ContainerInsights_Build_Subscription_CI' | ||
| - name: environmentName | ||
| type: string | ||
| - name: dependsOnDeployJob | ||
| type: string | ||
| displayName: 'Name of the deploy job this test depends on (e.g., Deploy_AmaLogs_zane_test)' | ||
| - name: azureClientId | ||
| type: string | ||
| - name: azureTenantId | ||
| type: string | ||
| - name: teamsWebhookUri | ||
| type: string | ||
| default: '$(TeamsWebhookUri)' | ||
| - name: additionalTestParams | ||
| type: string | ||
| default: '' | ||
|
|
||
| jobs: | ||
| - deployment: Test_${{ replace(parameters.clusterName, '-', '_') }} | ||
| displayName: 'Test: ${{ parameters.clusterName }}' | ||
| environment: ${{ parameters.environmentName }} | ||
| dependsOn: ${{ parameters.dependsOnDeployJob }} | ||
| pool: | ||
| name: Azure-Pipelines-CI-Test-EO | ||
| image: ci-1es-managed-ubuntu-2204 | ||
| os: linux | ||
| variables: | ||
| skipComponentGovernanceDetection: true | ||
| strategy: | ||
| runOnce: | ||
| deploy: | ||
| steps: | ||
| - checkout: self | ||
| persistCredentials: true | ||
|
|
||
| - script: | | ||
| set -euo pipefail | ||
| echo "Ensuring kubectl is installed" | ||
| if ! command -v kubectl >/dev/null 2>&1; then | ||
| echo "Installing kubectl" | ||
| sudo az aks install-cli | ||
| else | ||
| echo "kubectl already installed: $(kubectl version --client --short || true)" | ||
| fi | ||
| displayName: 'Install kubectl' | ||
|
|
||
| - task: AzureCLI@2 | ||
| displayName: 'Get credentials for ${{ parameters.clusterName }}' | ||
| inputs: | ||
| azureSubscription: ${{ parameters.azureSubscription }} | ||
| scriptLocation: 'inlineScript' | ||
| scriptType: 'bash' | ||
| inlineScript: 'az aks get-credentials -g ${{ parameters.resourceGroup }} -n ${{ parameters.clusterName }}' | ||
|
|
||
| - task: Bash@3 | ||
| displayName: 'Wait for logs to be ingested into Log Analytics (20 min)' | ||
| inputs: | ||
| targetType: 'inline' | ||
| script: | | ||
| echo "========================================" | ||
| echo "Waiting for Log Analytics Ingestion" | ||
| echo "========================================" | ||
| echo "Cluster: ${{ parameters.clusterName }}" | ||
| echo "" | ||
| echo "Waiting 10 minutes to allow logs to be ingested..." | ||
| echo "This ensures queries will find logs from the newly deployed containers." | ||
| echo "" | ||
|
|
||
| wait_time=600 | ||
| interval=60 | ||
| elapsed=0 | ||
|
|
||
| while [ $elapsed -lt $wait_time ]; do | ||
| remaining=$((wait_time - elapsed)) | ||
| minutes_elapsed=$((elapsed / 60)) | ||
| minutes_remaining=$((remaining / 60)) | ||
| echo "⏳ Waiting... ($minutes_elapsed/$((wait_time / 60)) minutes elapsed, $minutes_remaining minutes remaining)" | ||
| sleep $interval | ||
| elapsed=$((elapsed + interval)) | ||
| done | ||
|
|
||
| echo "" | ||
| echo "✓ Wait complete! Logs should now be available in Log Analytics." | ||
| echo "========================================" | ||
|
|
||
| - bash: | | ||
| echo "Running tests for cluster: ${{ parameters.clusterName }}" | ||
|
|
||
| chmod +x ./install-and-execute-testkube-tests.sh | ||
| ./install-and-execute-testkube-tests.sh \ | ||
| AzureClientId=${{ parameters.azureClientId }} \ | ||
| AzureTenantId=${{ parameters.azureTenantId }} \ | ||
| TeamsWebhookUri=${{ parameters.teamsWebhookUri }} \ | ||
| ${{ parameters.additionalTestParams }} | ||
| workingDirectory: $(Build.SourcesDirectory)/test/testkube/ | ||
| displayName: 'Install Testkube and run E2E tests' | ||
|
|
||
| # Log completion | ||
| - bash: | | ||
| echo "=========================================" | ||
| echo "TEST COMPLETE" | ||
| echo "=========================================" | ||
| echo "Cluster: ${{ parameters.clusterName }}" | ||
| echo "Build ID: $(Build.BuildId)" | ||
| echo "✓ Testing finished for: ${{ parameters.clusterName }}" | ||
| echo "=========================================" | ||
| displayName: 'Test Completion' | ||
| condition: always() |
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 |
|---|---|---|
| @@ -1,2 +1,28 @@ | ||
| # to merge trivy scan PR, temporarily ignore CVE-2026-24051 until a fix is available | ||
| CVE-2026-24051 | ||
| CVE-2026-24051 | ||
|
|
||
| # to unblock PR merge | ||
| # go dependencies - temporarily ignore until upstream fixes are available | ||
| CVE-2026-32287 | ||
| CVE-2026-34040 | ||
| CVE-2026-33997 | ||
| CVE-2026-27889 | ||
| CVE-2026-29785 | ||
| CVE-2026-33216 | ||
| CVE-2026-33217 | ||
| CVE-2026-33218 | ||
| CVE-2026-33247 | ||
| CVE-2026-33215 | ||
| CVE-2026-33219 | ||
| CVE-2026-33222 | ||
| CVE-2026-33223 | ||
| CVE-2026-33246 | ||
| CVE-2026-33248 | ||
| CVE-2026-33249 | ||
| CVE-2026-33186 | ||
| CVE-2026-25679 | ||
| CVE-2026-27142 | ||
|
|
||
| # to unblock PR merge | ||
| # opt/telegraf (gobinary) | ||
| CVE-2026-34986 |
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.