diff --git a/.ci/.e2e-tests.yaml b/.ci/.e2e-tests.yaml index 91e482936f..29e45566b1 100644 --- a/.ci/.e2e-tests.yaml +++ b/.ci/.e2e-tests.yaml @@ -1,42 +1,54 @@ --- SUITES: - suite: "helm" - tags: "apm-server" - - suite: "helm" - tags: "filebeat" - - suite: "helm" - tags: "metricbeat" - - suite: "fleet" - tags: "agent_endpoint_integration" + platforms: + - "ubuntu-18.04" + scenarios: + - name: "APM Server" + tags: "apm-server" + - "Filebeat": + tags: "filebeat" + - "Metricbeat": + tags: "metricbeat" - suite: "fleet" - tags: "stand_alone_agent" - - suite: "fleet" - tags: "fleet_mode_agent" - - suite: "metricbeat" - tags: "integrations && activemq" - - suite: "metricbeat" - tags: "integrations && apache" - - suite: "metricbeat" - tags: "integrations && ceph" - - suite: "metricbeat" - tags: "integrations && dropwizard" - - suite: "metricbeat" - tags: "integrations && envoyproxy" - - suite: "metricbeat" - tags: "integrations && etcd" - - suite: "metricbeat" - tags: "integrations && haproxy" - - suite: "metricbeat" - tags: "integrations && kafka" - - suite: "metricbeat" - tags: "metricbeat" - - suite: "metricbeat" - tags: "integrations && mysql" - - suite: "metricbeat" - tags: "integrations && oracle" - - suite: "metricbeat" - tags: "integrations && redis" - - suite: "metricbeat" - tags: "integrations && redisenterprise" - - suite: "metricbeat" - tags: "integrations && vsphere" + platforms: + - "ubuntu-18.04" + scenarios: + - name: "Fleet" + tags: "fleet_mode_agent" + - name: "Endpoint Integration" + tags: "agent_endpoint_integration" + - name: "Stand-alone" + tags: "stand_alone_agent" + - suite: "metricbeat" + platforms: + - "ubuntu-18.04" + scenarios: + - name: "ActiveMQ" + tags: "integrations && activeMQ" + - name: "Apache" + tags: "integrations && apache" + - name: "Ceph" + tags: "integrations && ceph" + - name: "Dropwizard" + tags: "integrations && dropwizard" + - name: "Envoy Proxy" + tags: "integrations && envoyproxy" + - name: "etcd" + tags: "integrations && etcd" + - name: "HAProxy" + tags: "integrations && haproxy" + - name: "Kafka" + tags: "integrations && kafka" + - name: "Metricbeat" + tags: "metricbeat" + - name: "MySQL" + tags: "integrations && mysql" + - name: "Oracle" + tags: "integrations && oracle" + - name: "Redis" + tags: "integrations && redis" + - name: "Redis Enterprise" + tags: "integrations && redisenterprise" + - name: "vSphere" + tags: "integrations && vsphere" diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index f30cbcbc18..605b2017c4 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -194,13 +194,13 @@ pipeline { if (suitesParam == "") { log(level: 'DEBUG', text: "Iterate through existing test suites") existingSuites['SUITES'].each { item -> - checkTestSuite(parallelTasks, item.suite, item.tags) + checkTestSuite(parallelTasks, item) } } else { log(level: 'DEBUG', text: "Iterate through the comma-separated test suites (${suitesParam}), comparing with the existing test suites") suitesParam.split(',').each { suiteParam -> existingSuites['SUITES'].findAll { suiteParam.trim() == it.suite }.each { item -> - checkTestSuite(parallelTasks, item.suite, item.tags) + checkTestSuite(parallelTasks, item) } } } @@ -251,13 +251,20 @@ pipeline { } } -def checkTestSuite(Map parallelTasks = [:], String suite, String tags) { - def regexps = [ "^e2e/_suites/${suite}/.*", "^.ci/.*", "^cli/.*", "^e2e/.*\\.go" ] - if ("${FORCE_SKIP_GIT_CHECKS}" == "true" || isGitRegionMatch(patterns: regexps, shouldMatchAll: false)) { - log(level: 'INFO', text: "Adding ${suite}:${tags} test suite to the build execution") - parallelTasks["${suite}_${tags}"] = generateFunctionalTestStep(suite: "${suite}", tags: "${tags}") - } else { - log(level: 'WARN', text: "The ${suite}:${tags} test suite won't be executed because there are no modified files") +def checkTestSuite(Map parallelTasks = [:], Map item = [:]) { + def suite = item.suite + def platforms = item.platforms + item.scenarios.each { scenario -> + def tags = scenario.tags + def regexps = [ "^e2e/_suites/${suite}/.*", "^.ci/.*", "^cli/.*", "^e2e/.*\\.go" ] + if ("${FORCE_SKIP_GIT_CHECKS}" == "true" || isGitRegionMatch(patterns: regexps, shouldMatchAll: false)) { + platforms.each { platform -> + log(level: 'INFO', text: "Adding ${platform}:${suite}:${tags} test suite to the build execution") + parallelTasks["${platform}_${suite}_${tags}"] = generateFunctionalTestStep(platform: "${platform}", suite: "${suite}", tags: "${tags}") + } + } else { + log(level: 'WARN', text: "The ${suite}:${tags} test suite won't be executed because there are no modified files") + } } } @@ -300,12 +307,13 @@ def generateStep(Map args = [:]){ } def generateFunctionalTestStep(Map args = [:]){ + def platform = args.get('platform') def suite = args.get('suite') def sneakCaseSuite = suite.toUpperCase().replaceAll("-", "_") def stackVersion = env."${sneakCaseSuite}_STACK_VERSION" def tags = args.get('tags') return { - node('ubuntu-18.04 && immutable && docker') { + node("${platform} && immutable && docker") { try { deleteDir() unstash 'source'