Skip to content
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

Add AWS tests to Jenkinsfile #17480

Merged
merged 28 commits into from
May 1, 2020
Merged

Add AWS tests to Jenkinsfile #17480

merged 28 commits into from
May 1, 2020

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Apr 3, 2020

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:

  • In Jenkinsfile:
    • Add a parameter to select provisioning and run all cloud tests, and another one specific for AWS tests.
    • Add a stage to x-pack metricbeat to provision scenarios, and a post cleanup stage to clean them up.
    • Terraform state is stashed so it can be used in other stages (this is required for cleanup). It is also archived to ease manual cleanups.
  • In mage, environment variables for cloud clients setup are passed through to integration tests scenarios for testing.
  • A simple terraform scenario is provided for AWS metricbeat module, seems enough to make current tests pass (except for 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

  • The test for 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.
  • Allow to access to the Terraform state outputs in the tests. This is not possible at the moment because 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:
    • Refactor mageTarget so it is possible to unstash more things apart of the source.
    • Move environments provisioning to a mage target, so it can be run as part of mageTarget. We may still need to stash/archive the terraform state for cleanups or sharing the environment between stages.
  • Add framework for testing filebeat inputs, previous point will be probably needed.
  • Consider passing the credentials using files, instead of environment variables. This seems to be needed for Google Cloud, but can be tricky with current management of workspaces.
  • When terraform scenario grows, start using modules.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • Load credentials.
  • Actually do the provisioning of the scenario.
  • Double check that everything works with or without cloud tests.
  • Add somewhere some guidelines about terraform, and a checklist to add a new environment:
    - Execution of tests with mage can be selected using the `TEST_TAGS` environment variable, e.g: TEST_TAGS=aws.
    - There is some terraform configuration that defines a cloud scenario where tests pass.
    - In the Jenkinsfile:
      - Add a boolean parameter to run the tests on this environment, e.g. `awsCloudTests`.
      - Add a conditional block in `withCloudTestEnv` that:
         - Will be executed if the previoysly added boolean parameter, or `allCloudTests` are set to true.
         - Adds the tag to `TEST_TAGS` (as comma separated values).
         - Defines how to obtain the credentials and provide them to the tests.
      - In the stage of the specific beat:
        - Add a stage that calls to `startCloudTestEnv`, if there isn't anyone.
        - Add a post cleanup step that calls to `terraformCleanup`, if there isn't anyone.
        - Add a environment to the list of environments started by `startCloudEnv`, with the condition to start the scenario, and the path to the directory with its definition, e.g. `[cond: params.awsCloudTests, dir: 'x-pack/metricbeat/module/aws']`
    

Related issues

@jsoriano jsoriano added in progress Pull request is currently in progress. :Testing [zube]: In Progress Team:Platforms Label for the Integrations - Platforms team labels Apr 3, 2020
@jsoriano jsoriano self-assigned this Apr 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@jsoriano jsoriano force-pushed the aws-jenkins branch 4 times, most recently from 9790c08 to 886e437 Compare April 3, 2020 18:05
@jsoriano jsoriano force-pushed the aws-jenkins branch 2 times, most recently from effca4c to 38f9405 Compare April 15, 2020 16:30
@jsoriano
Copy link
Member Author

jenkins, test this

@jsoriano
Copy link
Member Author

jenkins, test this please

@jsoriano jsoriano force-pushed the aws-jenkins branch 8 times, most recently from fd5503c to 221c4c8 Compare April 21, 2020 09:41
@jsoriano
Copy link
Member Author

jenkins, test this

@jsoriano jsoriano force-pushed the aws-jenkins branch 7 times, most recently from 95557cb to 86da3ac Compare April 21, 2020 17:04
@kaiyan-sheng
Copy link
Contributor

s3_request metrics needs one extra step when setting up s3 bucket: enable request metrics https://docs.aws.amazon.com/AmazonS3/latest/user-guide/configure-metrics.html
This can be in a separate PR if you want to get this one in first! Thank you!

@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 29, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

  • Build Cause: [Started by user Jaime Soriano Pastor]

  • Start Time: 2020-05-01T12:19:20.187+0000

  • Duration: 88 min 27 sec (5306931)

  • Commit: 0aee9cb

Test stats 🧪

Test Results
Failed 2
Passed 7017
Skipped 1093
Total 8112

Test errors

Expand to view the tests failures

  • Name: Build and Test / Filebeat x-pack / runTest – nose.failure.Failure

    • Status: FAILED
    • Age: 1
    • Duration: 0
    • Error Details: Cannot subscript an existing Union. Use Union[u, t] instead.
  • Name: Build and Test / Filebeat Windows / test_close_renamed – test_harvester.Test

    • Status: FAILED
    • Age: 1
    • Duration: 0.559
    • Error Details: [Errno 2] No such file or directory: 'C:\Users\jenkins\workspace\Beats_beats-beats-mbp_PR-17480\src\github.com\elastic\beats\filebeat\build\system-tests\run\test_harvester.Test.test_close_renamed\registry/filebeat/data.json'

Steps errors

Expand to view the steps failures

  • Name: Mage update build test

    • Description: mage update build test

    • Result: FAILURE

    • Duration: 6 min 56 sec<

    • Start Time: 2020-05-01T12:46:07.924+0000

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Result: FAILURE

    • Duration: 11 min 54 sec<

    • Start Time: 2020-05-01T12:52:45.541+0000

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 2 min 15 sec<

    • Start Time: 2020-05-01T12:49:59.198+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 1 min 50 sec<

    • Start Time: 2020-05-01T12:53:04.627+0000

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 19 sec<

    • Start Time: 2020-05-01T12:55:26.710+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 2 min 36 sec<

    • Start Time: 2020-05-01T12:58:23.930+0000

Log output

Expand to view the last 100 lines of log output

[2020-05-01T13:47:20.605Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-01T13:47:20.605Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-01T13:47:20.605Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-01T13:47:20.605Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-01T13:47:20.605Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-01T13:47:20.605Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-01T13:47:20.605Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-01T13:47:20.605Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-01T13:47:20.605Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-01T13:47:20.605Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-01T13:47:21.011Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats
[2020-05-01T13:47:21.327Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-01T13:47:21.340Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Lint
[2020-05-01T13:47:21.407Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-01T13:47:21.472Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-01T13:47:21.533Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-05-01T13:47:21.614Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-05-01T13:47:21.677Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Filebeat-x-pack
[2020-05-01T13:47:21.748Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-01T13:47:21.817Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-05-01T13:47:21.886Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-01T13:47:21.951Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-01T13:47:22.018Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-01T13:47:22.084Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-01T13:47:22.164Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-01T13:47:22.239Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-01T13:47:22.314Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-01T13:47:22.372Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-05-01T13:47:22.433Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-01T13:47:22.500Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-01T13:47:22.558Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-01T13:47:22.615Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-01T13:47:22.680Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-05-01T13:47:22.739Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-01T13:47:22.796Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-01T13:47:22.877Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-01T13:47:22.944Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-01T13:47:23.002Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-05-01T13:47:23.063Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Auditbeat-Mac-OS-X
[2020-05-01T13:47:23.130Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-01T13:47:23.188Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-05-01T13:47:23.252Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-01T13:47:23.311Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Filebeat-oss
[2020-05-01T13:47:23.370Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Libbeat-oss
[2020-05-01T13:47:23.433Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-01T13:47:23.499Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Auditbeat-Windows
[2020-05-01T13:47:23.564Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-01T13:47:23.625Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-05-01T13:47:23.692Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-05-01T13:47:23.751Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-01T13:47:23.810Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-01T13:47:23.873Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-01T13:47:24.227Z] + cat
[2020-05-01T13:47:24.227Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-01T13:47:24.227Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-01T13:47:30.829Z] runbld>>> runbld started
[2020-05-01T13:47:30.829Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-01T13:47:32.750Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-17480' in order of occurrence in the config (last value wins).
[2020-05-01T13:47:33.694Z] runbld>>> Debug logging enabled.
[2020-05-01T13:47:33.694Z] runbld>>> Storing result
[2020-05-01T13:47:33.960Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-01T13:47:33.960Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200501134733-7CA6A59D
[2020-05-01T13:47:33.960Z] runbld>>> Adding system facts.
[2020-05-01T13:47:34.910Z] runbld>>> Adding vcs info for the latest commit:  0aa7e149bffdf02d138f246dc08de157f67e4d19
[2020-05-01T13:47:34.910Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-01T13:47:35.172Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-01T13:47:35.172Z] Processing JUnit reports with runbld...
[2020-05-01T13:47:35.172Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-01T13:47:35.434Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-01T13:47:35.434Z] runbld>>> DURATION: 17ms
[2020-05-01T13:47:35.434Z] runbld>>> STDOUT: 40 bytes
[2020-05-01T13:47:35.434Z] runbld>>> STDERR: 49 bytes
[2020-05-01T13:47:35.434Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-01T13:47:35.434Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats
[2020-05-01T13:47:36.822Z] runbld>>> Storing build metadata: 
[2020-05-01T13:47:36.822Z] runbld>>> Adding test report.
[2020-05-01T13:47:36.822Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats
[2020-05-01T13:47:37.768Z] runbld>>> Found 100 test output files
[2020-05-01T13:47:38.343Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-01T13:47:38.343Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-01T13:47:38.343Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-01T13:47:38.343Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-01T13:47:38.343Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-01T13:47:38.605Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-01T13:47:39.180Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-01T13:47:39.180Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-01T13:47:39.754Z] runbld>>> Test output logs contained: Errors: 2 Failures: 0 Tests: 7962 Skipped: 890
[2020-05-01T13:47:39.754Z] runbld>>> Storing result
[2020-05-01T13:47:39.754Z] runbld>>> FAILURES: 2
[2020-05-01T13:47:40.331Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-01T13:47:40.331Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200501134733-7CA6A59D
[2020-05-01T13:47:40.331Z] runbld>>> Email notification disabled by environment variable.
[2020-05-01T13:47:40.331Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-01T13:47:46.337Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-17480
[2020-05-01T13:47:46.559Z] [INFO] getVaultSecret: Getting secrets
[2020-05-01T13:47:46.617Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-01T13:47:47.382Z] + chmod 755 generate-build-data.sh
[2020-05-01T13:47:47.382Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17480/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17480/runs/95 FAILURE 5306931
[2020-05-01T13:47:47.933Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17480/runs/95/steps/?limit=10000 -o steps-info.json
[2020-05-01T13:47:48.484Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-17480/runs/95/tests/?status=FAILED -o tests-errors.json

Modules that don't define a local environment with docker compose or
kubernetes (kind) are not being executed. Fall back to the old default
of docker in that case.
@jsoriano jsoriano merged commit c94d4bf into elastic:master May 1, 2020
@jsoriano jsoriano deleted the aws-jenkins branch May 1, 2020 16:36
jsoriano added a commit to jsoriano/beats that referenced this pull request May 4, 2020
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)
@jsoriano jsoriano removed the needs_backport PR is waiting to be backported to other branches. label May 4, 2020
jsoriano added a commit that referenced this pull request May 4, 2020
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Platforms Label for the Integrations - Platforms team :Testing v7.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for integration testing of cloud features
6 participants