Skip to content

Commit

Permalink
Move make.sh to .buildkite (#2165)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshMock authored Mar 21, 2024
1 parent 29a0e53 commit d430aec
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 142 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .buildkite/functions/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Shared cleanup routines between different steps
#
# Please source .ci/functions/imports.sh as a whole not just this file
# Please source .buildkite/functions/imports.sh as a whole not just this file
#
# Version 1.0.0
# - Initial version after refactor
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/functions/wait-for-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Exposes a routine scripts can call to wait for a container if that container set up a health command
#
# Please source .ci/functions/imports.sh as a whole not just this file
# Please source .buildkite/functions/imports.sh as a whole not just this file
#
# Version 1.0.1
# - Initial version after refactor
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions .ci/make.sh → .buildkite/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Build entry script for elasticsearch-js
#
# Must be called: ./.ci/make.sh <target> <params>
# Must be called: ./.buildkite/make.sh <target> <params>
#
# Version: 1.1.0
#
Expand Down Expand Up @@ -34,8 +34,8 @@ STACK_VERSION=$VERSION
set -euo pipefail

product="elastic/elasticsearch-js"
output_folder=".ci/output"
codegen_folder=".ci/output"
output_folder=".buildkite/output"
codegen_folder=".buildkite/output"
OUTPUT_DIR="$repo/${output_folder}"
NODE_JS_VERSION=18
WORKFLOW=${WORKFLOW-staging}
Expand Down Expand Up @@ -131,7 +131,7 @@ esac
echo -e "\033[34;1mINFO: building $product container\033[0m"

docker build \
--file .ci/Dockerfile \
--file .buildkite/Dockerfile-make \
--tag "$product" \
--build-arg NODE_JS_VERSION="$NODE_JS_VERSION" \
--build-arg "BUILDER_UID=$(id -u)" \
Expand All @@ -156,7 +156,7 @@ if [[ -z "${BUILDKITE+x}" ]] && [[ -z "${CI+x}" ]] && [[ -z "${GITHUB_ACTIONS+x}
--rm \
$product \
/bin/bash -c "mkdir -p /usr/src/elastic-client-generator-js/output && \
node .ci/make.mjs --task $TASK ${TASK_ARGS[*]}"
node .buildkite/make.mjs --task $TASK ${TASK_ARGS[*]}"
else
echo -e "\033[34;1mINFO: Running in CI mode"
docker run \
Expand All @@ -171,15 +171,15 @@ else
git clone https://$CLIENTS_GITHUB_TOKEN@github.com/elastic/elastic-client-generator-js.git && \
mkdir -p /usr/src/elastic-client-generator-js/output && \
cd /usr/src/elasticsearch-js && \
node .ci/make.mjs --task $TASK ${TASK_ARGS[*]}"
node .buildkite/make.mjs --task $TASK ${TASK_ARGS[*]}"
fi

# ------------------------------------------------------- #
# Post Command tasks & checks
# ------------------------------------------------------- #

if [[ "$CMD" == "assemble" ]]; then
if compgen -G ".ci/output/*" > /dev/null; then
if compgen -G ".buildkite/output/*" > /dev/null; then
echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m"
else
echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m"
Expand Down
1 change: 0 additions & 1 deletion .buildkite/pull-requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"\\.md$",
"\\.asciidoc$",
"^docs\\/",
"^\\.ci\\/",
"^scripts\\/",
"^catalog-info\\.yaml$",
"^test\\/unit\\/",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
filters: |
src-only:
- '!(**/*.{md,asciidoc,txt}|*.{md,asciidoc,txt}|{docs,.ci,.buildkite,scripts}/**/*|catalog-info.yaml)'
- '!(**/*.{md,asciidoc,txt}|*.{md,asciidoc,txt}|{docs,.buildkite,scripts}/**/*|catalog-info.yaml)'
- '.github/workflows/**'
test:
Expand Down
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ test
scripts

# ci configuration
.ci
.travis.yml
.buildkite
certs
Expand Down
11 changes: 0 additions & 11 deletions Makefile

This file was deleted.

77 changes: 0 additions & 77 deletions scripts/es-docker-platinum.sh

This file was deleted.

40 changes: 0 additions & 40 deletions scripts/es-docker.sh

This file was deleted.

4 changes: 2 additions & 2 deletions test/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The specification does not allow the test to be run in parallel, so it might tak
### Running locally

If you want to run the integration tests on your development machine, you must have an Elasticsearch instance running first.
A local instance can be spun up in a Docker container by running the [`.ci/run-elasticsearch.sh`](/.ci/run-elasticsearch.sh) script.
A local instance can be spun up in a Docker container by running the [`.buildkite/run-elasticsearch.sh`](/.buildkite/run-elasticsearch.sh) script.
This is the same script CI jobs use to run Elasticsearch for integration tests, so your results should be relatively consistent.

To simplify the process of starting a container, testing, and cleaning up the container, you can run the `make integration` target:
Expand All @@ -35,7 +35,7 @@ export TEST_SUITE=free # can be `free` or `platinum`
make integration
```

If Elasticsearch doesn't come up, run `make integration-cleanup` and then `DETACH=false .ci/run-elasticsearch.sh` manually to read the startup logs.
If Elasticsearch doesn't come up, run `make integration-cleanup` and then `DETACH=false .buildkite/run-elasticsearch.sh` manually to read the startup logs.

If you get an error about `vm.max_map_count` being too low, run `sudo sysctl -w vm.max_map_count=262144` to update the setting until the next reboot, or `sudo sysctl -w vm.max_map_count=262144; echo 'vm.max_map_count=262144' | sudo tee -a /etc/sysctl.conf` to update the setting permanently.

Expand Down

0 comments on commit d430aec

Please sign in to comment.