Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/apm-pipeline-library
Browse files Browse the repository at this point in the history
* 'master' of github.com:elastic/apm-pipeline-library:
  fix: use toJSON instead readJSON (#1071)
  test-infra: add curl validation on windows (#1069)
  CI: skip using ubuntu label in the beats test-infra (#1070)
  • Loading branch information
v1v committed Apr 13, 2021
2 parents 8c84173 + 8a961d4 commit 5b135df
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion .ci/validateWorkersBeatsCi.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ pipeline {
'immutable && windows-2008-r2',
'immutable && windows-7-32-bit',
'immutable && windows-7',
'ubuntu && immutable',
'ubuntu-18',
'ubuntu-20',
'worker-c07c6107jyw0', // macOS workers https://beats-ci.elastic.co/label/macosx/
Expand Down
7 changes: 2 additions & 5 deletions src/test/groovy/ApmCliStepTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ class ApmCliStepTests extends ApmBasePipelineTest {
@Test
void testVaultConfig() throws Exception {
helper.registerAllowedMethod('getVaultSecret', [Map.class],
{ return [
"data": [
"value": '{"url": "https://vaultapm.example.com:8200", "token": "vaultApmPassword"}'
]
]
{
return [data: [value: '{"url": "https://vaultapm.example.com:8200", "token": "vaultApmPassword"}' ]]
})

script.call(apmCliConfig: "secret/oblt/apm", serviceName: "serviceFoo")
Expand Down
4 changes: 4 additions & 0 deletions test-infra/beats-ci/test_beats_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ def test_python_installed(host):
def test_tar_installed(host):
cmd = host.run("tar --version")
assert cmd.rc == 0, "it is required for the stashV2 and unstashV2 steps"

def test_curl_installed(host):
cmd = host.run("curl --version")
assert cmd.rc == 0, "it is required for the Beats projects"
2 changes: 1 addition & 1 deletion vars/apmCli.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def call(Map args = [:]) {

if(!url && !token){
def apmJson = getVaultSecret(secret: "${apmCliConfig}")?.data.value
def apm = readJSON(text: apmJson)
def apm = toJSON(apmJson)
url = apm.url
token = apm.token
}
Expand Down

0 comments on commit 5b135df

Please sign in to comment.