-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Cherry-pick #17480 to 7.x: Add AWS tests to Jenkinsfile #18163
Conversation
Add execution of AWS integration tests for Metricbeat to Jenkinsfile. For that, a simple terraform scenario is created that seems to be enough to pass the AWS module tests, this scenario is started by Jenkins, and destroyed as a cleanup step. With this approach terraform scenarios are defined per module, this is consequent with other efforts we are doing with other integrations, where integration test scenarios are defined at the module level. Similar approach will be possibly followed for input integration tests. Most of the logic is added in the Jenkinsfile and as scripts. Some things could be moved to mage when we modify our targets to start scenarios depending on the type of provisioner. Some parts are going to continue being needed in Jenkinsfile in my opinion, as the archive of Terraform states for manual cleanups. (cherry picked from commit c94d4bf)
💔 Build FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backport LGTM
Cherry-pick of PR #17480 to 7.x branch. Original message:
What does this PR do?
Add execution of AWS integration tests for Metricbeat to Jenkinsfile. For that, a simple terraform scenario is created that seems to be enough to pass the AWS module tests, this scenario is started by Jenkins, and destroyed as a cleanup step. With this approach terraform scenarios are defined per module, this is consequent with other efforts we are doing with other integrations, where integration test scenarios are defined at the module level. Similar approach will be followed for input integration tests.
Most of the logic is added in the Jenkinsfile and as scripts. Some things could be moved to mage when we modify our targets to start scenarios depending on the type of provisioner. Some parts are going to continue being needed in Jenkinsfile in my opinion, as the archive of Terraform states for manual cleanups.
Summary of changes:
s3_request
, see note below).Why is it important?
To be able to run AWS-related Metricbeat integration tests in Jenkins.
Pending for the future
s3_request
metricset doesn't pass only by creating S3 buckets, we may need to make some requests to this bucket? I am skipping it by now.mageTarget
cleans up the environment and only has a clean working copy of the code. This can be needed if we want to check for the metrics of an specific resource, or we want to collect logs from an specific endpoint. There are two approaches for that:mageTarget
so it is possible to unstash more things apart of the source.mageTarget
. We may still need to stash/archive the terraform state for cleanups or sharing the environment between stages.Checklist
I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
Related issues