Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): list files in the directory without glob pattern #28129

Merged
merged 3 commits into from
Sep 28, 2021

Conversation

mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Sep 27, 2021

What does this PR do?

Instead of using a glob pattern to list the system-tests-*.tar.gz files to upload to the GCP bucket, it limits the ls command to the parent dir (build).

Why is it important?

With the previous command, we have noticed errors in the Groovy execution when there are no files matching the glob pattern, causing to fail the upload step.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

Screenshots

From CI build: https://beats-ci.elastic.co/blue/organizations/jenkins/Beats%2Fbeats/detail/PR-28124/2/pipeline/

Screenshot 2021-09-27 at 10 51 53

Logs

[2021-09-27T01:06:36.137Z] + ls -l src/github.com/elastic/beats/build/system-tests-.tar.gz
[2021-09-27T01:06:36.137Z] ls: cannot access 'src/github.com/elastic/beats/build/system-tests-
.tar.gz': No such file or directory
script returned exit code 2

@mdelapenya mdelapenya self-assigned this Sep 27, 2021
@mdelapenya mdelapenya added the Team:Automation Label for the Observability productivity team label Sep 27, 2021
@mdelapenya mdelapenya requested a review from a team September 27, 2021 08:51
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 27, 2021
@mergify
Copy link
Contributor

mergify bot commented Sep 27, 2021

This pull request does not have a backport label. Could you fix it @mdelapenya? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Sep 27, 2021
@mdelapenya mdelapenya added backport-v7.14.0 Automated backport with mergify backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify and removed backport-skip Skip notification from the automated backport with mergify labels Sep 27, 2021
@mdelapenya mdelapenya marked this pull request as ready for review September 27, 2021 08:55
Jenkinsfile Outdated
dir("${BASE_DIR}"){
cmd(label: "List files to upload", script: "ls -l ${BASE_DIR}/${fileName}")
cmd(label: "List files to upload", script: "ls -l ${BASE_DIR}/${uploadDirName}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this step is launched also on windows system, so ls could fail (depends on the windows version)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good point! I will refactor it to be cross-platform, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step comes from the `pipeline-utility-steps` plugin
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 27, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-09-28T09:30:35.693+0000

  • Duration: 144 min 45 sec

  • Commit: 6daa274

Test stats 🧪

Test Results
Failed 0
Passed 54137
Skipped 5328
Total 59465

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

@mdelapenya mdelapenya merged commit 25bc249 into elastic:master Sep 28, 2021
mergify bot pushed a commit that referenced this pull request Sep 28, 2021
* fix(ci): list files in the directory without glob pattern

* chore: use built-in step to list files

This step comes from the `pipeline-utility-steps` plugin

* chore: print files

(cherry picked from commit 25bc249)
mergify bot pushed a commit that referenced this pull request Sep 28, 2021
* fix(ci): list files in the directory without glob pattern

* chore: use built-in step to list files

This step comes from the `pipeline-utility-steps` plugin

* chore: print files

(cherry picked from commit 25bc249)

# Conflicts:
#	Jenkinsfile
mergify bot pushed a commit that referenced this pull request Sep 28, 2021
* fix(ci): list files in the directory without glob pattern

* chore: use built-in step to list files

This step comes from the `pipeline-utility-steps` plugin

* chore: print files

(cherry picked from commit 25bc249)
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
)

* fix(ci): list files in the directory without glob pattern

* chore: use built-in step to list files

This step comes from the `pipeline-utility-steps` plugin

* chore: print files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.14.0 Automated backport with mergify backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants