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

chore: move skip responsibility to the automation, not the CI (#528) | fix: double quote tags if they are set (#531) backport for 7.x #532

Merged
merged 2 commits into from
Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .ci/.e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ SUITES:
- suite: "helm"
tags: "metricbeat"
- suite: "fleet"
tags: "agent_endpoint_integration && ~skip"
tags: "agent_endpoint_integration"
- suite: "fleet"
tags: "stand_alone_agent && ~skip"
tags: "stand_alone_agent"
- suite: "fleet"
tags: "fleet_mode_agent && ~skip"
tags: "fleet_mode_agent"
- suite: "metricbeat"
tags: "integrations && apache"
- suite: "metricbeat"
Expand Down
2 changes: 2 additions & 0 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pipeline {
issueCommentTrigger('(?i).*(?:jenkins\\W+)?run\\W+(?:the\\W+)?tests(?:\\W+please)?.*')
}
parameters {
booleanParam(name: "SKIP_SCENARIOS", defaultValue: true, description: "If it's needed to skip those scenarios marked as @skip. Default true")
string(name: 'runTestsSuites', defaultValue: '', description: 'A comma-separated list of test suites to run (default: empty to run all test suites)')
booleanParam(name: "forceSkipGitChecks", defaultValue: false, description: "If it's needed to check for Git changes to filter by modified sources")
booleanParam(name: "forceSkipPresubmit", defaultValue: false, description: "If it's needed to execute the pre-submit tests: unit and precommit.")
Expand Down Expand Up @@ -56,6 +57,7 @@ pipeline {
HOME = "${env.WORKSPACE}"
PATH = "${env.PATH}:${env.WORKSPACE}/bin:${env.WORKSPACE}/${env.BASE_DIR}/.ci/scripts"
GO111MODULE = 'on'
SKIP_SCENARIOS = "${params.SKIP_SCENARIOS}"
SLACK_CHANNEL = "${params.SLACK_CHANNEL.trim()}"
ELASTIC_AGENT_DOWNLOAD_URL = "${params.ELASTIC_AGENT_DOWNLOAD_URL.trim()}"
ELASTIC_AGENT_VERSION = "${params.ELASTIC_AGENT_VERSION.trim()}"
Expand Down
16 changes: 15 additions & 1 deletion e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@ FORMAT?=pretty
LOG_INCLUDE_TIMESTAMP?=TRUE
LOG_LEVEL?=INFO
TIMEOUT_FACTOR?=3
#true by default, allowing developers to set SKIP_SCENARIOS=false
SKIP_SCENARIOS?=true
STACK_VERSION?=
PICKLES_VERSION?="2.20.1"
VERSION_VALUE=`cat ../cli/VERSION.txt`

ifneq ($(TAGS),)
TAGS_FLAG=--tags
ifeq ($(SKIP_SCENARIOS),true)
## We always want to skip scenarios tagged with @skip
TAGS+= && ~skip
endif

# Double quote only if the tags are set
TAGS_VALUE="$(TAGS)"
else
ifeq ($(SKIP_SCENARIOS),true)
TAGS_FLAG=--tags
TAGS_VALUE="~skip"
endif
endif

GO_IMAGE_TAG?='stretch'
Expand Down Expand Up @@ -48,7 +62,7 @@ functional-test: install-godog
TIMEOUT_FACTOR=${TIMEOUT_FACTOR} \
STACK_VERSION=${STACK_VERSION} \
DEVELOPER_MODE=${DEVELOPER_MODE} \
godog --format=${FORMAT} ${TAGS_FLAG} "${TAGS}"
godog --format=${FORMAT} ${TAGS_FLAG} ${TAGS_VALUE}

.PHONY: lint
lint:
Expand Down