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

Commit

Permalink
fix: use base version for metricbeat (#368)
Browse files Browse the repository at this point in the history
* fix: use base version for PRs

* chore: reuse value

* fix: do not override environmental metricbeat version
  • Loading branch information
mdelapenya authored Oct 15, 2020
1 parent 598e9df commit dbd8aef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 0 additions & 2 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ LOG_INCLUDE_TIMESTAMP?=TRUE
LOG_LEVEL?=INFO
TIMEOUT_FACTOR?=3
STACK_VERSION?=
METRICBEAT_VERSION?=
PICKLES_VERSION?="2.20.1"
VERSION_VALUE=`cat ../cli/VERSION.txt`

Expand Down Expand Up @@ -47,7 +46,6 @@ functional-test: install-godog
OP_LOG_LEVEL=${LOG_LEVEL} \
OP_LOG_INCLUDE_TIMESTAMP=${LOG_INCLUDE_TIMESTAMP} \
TIMEOUT_FACTOR=${TIMEOUT_FACTOR} \
METRICBEAT_VERSION=${METRICBEAT_VERSION} \
STACK_VERSION=${STACK_VERSION} \
DEVELOPER_MODE=${DEVELOPER_MODE} \
godog --format=${FORMAT} ${TAGS_FLAG} "${TAGS}"
Expand Down
2 changes: 1 addition & 1 deletion e2e/_suites/fleet/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const agentVersionBase = "8.0.0-SNAPSHOT"

// agentVersion is the version of the agent to use
// It can be overriden by ELASTIC_AGENT_VERSION env var
var agentVersion = "8.0.0-SNAPSHOT"
var agentVersion = agentVersionBase

func init() {
config.Init()
Expand Down
2 changes: 1 addition & 1 deletion e2e/_suites/fleet/stand-alone.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const standAloneVersionBase = "8.0.0-SNAPSHOT"

// standAloneVersion is the version of the agent to use
// It can be overriden by ELASTIC_AGENT_VERSION env var
var standAloneVersion = "8.0.0-SNAPSHOT"
var standAloneVersion = standAloneVersionBase

func init() {
config.Init()
Expand Down
8 changes: 7 additions & 1 deletion e2e/_suites/metricbeat/metricbeat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ import (
// It can be overriden by the DEVELOPER_MODE env var
var developerMode = false

const metricbeatVersionBase = "8.0.0-SNAPSHOT"

// metricbeatVersion is the version of the metricbeat to use
// It can be overriden by METRICBEAT_VERSION env var
var metricbeatVersion = "8.0.0-SNAPSHOT"
var metricbeatVersion = metricbeatVersionBase

// timeoutFactor a multiplier for the max timeout when doing backoff retries.
// It can be overriden by TIMEOUT_FACTOR env var
Expand Down Expand Up @@ -241,6 +243,10 @@ func (mts *MetricbeatTestSuite) installedAndConfiguredForVariantModule(serviceVa
}

func (mts *MetricbeatTestSuite) installedUsingConfiguration(configuration string) error {
if strings.HasPrefix(metricbeatVersion, "pr-") {
metricbeatVersion = metricbeatVersionBase
}

// at this point we have everything to define the index name
mts.Version = metricbeatVersion
mts.setIndexName()
Expand Down

0 comments on commit dbd8aef

Please sign in to comment.