diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index dbb505d479e..79acdea68df 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -13,6 +13,9 @@ pipeline { HOME = "${env.WORKSPACE}" KIND_VERSION = "v0.10.0" K8S_VERSION = "v1.20.2" + + ELASTIC_STACK_VERSION_PREV = "7.11.1" + ELASTIC_STACK_VERSION_PREV_PREV = "7.10.0" } options { timeout(time: 2, unit: 'HOURS') @@ -52,8 +55,8 @@ pipeline { // Include hack to skip temporary files with "@tmp" suffix. // For reference: https://issues.jenkins.io/browse/JENKINS-52750 findFiles()?.findAll{ !it.name.endsWith('@tmp') }?.collect{ it.name }?.sort()?.each { - if (isPrAffected("${it}")) { - integrations["${it}"] = { + if (isPrAffected(it)) { + integrations[it] = { sleep(randomNumber(min: 1, max: 5)) node('ubuntu-20 && immutable') { stage("${it}: check") { @@ -77,11 +80,15 @@ pipeline { dir("${BASE_DIR}") { archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/test-results/*.xml') junit(allowEmptyResults: true, keepLongStdio: true, testResults: "build/test-results/*.xml") - sh(label: "Collect Elastic stack logs", script: "build/elastic-package stack dump -v --output build/elastic-stack-dump/${it}") - archiveArtifacts(allowEmptyArchive: true, artifacts: "build/elastic-stack-dump/${it}/logs/*.log") + sh(label: "Collect Elastic stack logs", script: "build/elastic-package stack dump -v --output build/elastic-stack-dump/latest/${it}") + archiveArtifacts(allowEmptyArchive: true, artifacts: "build/elastic-stack-dump/latest/${it}/logs/*.log") sh(label: "Take down the Elastic stack", script: 'build/elastic-package stack down -v') } } + + // Check compatibility with previous stacks + checkPackageCompatibility(it, ELASTIC_STACK_VERSION_PREV) + checkPackageCompatibility(it, ELASTIC_STACK_VERSION_PREV_PREV) } } } @@ -230,4 +237,40 @@ def withCloudTestEnv(Closure body) { withEnvMask(vars: maskedVars) { body() } +} + +def checkPackageCompatibility(integrationName, stackVersion) { + if (!isPackageCompatible(integrationName, stackVersion)) { + return // the package doesn't have to be supported by this stack + } + + try { + dir("${BASE_DIR}/packages/${integrationName}") { + sh(label: "Boot up the Elastic stack (${stackVersion})", script: "../../build/elastic-package stack up -d -v --version ${stackVersion}") + sh(label: "Install integration: ${integrationName}", script: ''' + eval "$(../../build/elastic-package stack shellinit)" + ../../build/elastic-package install -v''') + } + } finally { + dir("${BASE_DIR}") { + sh(label: "Collect Elastic stack logs", script: "build/elastic-package stack dump -v --output build/elastic-stack-dump/${stackVersion}/${integrationName}") + archiveArtifacts(allowEmptyArchive: true, artifacts: "build/elastic-stack-dump/${stackVersion}/${integrationName}/logs/*.log") + sh(label: "Take down the Elastic stack (${stackVersion})", script: 'build/elastic-package stack down -v') + } + } +} + +def isPackageCompatible(integrationName, stackVersion) { + dir("${BASE_DIR}/packages/${integrationName}") { + def r = sh(label: "Check compatibility with ${stackVersion}", + script: "../../build/elastic-package install -v -c kibana.version=${stackVersion}", + returnStatus: true) + if (r == 0) { + echo "Package should be compatible" + return true + } + + echo "Package is not compatible. Skipping." + return false + } } \ No newline at end of file diff --git a/packages/docker/changelog.yml b/packages/docker/changelog.yml index b6ce56b800d..15e1b431900 100644 --- a/packages/docker/changelog.yml +++ b/packages/docker/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "0.1.1" + changes: + - description: Fix compatibility with Kibana + type: enhancement # can be one of: enhancement, bugfix, breaking-change + link: https://github.com/elastic/integrations/pull/740 - version: "0.1.0" changes: - description: initial release diff --git a/packages/docker/manifest.yml b/packages/docker/manifest.yml index faf5dfc2c7f..fa1edaf6a41 100644 --- a/packages/docker/manifest.yml +++ b/packages/docker/manifest.yml @@ -1,6 +1,6 @@ name: docker title: Docker -version: 0.1.0 +version: 0.1.1 release: beta description: Docker Integration type: integration @@ -20,7 +20,7 @@ categories: - containers - os_system conditions: - kibana.version: ^7.9.0 + kibana.version: ^7.11.0 policy_templates: - name: docker title: Docker metrics diff --git a/packages/iptables/changelog.yml b/packages/iptables/changelog.yml index af56b8ae96b..2c939f7d84d 100644 --- a/packages/iptables/changelog.yml +++ b/packages/iptables/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "0.0.3" + changes: + - description: Fix compatibility with Kibana + type: enhancement # can be one of: enhancement, bugfix, breaking-change + link: https://github.com/elastic/integrations/pull/740 - version: "0.0.1" changes: - description: initial release diff --git a/packages/iptables/manifest.yml b/packages/iptables/manifest.yml index 374fb008425..7d4e0c83e16 100644 --- a/packages/iptables/manifest.yml +++ b/packages/iptables/manifest.yml @@ -1,6 +1,6 @@ name: iptables title: Iptables -version: 0.0.2 +version: 0.0.3 release: experimental description: Iptables Integration type: integration @@ -15,7 +15,7 @@ categories: - network - security conditions: - kibana.version: ^7.9.0 + kibana.version: ^7.11.0 screenshots: - src: /img/kibana-iptables.png title: kibana iptables diff --git a/packages/microsoft/changelog.yml b/packages/microsoft/changelog.yml index f6ccf7e0d54..d0aac45edb5 100644 --- a/packages/microsoft/changelog.yml +++ b/packages/microsoft/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "0.4.2" + changes: + - description: Fix compatibility with Kibana + type: enhancement # can be one of: enhancement, bugfix, breaking-change + link: https://github.com/elastic/integrations/pull/740 - version: "0.4.1" changes: - description: Drop cloud field in Defender ATP to set it with provided values diff --git a/packages/microsoft/manifest.yml b/packages/microsoft/manifest.yml index 11db48b5424..83fde1045ab 100644 --- a/packages/microsoft/manifest.yml +++ b/packages/microsoft/manifest.yml @@ -1,7 +1,7 @@ format_version: 1.0.0 name: microsoft title: Microsoft -version: 0.4.1 +version: 0.4.2 description: Microsoft Integration categories: - "network" @@ -11,7 +11,7 @@ release: experimental license: basic type: integration conditions: - kibana.version: '^7.9.0' + kibana.version: '^7.11.0' policy_templates: - name: microsoft title: Microsoft diff --git a/packages/nginx/changelog.yml b/packages/nginx/changelog.yml index 5431c5f99c1..3ef5ade6e13 100644 --- a/packages/nginx/changelog.yml +++ b/packages/nginx/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "0.3.10" + changes: + - description: Fix compatibility with Kibana + type: enhancement # can be one of: enhancement, bugfix, breaking-change + link: https://github.com/elastic/integrations/pull/740 - version: "0.1.0" changes: - description: initial release diff --git a/packages/nginx/manifest.yml b/packages/nginx/manifest.yml index a65c190fafc..ffce2ffbdf2 100644 --- a/packages/nginx/manifest.yml +++ b/packages/nginx/manifest.yml @@ -1,7 +1,7 @@ format_version: 1.0.0 name: nginx title: Nginx -version: 0.3.9 +version: 0.3.10 license: basic description: Nginx Integration type: integration @@ -10,7 +10,7 @@ categories: - security release: experimental conditions: - kibana.version: '^7.9.0' + kibana.version: '^7.11.0' screenshots: - src: /img/nginx-metrics-overview.png title: Nginx metrics overview diff --git a/packages/osquery/changelog.yml b/packages/osquery/changelog.yml index 32d1d2cce09..a37463ca41d 100644 --- a/packages/osquery/changelog.yml +++ b/packages/osquery/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "0.1.1" + changes: + - description: Fix compatibility with Kibana + type: enhancement # can be one of: enhancement, bugfix, breaking-change + link: https://github.com/elastic/integrations/pull/740 - version: "0.0.1" changes: - description: initial release diff --git a/packages/osquery/manifest.yml b/packages/osquery/manifest.yml index 05d4dbbed6c..2bbcfccdd86 100644 --- a/packages/osquery/manifest.yml +++ b/packages/osquery/manifest.yml @@ -1,6 +1,6 @@ name: osquery title: Osquery -version: 0.1.0 +version: 0.1.1 release: experimental description: Osquery Integration type: integration @@ -15,7 +15,7 @@ categories: - security - os_system conditions: - kibana.version: ^7.9.0 + kibana.version: ^7.11.0 screenshots: - src: /img/kibana-osquery-compatibility.png title: kibana osquery compatibility diff --git a/packages/santa/changelog.yml b/packages/santa/changelog.yml index d1ec833516c..57eeddc0a12 100644 --- a/packages/santa/changelog.yml +++ b/packages/santa/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "0.0.2" + changes: + - description: Fix compatibility with Kibana + type: enhancement # can be one of: enhancement, bugfix, breaking-change + link: https://github.com/elastic/integrations/pull/740 - version: "0.0.1" changes: - description: initial release diff --git a/packages/santa/manifest.yml b/packages/santa/manifest.yml index 5bc5bed4c44..b3d8691deff 100644 --- a/packages/santa/manifest.yml +++ b/packages/santa/manifest.yml @@ -1,6 +1,6 @@ name: santa title: Google Santa -version: 0.0.1 +version: 0.0.2 release: experimental description: Google Santa Integration type: integration @@ -14,7 +14,7 @@ categories: - security - os_system conditions: - kibana.version: ^7.9.0 + kibana.version: ^7.11.0 screenshots: - src: /img/kibana-santa-log-overview.png title: kibana santa log overview