Skip to content

Commit

Permalink
Use latest version of isGitRegionMatch (elastic#238)
Browse files Browse the repository at this point in the history
* chore: use uppercase in the spec

* chore: use new version of the isGitRegionMatch step
  • Loading branch information
mdelapenya authored Apr 2, 2020
1 parent d672c3d commit e862598
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ pipeline {
repo: "[email protected]:elastic/${REPO}.git",
credentialsId: "${JOB_GIT_CREDENTIALS}"
)
// make sure the GIT variables are properly set for the isGitRegionMatch step
setEnvVar('GIT_PREVIOUS_COMMIT', "${env.GIT_PREVIOUS_SUCCESSFUL_COMMIT}")
script {
dir("${BASE_DIR}"){
def regexps =[
"^tests/agents/gherkin-specs/"
]
env.GHERKIN_SPECS_UPDATED = isGitRegionMatch(patterns: regexps)
env.GHERKIN_SPECS_UPDATED = isGitRegionMatch(
from: "${env.GIT_PREVIOUS_SUCCESSFUL_COMMIT}",
to: "${env.GIT_COMMIT}",
patterns: regexps)
}
}
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
Expand Down
4 changes: 2 additions & 2 deletions tests/agents/gherkin-specs/api_key.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Feature: API Key

Scenario: A configured api key is sent in the Authorization header
Scenario: A configured API key is sent in the Authorization header
Given an agent
When an api key is set to 'RTNxMjlXNEJt' in the config
Then the Authorization header is 'ApiKey RTNxMjlXNEJt'

Scenario: A configured api key takes precedence over a secret token
Scenario: A configured API key takes precedence over a secret token
Given an agent
When an api key is set to 'MjlXNEJasdfDt' in the config
And a secret_token is set to 'secr3tT0ken' in the config
Expand Down

0 comments on commit e862598

Please sign in to comment.