From b134c645ca05a1c7e0b21d8f02c7c2a3149c6e49 Mon Sep 17 00:00:00 2001 From: Bharat Pasupula Date: Thu, 13 Jul 2023 08:50:46 +0200 Subject: [PATCH] fix command --- Jenkinsfile | 19 +++++++++---------- .../input/awss3/input_integration_test.go | 1 + 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 68bbbb35507e..35c3a048c454 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,7 +118,7 @@ pipeline { } } steps { - runBuildAndTest(filterStage: 'mandatory') + runBuildAndTest(filterStage: 'extended') // change this before merge } } stage('Extended') { @@ -591,7 +591,7 @@ def targetWithoutNode(Map args = [:]) { def enableRetry = args.get('enableRetry', false) def withGCP = args.get('withGCP', false) def withNodejs = args.get('withNodejs', false) - String name = normalise(${directory}) + String name = normalise("${directory}") withGithubNotify(context: "${context}") { withBeatsEnv(archive: true, withModule: withModule, directory: directory, id: args.id) { dumpVariables() @@ -599,19 +599,16 @@ def targetWithoutNode(Map args = [:]) { // make commands use -C while mage commands require the dir(folder) // let's support this scenario with the location variable. dir(isMage ? directory : '') { - echo "*******************${name}" if (enableRetry) { // unstash in the same directory where the files were stashed try { - dirs?.each { folder -> - dir(folder){ + dir('input/awss3/_meta/terraform') { unstash(name: "terraform-${name}") //unstash does not print verbose output, hence running ls command to print files that are unstashed into the log - sh(label: 'List unstashed files', script: "ls -la ${pwd()}", returnStatus: true) - } catch (error) { - echo "error unstashing: ${error}" + sh "ls -la ${pwd()}" } - } + } catch (error) { + echo "error unstashing: ${error}" } // Retry the same command to bypass any kind of flakiness. // Downside: genuine failures will be repeated. @@ -950,7 +947,9 @@ def startCloudTestEnv(Map args = [:]) { dirs?.each { folder -> // Archive terraform states in case manual cleanup is needed. archiveArtifacts(allowEmptyArchive: true, artifacts: '**/terraform.tfstate') - stash(name: "terraform-${name}", allowEmpty: true, includes: '**/terraform.tfstate,**/.terraform/**,*.yml') + dir("${folder}") { + stash(name: "terraform-${name}", allowEmpty: true, includes: '**/terraform.tfstate,**/.terraform/**,*.yml') + } } } } diff --git a/x-pack/filebeat/input/awss3/input_integration_test.go b/x-pack/filebeat/input/awss3/input_integration_test.go index 773b74493c04..128a72c1b2d4 100644 --- a/x-pack/filebeat/input/awss3/input_integration_test.go +++ b/x-pack/filebeat/input/awss3/input_integration_test.go @@ -153,6 +153,7 @@ func TestInputRunSQS(t *testing.T) { // Ensure SQS is empty before testing. drainSQS(t, tfConfig.AWSRegion, tfConfig.QueueURL) + // Upload some test files into S3 uploadS3TestFiles(t, tfConfig.AWSRegion, tfConfig.BucketName, "testdata/events-array.json", "testdata/invalid.json",