This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Metricbeat goal #705
Merged
Merged
Metricbeat goal #705
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
60087fc
[CI] Provide script to run metricbeat
v1v 6551ed1
Add required dependencies within the metricbeat goal script
v1v fd9cb2c
Delegate install dependencies to the functiona-test.sh and simplify p…
v1v b450e14
Merge branch 'master' into feature/metricbeat-goal
v1v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
## Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
## or more contributor license agreements. Licensed under the Elastic License; | ||
## you may not use this file except in compliance with the Elastic License. | ||
|
||
set -euxo pipefail | ||
# | ||
# Run the functional tests for metricbeat using the functional-test wrapper | ||
# | ||
# Parameters: | ||
# - STACK_VERSION - that's the version of the stack to be tested. Default '8.0.0-SNAPSHOT'. | ||
# - METRICBEAT_VERSION - that's the version of the metricbeat to be tested. Default '8.0.0-SNAPSHOT'. | ||
# | ||
|
||
STACK_VERSION=${1:-'8.0.0-SNAPSHOT'} | ||
METRICBEAT_VERSION=${2:-'8.0.0-SNAPSHOT'} | ||
SUITE='metricbeat' | ||
|
||
## Install the required dependencies with some retry | ||
CI_UTILS=/usr/local/bin/bash_standard_lib.sh | ||
if [ -e "${CI_UTILS}" ] ; then | ||
# shellcheck disable=SC1090 | ||
source "${CI_UTILS}" | ||
retry 3 .ci/scripts/install-test-dependencies.sh "${SUITE}" | ||
else | ||
.ci/scripts/install-test-dependencies.sh "${SUITE}" | ||
fi | ||
|
||
.ci/scripts/functional-test.sh "${SUITE}" "" "${STACK_VERSION}" "${METRICBEAT_VERSION}" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer a script (mainly used by the CI) or a Make goal in the e2e directory, so that developers can run them locally? There are already a few examples for fleet in that Makefile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the retry in the CI something that could be also included in the make goal? See https://github.com/elastic/e2e-testing/pull/705/files#diff-12ed1626622bd381afb059882db321d0014a9e9e394c4ca6ff4731887d912076R20-R28
No strong opinion whether to use a sh or a make goal as long as it's just a simple call that the consumer of this project needs to care about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm that's right: I did not look at the retry command. Well, if it's simple as it is, then I'm OK with it.
BTW, this script is needed because we need to install the dependencies, and it's done in the Jenkinsfile, right? Wdyt about simplifying the Jenkinsfile to execute the same as in the consumer, with one script? It will simplify the Jenkinsfile (less calls) and the future script will be self-contained, following same strategy as the script in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
I was tempted to do so, but it might require further surgery, let me give a go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if we can collaborate there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I restructure the scripts so this is now a dummy one to call the functional-test.sh with some parameters, we could even potentially remove it, though I like the idea of using this contract