Skip to content

Conversation

@zanejohnson-azure
Copy link
Contributor

@zanejohnson-azure zanejohnson-azure commented Dec 6, 2025

In brief, this PR adds capability of deploy and test a newly built image by ci build pipeline in dev clusters. At high-level, after an image is built, it will be deployed to dev clusters, which will run testkube to test the new image is working in clusters. The tests performed are what are being used in ci test automation framework.

There are a few TODOs, mostly about replacing/adding more test clusters, and the way to deploy images to clusters. These TODOs have been included and explained as a part of this PR.

The solution supports queuing multiple PRs at the same time, so each PR will be tested one by one in order.

Besides supporting deploy a newly built image from ci build pipeline, it has a few other features:

  • allow user to specify and test any ci image version on ux, then the pipeline will skip build stage and directly test the specified image in the clusters.
  • by default, the test will only run after the PR is merged. However, to allow developers to run test from a branch, dev can include "run-e2e" in its branch name, then the test will run during PR phase as well. This provides flexibility to developers but also prevent from running the tests in all PRs.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zanejohnson-azure
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zanejohnson-azure
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zanejohnson-azure
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zanejohnson-azure
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zanejohnson-azure
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zanejohnson-azure
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zanejohnson-azure
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@github-actions
Copy link

This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

This PR was closed because it has been stalled for 12 days with no activity.

@github-actions
Copy link

This PR was closed because it has been stalled for 12 days with no activity.

docker pull mcr.microsoft.com/azuremonitor/containerinsights/cidev/prometheus-collector/images:buildx-stable-1
docker buildx create --name dockerbuilder --driver docker-container --driver-opt image=mcr.microsoft.com/azuremonitor/containerinsights/cidev/prometheus-collector/images:buildx-stable-1 --use
docker buildx inspect --bootstrap
# Determine if we should push to ACR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Zane, is there a reason why we shouldnt push images to ACR for all builds? generally any build apart from the ones that only run tests would require a new image to be built

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is because we do not really do any testing when PR is raised. but when PR is merged, we want to push to acr since it could be a candidate for actual release.

I keep it as what it is now so do not want to introduce any regression. But I believe we should discuss during scum to consider push to acr no matter what.

and(
or(
eq(variables['Build.SourceBranch'], 'refs/heads/ci_prod'),
eq(variables['Build.SourceBranch'], 'refs/heads/zane/ci-agent-auto-deploy'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing zane/ci-agent-auto-deploy will be removed after your testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. it will be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants