-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[CI] Fix publish script #188027
[CI] Fix publish script #188027
Conversation
…ld be prevented by the dry_run flag
7d5a674
to
f64939d
Compare
Pinging @elastic/kibana-operations (Team:Operations) |
It skipped the upload step, but ran all the other checks. That part LGTM. https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4493#0190a178-4260-48df-a84a-cc2f515c0603/339-379 |
fi | ||
|
||
"${PUBLISH_CMD[@]}" | ||
eval "$PUBLISH_CMD" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we can construct the flags and pass that to the docker command without eval at the end, or similar? I'm hesitant to run eval against so many environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, that's probably an option, I didn't consider that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the eval, the command line seems to struggle with quotes, and I can't seem to nail the right way of setting the args up, see my attempts: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds?branch=fix-publish-script
I've finally settled to have a very basic if/else branch here: 979b44a => https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
## Summary Another attempt to fix the DRY_RUN-enhanced publish call - as it seems simply emitting the script only works if there are no arguments. Fixes: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9 Tested here: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the dry-run is supposedly added? but it seems the artifacts were published nonetheless - at least there's no more syntax error) Succesful run with the if-else: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516 (cherry picked from commit 9d75f32) # Conflicts: # .buildkite/scripts/steps/artifacts/publish.sh
## Summary Another attempt to fix the DRY_RUN-enhanced publish call - as it seems simply emitting the script only works if there are no arguments. Fixes: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9 Tested here: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the dry-run is supposedly added? but it seems the artifacts were published nonetheless - at least there's no more syntax error) Succesful run with the if-else: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516 (cherry picked from commit 9d75f32) # Conflicts: # .buildkite/scripts/steps/artifacts/publish.sh
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.15`: - [[CI] Fix publish script (#188027)](#188027) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-16T14:14:06Z","message":"[CI] Fix publish script (#188027)\n\n## Summary\r\nAnother attempt to fix the DRY_RUN-enhanced publish call - as it seems\r\nsimply emitting the script only works if there are no arguments.\r\n\r\nFixes:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9\r\nTested here:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the\r\ndry-run is supposedly added? but it seems the artifacts were published\r\nnonetheless - at least there's no more syntax error)\r\n\r\nSuccesful run with the if-else:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516","sha":"9d75f32f422c641fd6560a7e562303cb7935c98a","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","skip-ci","backport:prev-minor","v8.16.0"],"number":188027,"url":"https://github.com/elastic/kibana/pull/188027","mergeCommit":{"message":"[CI] Fix publish script (#188027)\n\n## Summary\r\nAnother attempt to fix the DRY_RUN-enhanced publish call - as it seems\r\nsimply emitting the script only works if there are no arguments.\r\n\r\nFixes:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9\r\nTested here:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the\r\ndry-run is supposedly added? but it seems the artifacts were published\r\nnonetheless - at least there's no more syntax error)\r\n\r\nSuccesful run with the if-else:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516","sha":"9d75f32f422c641fd6560a7e562303cb7935c98a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188027","number":188027,"mergeCommit":{"message":"[CI] Fix publish script (#188027)\n\n## Summary\r\nAnother attempt to fix the DRY_RUN-enhanced publish call - as it seems\r\nsimply emitting the script only works if there are no arguments.\r\n\r\nFixes:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9\r\nTested here:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the\r\ndry-run is supposedly added? but it seems the artifacts were published\r\nnonetheless - at least there's no more syntax error)\r\n\r\nSuccesful run with the if-else:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516","sha":"9d75f32f422c641fd6560a7e562303cb7935c98a"}}]}] BACKPORT-->
# Backport This will backport the following commits from `main` to `8.14`: - [[CI] Fix publish script (#188027)](#188027) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-16T14:14:06Z","message":"[CI] Fix publish script (#188027)\n\n## Summary\r\nAnother attempt to fix the DRY_RUN-enhanced publish call - as it seems\r\nsimply emitting the script only works if there are no arguments.\r\n\r\nFixes:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9\r\nTested here:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the\r\ndry-run is supposedly added? but it seems the artifacts were published\r\nnonetheless - at least there's no more syntax error)\r\n\r\nSuccesful run with the if-else:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516","sha":"9d75f32f422c641fd6560a7e562303cb7935c98a","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","skip-ci","backport:prev-minor","v8.16.0"],"number":188027,"url":"https://github.com/elastic/kibana/pull/188027","mergeCommit":{"message":"[CI] Fix publish script (#188027)\n\n## Summary\r\nAnother attempt to fix the DRY_RUN-enhanced publish call - as it seems\r\nsimply emitting the script only works if there are no arguments.\r\n\r\nFixes:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9\r\nTested here:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the\r\ndry-run is supposedly added? but it seems the artifacts were published\r\nnonetheless - at least there's no more syntax error)\r\n\r\nSuccesful run with the if-else:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516","sha":"9d75f32f422c641fd6560a7e562303cb7935c98a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188027","number":188027,"mergeCommit":{"message":"[CI] Fix publish script (#188027)\n\n## Summary\r\nAnother attempt to fix the DRY_RUN-enhanced publish call - as it seems\r\nsimply emitting the script only works if there are no arguments.\r\n\r\nFixes:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9\r\nTested here:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the\r\ndry-run is supposedly added? but it seems the artifacts were published\r\nnonetheless - at least there's no more syntax error)\r\n\r\nSuccesful run with the if-else:\r\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516","sha":"9d75f32f422c641fd6560a7e562303cb7935c98a"}}]}] BACKPORT-->
## Summary Last fix on #188027
## Summary Last fix on elastic#188027 (cherry picked from commit 9d43b39)
## Summary Last fix on elastic#188027 (cherry picked from commit 9d43b39)
# Backport This will backport the following commits from `main` to `8.14`: - [[CI] fix unbound variable issue (#188454)](#188454) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-16T16:11:11Z","message":"[CI] fix unbound variable issue (#188454)\n\n## Summary\r\nLast fix on #188027","sha":"9d43b39f47433f4f635105872886f77e912398e7","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","skip-ci","backport:auto-version","v8.15.0","v8.16.0","v8.14.4"],"title":"[CI] fix unbound variable issue","number":188454,"url":"https://github.com/elastic/kibana/pull/188454","mergeCommit":{"message":"[CI] fix unbound variable issue (#188454)\n\n## Summary\r\nLast fix on #188027","sha":"9d43b39f47433f4f635105872886f77e912398e7"}},"sourceBranch":"main","suggestedTargetBranches":["8.15","8.14"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188454","number":188454,"mergeCommit":{"message":"[CI] fix unbound variable issue (#188454)\n\n## Summary\r\nLast fix on #188027","sha":"9d43b39f47433f4f635105872886f77e912398e7"}},{"branch":"8.14","label":"v8.14.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Alex Szabo <[email protected]>
# Backport This will backport the following commits from `main` to `8.15`: - [[CI] fix unbound variable issue (#188454)](#188454) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-16T16:11:11Z","message":"[CI] fix unbound variable issue (#188454)\n\n## Summary\r\nLast fix on #188027","sha":"9d43b39f47433f4f635105872886f77e912398e7","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","skip-ci","backport:auto-version","v8.15.0","v8.16.0","v8.14.4"],"title":"[CI] fix unbound variable issue","number":188454,"url":"https://github.com/elastic/kibana/pull/188454","mergeCommit":{"message":"[CI] fix unbound variable issue (#188454)\n\n## Summary\r\nLast fix on #188027","sha":"9d43b39f47433f4f635105872886f77e912398e7"}},"sourceBranch":"main","suggestedTargetBranches":["8.15","8.14"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188454","number":188454,"mergeCommit":{"message":"[CI] fix unbound variable issue (#188454)\n\n## Summary\r\nLast fix on #188027","sha":"9d43b39f47433f4f635105872886f77e912398e7"}},{"branch":"8.14","label":"v8.14.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Alex Szabo <[email protected]>
Summary
Another attempt to fix the DRY_RUN-enhanced publish call - as it seems simply emitting the script only works if there are no arguments.
Fixes: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4488#01909cf6-71a4-4608-a830-041af9d781d9
Tested here: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4490 (the dry-run is supposedly added? but it seems the artifacts were published nonetheless - at least there's no more syntax error)
Succesful run with the if-else: https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4516