Skip to content

Commit

Permalink
fix command
Browse files Browse the repository at this point in the history
  • Loading branch information
bhapas committed Jul 13, 2023
1 parent 97a5997 commit b134c64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pipeline {
}
}
steps {
runBuildAndTest(filterStage: 'mandatory')
runBuildAndTest(filterStage: 'extended') // change this before merge
}
}
stage('Extended') {
Expand Down Expand Up @@ -591,27 +591,24 @@ 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()
withTools(k8s: installK8s, gcp: withGCP, nodejs: withNodejs) {
// make commands use -C <folder> 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.
Expand Down Expand Up @@ -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')
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions x-pack/filebeat/input/awss3/input_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b134c64

Please sign in to comment.