Skip to content

CI failure fixes #23

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

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ docker build \

echo -e "\033[34;1mINFO: running $product container\033[0m"

# check BUILDKITE env var to enable support for both CI or running locally
if [[ -z "${BUILDKITE+x}" ]]; then
# check CI env vars to enable support for both CI or running locally
if [[ -z "${BUILDKITE+x}" ]] || [[ -z "${CI+x}" ]]; then
docker run \
--volume "$repo:/usr/src/app" \
--volume "$(realpath $repo/../elastic-client-generator-js):/usr/src/elastic-client-generator-js" \
Expand Down
11 changes: 7 additions & 4 deletions test/integration/test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,12 +824,15 @@ function isNDJson (api) {
* Hack around the fact that serverless doesn't allow deleting indices using wildcards
*/
async function deleteIndices(client) {
const indices = await client.cat.indices()
if (indices.length > 0) {
const indexNames = indices.map(index => index.name)
const indicesRaw = await client.cat.indices()
const indexNames = indicesRaw
.trim()
.split('\n')
.map(row => row.split(' ')[2])
.filter(name => !name.startsWith('.'))
if (indexNames.length > 0) {
await client.indices.delete({
index: indexNames.join(','),
expand_wildcards: 'open,closed,hidden',
}, { ignore: [404] })
}
}
Expand Down