Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

feat: support a comma-separated list of test suites #324

Merged
merged 20 commits into from
Sep 28, 2020

Conversation

mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Sep 23, 2020

What does this PR do?

It refactors the jenkinsfile logic to support this. To achieve it, we:

  • renamed a few variables with a more meaningful name
  • double quoted a variable in a shell script to avoid unescaped values (i.e. TAGS='foo && bar')
  • used the empty string as default value for the test suite parameter instead of 'all'.
  • changed the Jenkins parameter from choice to string
  • refactored the logic to generate the parallel branches to support multiple suites, separating the two use cases that we see
    1. the suite is empty, because we wan to run all. We will iterate through the existing suites (as declared in the YAML file) and will check if it's needed to add it to the parallel execution.
    2. the suite is not empty. We split the string by comma, creating an array. We will iterate through this array of desired suites, and will compare with the existing suites (as declared in the YAML file), and will check if it's needed to add it to the parallel execution.
  • after above iterative refactors, extracted common code to a Groovy function, that performs the following checks (already in place):
    1. has the user skipped it checks to add a suite even if there are no changes?
    2. is the PR modifying files affecting the test suite?

Why is it important?

It will allow to execute more than one test suite from an upstream job (and also from here!)

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 run the Unit tests for the CLI, and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

How to test this locally

if we want to test that the refactor of the variables s OK, rom the root directory of the project:

$ SUITE=ingest-manager TAGS="fleet_mode && enroll" LOG_LEVEL=TRACE make -C e2e functional-test

Desired executed command: godog --tags "fleet_mode && enroll"

About the comma-separated list of strings, it happens on Jenkins time, so not possible to test it locally.

Related issues

Screenshots

Running with runTestsSuites="helm, metricbeat"

Screenshot 2020-09-24 at 01 18 55

Follow-ups

Update elastic/beats#21100 with the updated parameter.

@mdelapenya mdelapenya self-assigned this Sep 23, 2020
@mdelapenya mdelapenya requested a review from a team September 23, 2020 18:03
.ci/Jenkinsfile Outdated
@@ -237,20 +244,30 @@ pipeline {
success {
whenTrue(!isPR() && params.notifyOnGreenBuilds) {
slackSend(channel: "#${env.SLACK_CHANNEL}", color: 'good',
message: "[${params.runTestsSuite}] Build Passed: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.RUN_DISPLAY_URL}|Open>).",
message: "[${params.runTestsSuites}] Build Passed: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.RUN_DISPLAY_URL}|Open>).",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mmmm, this should have better format when multiple suites have been passed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another mmm... what if the value is empty (meaning all)?

@elasticmachine
Copy link
Contributor

elasticmachine commented Sep 23, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #324 updated]

  • Start Time: 2020-09-24T18:24:29.774+0000

  • Duration: 37 min 16 sec

Test stats 🧪

Test Results
Failed 14
Passed 49
Skipped 20
Total 83

Test errors

Expand to view the tests failures

  • Name: Initializing / End-To-End Tests / ingest-manager_agent_endpoint_integration / Adding the Endpoint Integration to an Agent makes the host to show in Security App – Agent Endpoint Integration

    • Age: 3
    • Duration: 223.5986
    • Error Details: Step the host name is shown in the Administration view in the Security App as "online": The host 276df22109ec is not listed in the Administration view in the Security App
  • Name: Initializing / End-To-End Tests / ingest-manager_agent_endpoint_integration / Deploying an Endpoint makes policies to appear in the Security App – Agent Endpoint Integration

    • Age: 3
    • Duration: 204.12032
    • Error Details: Step the policy response will be shown in the Security App: The policy response is not listed as 'success' in the Administration view in the Security App yet
  • Name: Initializing / End-To-End Tests / ingest-manager_stand_alone_mode / Starting the default agent starts backend processes – Stand-alone Agent

    • Age: 3
    • Duration: 183.31587
    • Error Details: Step the "metricbeat" process is in the "started" state on the host
  • Name: Initializing / End-To-End Tests / ingest-manager_stand_alone_mode / Starting the ubi8 agent starts backend processes – Stand-alone Agent

    • Age: 3
    • Duration: 190.94225
    • Error Details: Step the "metricbeat" process is in the "started" state on the host
  • Name: Initializing / End-To-End Tests / ingest-manager_stand_alone_mode / Deploying a default stand-alone agent – Stand-alone Agent

    • Age: 3
    • Duration: 179.81097
    • Error Details: Step there is new data in the index from agent: Error getting response from Elasticsearch. Status: 404 Not Found, ResponseError: map[error:map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias root_cause:[map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias type:index_not_found_exception]] type:index_not_found_exception] status:404]
  • Name: Initializing / End-To-End Tests / ingest-manager_stand_alone_mode / Deploying a ubi8 stand-alone agent – Stand-alone Agent

    • Age: 3
    • Duration: 185.01979
    • Error Details: Step there is new data in the index from agent: Error getting response from Elasticsearch. Status: 404 Not Found, ResponseError: map[error:map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias root_cause:[map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias type:index_not_found_exception]] type:index_not_found_exception] status:404]
  • Name: Initializing / End-To-End Tests / ingest-manager_stand_alone_mode / Stopping the default agent container stops data going into ES – Stand-alone Agent

    • Age: 3
    • Duration: 31.112505
    • Error Details: Step there is no new data in the index after agent shuts down: Error getting response from Elasticsearch. Status: 404 Not Found, ResponseError: map[error:map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias root_cause:[map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias type:index_not_found_exception]] type:index_not_found_exception] status:404]
  • Name: Initializing / End-To-End Tests / ingest-manager_stand_alone_mode / Stopping the ubi8 agent container stops data going into ES – Stand-alone Agent

    • Age: 3
    • Duration: 30.18238
    • Error Details: Step there is no new data in the index after agent shuts down: Error getting response from Elasticsearch. Status: 404 Not Found, ResponseError: map[error:map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias root_cause:[map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias type:index_not_found_exception]] type:index_not_found_exception] status:404]
  • Name: Initializing / End-To-End Tests / ingest-manager_fleet_mode / Deploying the centos agent – Fleet Mode Agent

    • Age: 3
    • Duration: 208.91562
    • Error Details: Step system package dashboards are listed in Fleet: There are no datastreams yet
  • Name: Initializing / End-To-End Tests / ingest-manager_fleet_mode / Deploying the debian agent – Fleet Mode Agent

    • Age: 3
    • Duration: 215.73598
    • Error Details: Step system package dashboards are listed in Fleet: There are no datastreams yet
  • Name: Initializing / End-To-End Tests / ingest-manager_fleet_mode / Starting the centos agent starts backend processes – Fleet Mode Agent

    • Age: 3
    • Duration: 185.07677
    • Error Details: Step the "metricbeat" process is in the "started" state on the host
  • Name: Initializing / End-To-End Tests / ingest-manager_fleet_mode / Starting the debian agent starts backend processes – Fleet Mode Agent

    • Age: 3
    • Duration: 187.8771
    • Error Details: Step the "metricbeat" process is in the "started" state on the host
  • Name: Initializing / End-To-End Tests / ingest-manager_fleet_mode / Restarting the centos host with persistent agent restarts backend processes – Fleet Mode Agent

    • Age: 3
    • Duration: 201.41586
    • Error Details: Step the "metricbeat" process is in the "started" state on the host
  • Name: Initializing / End-To-End Tests / ingest-manager_fleet_mode / Restarting the debian host with persistent agent restarts backend processes – Fleet Mode Agent

    • Age: 3
    • Duration: 187.3932
    • Error Details: Step the "metricbeat" process is in the "started" state on the host

Steps errors

Expand to view the steps failures

  • Name: Run functional tests for ingest-manager:agent_endpoint_integration

    • Description:

    • Duration: 16 min 40 sec

    • Start Time: 2020-09-24T18:30:11.347+0000

    • log

  • Name: Error signal

    • Description:

    • Duration: 0 min 0 sec

    • Start Time: 2020-09-24T18:45:51.270+0000

    • log

  • Name: General Build Step

    • Description: [2020-09-24T18:45:51.765Z] Archiving artifacts
      hudson.AbortException: script returned exit code 1

    • Duration: 0 min 0 sec

    • Start Time: 2020-09-24T18:45:51.760+0000

    • log

  • Name: Run functional tests for ingest-manager:stand_alone_mode

    • Description:

    • Duration: 18 min 55 sec

    • Start Time: 2020-09-24T18:30:09.237+0000

    • log

  • Name: Error signal

    • Description:

    • Duration: 0 min 0 sec

    • Start Time: 2020-09-24T18:48:04.715+0000

    • log

  • Name: General Build Step

    • Description: [2020-09-24T18:48:05.213Z] Archiving artifacts
      hudson.AbortException: script returned exit code 1

    • Duration: 0 min 0 sec

    • Start Time: 2020-09-24T18:48:05.208+0000

    • log

  • Name: Docker login

    • Description:

    • Duration: 0 min 22 sec

    • Start Time: 2020-09-24T18:30:06.349+0000

    • log

  • Name: Run functional tests for ingest-manager:fleet_mode

    • Description:

    • Duration: 31 min 8 sec

    • Start Time: 2020-09-24T18:30:34.825+0000

    • log

  • Name: Error signal

    • Description:

    • Duration: 0 min 0 sec

    • Start Time: 2020-09-24T19:01:42.868+0000

    • log

  • Name: General Build Step

    • Description: [2020-09-24T19:01:43.454Z] Archiving artifacts
      hudson.AbortException: script returned exit code 1

    • Duration: 0 min 0 sec

    • Start Time: 2020-09-24T19:01:43.448+0000

    • log

  • Name: Notifies GitHub of the status of a Pull Request

    • Description: hudson.AbortException: script returned exit code 1

    • Duration: 0 min 1 sec

    • Start Time: 2020-09-24T19:01:43.658+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-09-24T19:01:18.955Z] The following NEW packages will be installed:
[2020-09-24T19:01:18.955Z]   elastic-agent
[2020-09-24T19:01:20.893Z] 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
[2020-09-24T19:01:20.893Z] Need to get 0 B/112 MB of archives.
[2020-09-24T19:01:20.893Z] After this operation, 134 MB of additional disk space will be used.
[2020-09-24T19:01:20.893Z] Get:1 /elastic-agent-8.0.0-SNAPSHOT-amd64.deb elastic-agent amd64 8.0.0 [112 MB]
[2020-09-24T19:01:20.893Z] debconf: delaying package configuration, since apt-utils is not installed
[2020-09-24T19:01:20.893Z] Selecting previously unselected package elastic-agent.
[2020-09-24T19:01:20.893Z] (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 7400 files and directories currently installed.)
[2020-09-24T19:01:20.893Z] Preparing to unpack .../elastic-agent-8.0.0-SNAPSHOT-amd64.deb ...
[2020-09-24T19:01:20.894Z] Unpacking elastic-agent (8.0.0) ...
[2020-09-24T19:01:22.293Z] Setting up elastic-agent (8.0.0) ...
[2020-09-24T19:01:22.293Z] Processing triggers for systemd (232-25+deb9u12) ...
[2020-09-24T19:01:22.557Z] time="2020-09-24T19:01:22Z" level=debug msg="Docker compose executed." cmd="[exec -T debian-systemd apt install /elastic-agent-8.0.0-SNAPSHOT-amd64.deb -y]" composeFilePaths="[/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/profiles/ingest-manager/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/services/debian-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm995662353 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm centos_systemdContainerName:ingest-manager_centos-systemd_centos-systemd_2 centos_systemdTag:latest debian_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-amd64.deb566556732 debian_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-amd64.deb debian_systemdContainerName:ingest-manager_debian-systemd_debian-systemd_2 debian_systemdTag:stretch kibanaConfigPath:/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/src/github.com/elastic/e2e-testing/e2e/_suites/ingest-manager/configurations/kibana.config.yml stackVersion:8.0.0-SNAPSHOT]" profile=ingest-manager
[2020-09-24T19:01:23.141Z] Synchronizing state of elastic-agent.service with SysV service script with /lib/systemd/systemd-sysv-install.
[2020-09-24T19:01:23.141Z] Executing: /lib/systemd/systemd-sysv-install enable elastic-agent
[2020-09-24T19:01:23.404Z] time="2020-09-24T19:01:23Z" level=debug msg="Docker compose executed." cmd="[exec -T debian-systemd systemctl enable elastic-agent]" composeFilePaths="[/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/profiles/ingest-manager/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/services/debian-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm995662353 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm centos_systemdContainerName:ingest-manager_centos-systemd_centos-systemd_2 centos_systemdTag:latest debian_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-amd64.deb566556732 debian_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-amd64.deb debian_systemdContainerName:ingest-manager_debian-systemd_debian-systemd_2 debian_systemdTag:stretch kibanaConfigPath:/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/src/github.com/elastic/e2e-testing/e2e/_suites/ingest-manager/configurations/kibana.config.yml stackVersion:8.0.0-SNAPSHOT]" profile=ingest-manager
[2020-09-24T19:01:24.354Z] The Elastic Agent is currently in BETA and should not be used in production
[2020-09-24T19:01:24.617Z] 2020-09-24T19:01:24.361Z	DEBUG	kibana/client.go:170	Request method: POST, path: /api/ingest_manager/fleet/agents/enroll
[2020-09-24T19:01:24.617Z] fail to enroll: fail to execute request to Kibana: Status code: 401, Kibana returned an error: Unauthorized, message: [security_exception] missing authentication credentials for REST request [/_security/_authenticate], with { header={ WWW-Authenticate={ 0="Basic realm=\"security\" charset=\"UTF-8\"" & 1="ApiKey" } } }
[2020-09-24T19:01:24.617Z] time="2020-09-24T19:01:24Z" level=error msg="Could not execute command in container" command="[elastic-agent enroll http://kibana:5601 QVRWOXdYUUJqbUpGbEljVG0td2I6X01QbUlsLVFTOENMeXUwTzl1VnFWUQ== -f --insecure]" error="Could not run compose file: [/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/profiles/ingest-manager/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/services/debian-systemd/docker-compose.yml] - Local Docker compose exited abnormally whilst running docker-compose: [exec -T debian-systemd elastic-agent enroll http://kibana:5601 QVRWOXdYUUJqbUpGbEljVG0td2I6X01QbUlsLVFTOENMeXUwTzl1VnFWUQ== -f --insecure]. exit status 1" service=debian-systemd
[2020-09-24T19:01:24.617Z] time="2020-09-24T19:01:24Z" level=error msg="Could not enroll the agent with the token" command="[elastic-agent enroll http://kibana:5601 QVRWOXdYUUJqbUpGbEljVG0td2I6X01QbUlsLVFTOENMeXUwTzl1VnFWUQ== -f --insecure]" error="Could not run compose file: [/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/profiles/ingest-manager/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/services/debian-systemd/docker-compose.yml] - Local Docker compose exited abnormally whilst running docker-compose: [exec -T debian-systemd elastic-agent enroll http://kibana:5601 QVRWOXdYUUJqbUpGbEljVG0td2I6X01QbUlsLVFTOENMeXUwTzl1VnFWUQ== -f --insecure]. exit status 1" image=debian-systemd service=debian-systemd tag=stretch token="QVRWOXdYUUJqbUpGbEljVG0td2I6X01QbUlsLVFTOENMeXUwTzl1VnFWUQ=="
[2020-09-24T19:01:24.617Z] time="2020-09-24T19:01:24Z" level=debug msg="As expected, it's not possible to enroll an agent with a revoked token" err="Could not run compose file: [/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/profiles/ingest-manager/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/services/debian-systemd/docker-compose.yml] - Local Docker compose exited abnormally whilst running docker-compose: [exec -T debian-systemd elastic-agent enroll http://kibana:5601 QVRWOXdYUUJqbUpGbEljVG0td2I6X01QbUlsLVFTOENMeXUwTzl1VnFWUQ== -f --insecure]. exit status 1" token="QVRWOXdYUUJqbUpGbEljVG0td2I6X01QbUlsLVFTOENMeXUwTzl1VnFWUQ=="
[2020-09-24T19:01:24.617Z] time="2020-09-24T19:01:24Z" level=warning msg="Could not create command in container" command="[cat /etc/elastic-agent/.elastic-agent.active.commit]" container=4ede7ac3f2b7 detach=false error="Error response from daemon: No such container: 4ede7ac3f2b7" tty=false
[2020-09-24T19:01:24.617Z] time="2020-09-24T19:01:24Z" level=error msg="Could not get agent hash in the container" containerName=4ede7ac3f2b7 error="Error response from daemon: No such container: 4ede7ac3f2b7"
[2020-09-24T19:01:24.617Z] time="2020-09-24T19:01:24Z" level=debug msg="Un-enrolling agent in Fleet" agentID=fb8650de-829f-46a6-8df5-237e00219be0 hostname=4ede7ac3f2b7
[2020-09-24T19:01:26.541Z] time="2020-09-24T19:01:26Z" level=debug msg="Fleet agent was unenrolled" agentID=fb8650de-829f-46a6-8df5-237e00219be0
[2020-09-24T19:01:27.116Z] Stopping ingest-manager_debian-systemd_debian-systemd_2 ... 
[2020-09-24T19:01:28.074Z] 
Stopping ingest-manager_debian-systemd_debian-systemd_2 ... done
Removing ingest-manager_debian-systemd_debian-systemd_2 ... 
[2020-09-24T19:01:28.337Z] 
Removing ingest-manager_debian-systemd_debian-systemd_2 ... done
Going to remove ingest-manager_debian-systemd_debian-systemd_2
[2020-09-24T19:01:28.337Z] time="2020-09-24T19:01:28Z" level=debug msg="Docker compose executed." cmd="[rm -fvs debian-systemd]" composeFilePaths="[/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/profiles/ingest-manager/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/services/debian-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm995662353 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm centos_systemdContainerName:ingest-manager_centos-systemd_centos-systemd_2 centos_systemdTag:latest debian_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-amd64.deb566556732 debian_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-amd64.deb debian_systemdContainerName:ingest-manager_debian-systemd_debian-systemd_2 debian_systemdTag:stretch kibanaConfigPath:/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/src/github.com/elastic/e2e-testing/e2e/_suites/ingest-manager/configurations/kibana.config.yml stackVersion:8.0.0-SNAPSHOT]" profile=ingest-manager
[2020-09-24T19:01:28.337Z] time="2020-09-24T19:01:28Z" level=debug msg="Service removed from compose" profile=ingest-manager service=debian-systemd
[2020-09-24T19:01:29.284Z] time="2020-09-24T19:01:29Z" level=debug msg="The token was deleted" tokenID=df536692-2935-44f7-9e39-6ff240f99235
[2020-09-24T19:01:29.284Z] time="2020-09-24T19:01:29Z" level=info msg="Integration deleted from the configuration" integration= packageConfigId= policyID=467358b0-fe98-11ea-bb07-b981f71a3267 version=
[2020-09-24T19:01:35.889Z] time="2020-09-24T19:01:35Z" level=debug msg="The policy was deleted" policyID=467358b0-fe98-11ea-bb07-b981f71a3267
[2020-09-24T19:01:35.890Z] time="2020-09-24T19:01:35Z" level=debug msg="Destroying ingest-manager runtime dependencies"
[2020-09-24T19:01:35.890Z] Stopping ingest-manager_kibana_1           ... 
[2020-09-24T19:01:35.890Z] Stopping ingest-manager_package-registry_1 ... 
[2020-09-24T19:01:35.890Z] Stopping ingest-manager_elasticsearch_1    ... 
[2020-09-24T19:01:42.547Z] 
Stopping ingest-manager_kibana_1           ... done

Stopping ingest-manager_package-registry_1 ... done

Stopping ingest-manager_elasticsearch_1    ... done
Removing ingest-manager_kibana_1           ... 
[2020-09-24T19:01:42.547Z] Removing ingest-manager_package-registry_1 ... 
[2020-09-24T19:01:42.547Z] Removing ingest-manager_elasticsearch_1    ... 
[2020-09-24T19:01:42.547Z] 
Removing ingest-manager_package-registry_1 ... done

Removing ingest-manager_elasticsearch_1    ... done

Removing ingest-manager_kibana_1           ... done
Removing network ingest-manager_default
[2020-09-24T19:01:42.809Z] time="2020-09-24T19:01:42Z" level=debug msg="Docker compose executed." cmd="[down]" composeFilePaths="[/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/.op/compose/profiles/ingest-manager/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm995662353 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm centos_systemdContainerName:ingest-manager_centos-systemd_centos-systemd_2 centos_systemdTag:latest debian_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-amd64.deb566556732 debian_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-amd64.deb debian_systemdContainerName:ingest-manager_debian-systemd_debian-systemd_2 debian_systemdTag:stretch kibanaConfigPath:/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324/src/github.com/elastic/e2e-testing/e2e/_suites/ingest-manager/configurations/kibana.config.yml stackVersion:8.0.0-SNAPSHOT]" profile=ingest-manager
[2020-09-24T19:01:42.810Z] time="2020-09-24T19:01:42Z" level=debug msg="Elastic Agent binary was removed." installer=centos-systemd path=/tmp/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm995662353
[2020-09-24T19:01:42.810Z] time="2020-09-24T19:01:42Z" level=debug msg="Elastic Agent binary was removed." installer=debian-systemd path=/tmp/elastic-agent-8.0.0-SNAPSHOT-amd64.deb566556732
[2020-09-24T19:01:42.810Z] <?xml version="1.0" encoding="UTF-8"?>
[2020-09-24T19:01:42.810Z] <testsuites name="main" tests="14" skipped="0" failures="6" errors="0" time="1833.376032382">
[2020-09-24T19:01:42.810Z]   <testsuite name="Fleet Mode Agent" tests="14" skipped="0" failures="6" errors="0" time="1633.540641485">
[2020-09-24T19:01:42.810Z]     <testcase name="Deploying the centos agent" status="failed" time="208.915613867">
[2020-09-24T19:01:42.810Z]       <failure message="Step system package dashboards are listed in Fleet: There are no datastreams yet"></failure>
[2020-09-24T19:01:42.810Z]     </testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Deploying the debian agent" status="failed" time="215.73597042">
[2020-09-24T19:01:42.810Z]       <failure message="Step system package dashboards are listed in Fleet: There are no datastreams yet"></failure>
[2020-09-24T19:01:42.810Z]     </testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Starting the centos agent starts backend processes" status="failed" time="185.076773126">
[2020-09-24T19:01:42.810Z]       <failure message="Step the &#34;filebeat&#34; process is in the &#34;started&#34; state on the host: filebeat process is not running in the container yet"></failure>
[2020-09-24T19:01:42.810Z]       <error message="Step the &#34;metricbeat&#34; process is in the &#34;started&#34; state on the host" type="skipped"></error>
[2020-09-24T19:01:42.810Z]     </testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Starting the debian agent starts backend processes" status="failed" time="187.877107423">
[2020-09-24T19:01:42.810Z]       <failure message="Step the &#34;filebeat&#34; process is in the &#34;started&#34; state on the host: filebeat process is not running in the container yet"></failure>
[2020-09-24T19:01:42.810Z]       <error message="Step the &#34;metricbeat&#34; process is in the &#34;started&#34; state on the host" type="skipped"></error>
[2020-09-24T19:01:42.810Z]     </testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Stopping the centos agent stops backend processes" status="passed" time="11.004057702"></testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Stopping the debian agent stops backend processes" status="passed" time="13.125792456"></testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Restarting the centos host with persistent agent restarts backend processes" status="failed" time="201.41586414">
[2020-09-24T19:01:42.810Z]       <failure message="Step the &#34;filebeat&#34; process is in the &#34;started&#34; state on the host: filebeat process is not running in the container yet"></failure>
[2020-09-24T19:01:42.810Z]       <error message="Step the &#34;metricbeat&#34; process is in the &#34;started&#34; state on the host" type="skipped"></error>
[2020-09-24T19:01:42.810Z]     </testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Restarting the debian host with persistent agent restarts backend processes" status="failed" time="187.393200339">
[2020-09-24T19:01:42.810Z]       <failure message="Step the &#34;filebeat&#34; process is in the &#34;started&#34; state on the host: filebeat process is not running in the container yet"></failure>
[2020-09-24T19:01:42.810Z]       <error message="Step the &#34;metricbeat&#34; process is in the &#34;started&#34; state on the host" type="skipped"></error>
[2020-09-24T19:01:42.810Z]     </testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Un-enrolling the centos agent" status="passed" time="13.032439465"></testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Un-enrolling the debian agent" status="passed" time="14.435298508"></testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Re-enrolling the centos agent" status="passed" time="36.104624655"></testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Re-enrolling the debian agent" status="passed" time="26.923115704"></testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Revoking the enrollment token for the centos agent" status="passed" time="30.77681893"></testcase>
[2020-09-24T19:01:42.810Z]     <testcase name="Revoking the enrollment token for the debian agent" status="passed" time="23.57785411"></testcase>
[2020-09-24T19:01:42.810Z]   </testsuite>
[2020-09-24T19:01:42.810Z] </testsuites>make: *** [functional-test] Error 1
[2020-09-24T19:01:42.810Z] Makefile:46: recipe for target 'functional-test' failed
[2020-09-24T19:01:42.810Z] + echo 'ERROR: functional-test failed'
[2020-09-24T19:01:42.810Z] ERROR: functional-test failed
[2020-09-24T19:01:42.810Z] + exit_status=1
[2020-09-24T19:01:42.810Z] + sed -e 's/^[ \t]*//; s#>.*failed$#>#g' outputs/TEST-ingest-manager-fleet_mode
[2020-09-24T19:01:42.810Z] + grep -E '^<.*>$'
[2020-09-24T19:01:42.810Z] + exit 1
[2020-09-24T19:01:42.880Z] Recording test results
[2020-09-24T19:01:43.454Z] Archiving artifacts
[2020-09-24T19:01:43.572Z] Failed in branch ingest-manager_fleet_mode
[2020-09-24T19:01:44.611Z] Stage "Release" skipped due to earlier failure(s)
[2020-09-24T19:01:45.401Z] Running on worker-395930 in /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-324
[2020-09-24T19:01:45.446Z] [INFO] getVaultSecret: Getting secrets
[2020-09-24T19:01:45.525Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-09-24T19:01:47.474Z] + chmod 755 generate-build-data.sh
[2020-09-24T19:01:47.474Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-324/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-324/runs/14 FAILURE 2236295
[2020-09-24T19:01:47.474Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-324/runs/14/steps/?limit=10000 -o steps-info.json
[2020-09-24T19:01:58.458Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-324/runs/14/tests/?status=FAILED -o tests-errors.json
[2020-09-24T19:01:58.458Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-324/runs/14/log/ -o pipeline-log.txt

@mdelapenya mdelapenya marked this pull request as ready for review September 24, 2020 08:59
.ci/Jenkinsfile Outdated Show resolved Hide resolved
.ci/Jenkinsfile Outdated Show resolved Hide resolved
.ci/Jenkinsfile Outdated Show resolved Hide resolved
.ci/Jenkinsfile Outdated Show resolved Hide resolved
@mdelapenya mdelapenya requested a review from a team September 24, 2020 18:06
@mdelapenya mdelapenya merged commit 713c969 into elastic:master Sep 28, 2020
@mdelapenya mdelapenya deleted the 309-multiple-test-suites branch September 28, 2020 08:39
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Sep 28, 2020
* chore: rename variable to represent godog tags

* fix: double quote variable

* chore: rename jenkins parameter

* chore: use empty instead of all as value for the tags to be run

* chore: simplify variable value

* chore: rename variable

* feat: support passing a comma-separated list of test suites to be run

* chore: extract common code to a method

* chore: rename variable

* chore: trim test suite in the list

* chore: add logs

* fix: forgot "each" for the array

* chore: extract slack send to a function

* chore: format slack message

* chore: format message for empty test suites

* chore: rename variable to avoid conflicts with Jenkins params

* chore: simplify loop

Co-authored-by: Victor Martinez <[email protected]>

* chore: simplify variables inside loop

Co-authored-by: Victor Martinez <[email protected]>
# Conflicts:
#	.ci/scripts/functional-test.sh
mdelapenya added a commit that referenced this pull request Sep 28, 2020
* chore: rename variable to represent godog tags

* fix: double quote variable

* chore: rename jenkins parameter

* chore: use empty instead of all as value for the tags to be run

* chore: simplify variable value

* chore: rename variable

* feat: support passing a comma-separated list of test suites to be run

* chore: extract common code to a method

* chore: rename variable

* chore: trim test suite in the list

* chore: add logs

* fix: forgot "each" for the array

* chore: extract slack send to a function

* chore: format slack message

* chore: format message for empty test suites

* chore: rename variable to avoid conflicts with Jenkins params

* chore: simplify loop

Co-authored-by: Victor Martinez <[email protected]>

* chore: simplify variables inside loop

Co-authored-by: Victor Martinez <[email protected]>
# Conflicts:
#	.ci/scripts/functional-test.sh
@mdelapenya mdelapenya mentioned this pull request Sep 29, 2020
9 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support selecting multiple test suite
3 participants