Skip to content

Commit

Permalink
Move from .ci to .github (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored Apr 26, 2024
1 parent a8be5ef commit 2b8e964
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .buildkite/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ echo -e "PYTHON_CONNECTION_CLASS $PYTHON_CONNECTION_CLASS"
echo -e "--- :docker: Build elasticsearch-serverless-python container"

docker build \
--file .ci/Dockerfile \
--file .github/Dockerfile \
--tag elasticsearch-serverless-python \
--build-arg "PYTHON_VERSION=$PYTHON_VERSION" \
.
Expand Down
File renamed without changes.
24 changes: 12 additions & 12 deletions .ci/make.sh → .github/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Skeleton for common build entry script for all elastic
# clients. Needs to be adapted to individual client usage.
#
# Must be called: ./.ci/make.sh <target> <params>
# Must be called: ./.github/make.sh <target> <params>
#
# Version: 1.1.0
#
Expand Down Expand Up @@ -36,8 +36,8 @@ STACK_VERSION=$VERSION
set -euo pipefail

product="elastic/elasticsearch-serverless-python"
output_folder=".ci/output"
codegen_folder=".ci/output"
output_folder=".github/output"
codegen_folder=".github/output"
OUTPUT_DIR="$repo/${output_folder}"
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
WORKFLOW="${WORKFLOW-staging}"
Expand Down Expand Up @@ -114,7 +114,7 @@ echo -e "\033[34;1mINFO: building $product container\033[0m"

docker build \
--build-arg BUILDER_UID="$(id -u)" \
--file $repo/.ci/Dockerfile \
--file $repo/.github/Dockerfile \
--tag ${product} \
.

Expand All @@ -126,21 +126,21 @@ echo -e "\033[34;1mINFO: running $product container\033[0m"

if [[ "$CMD" == "assemble" ]]; then

# Build dists into .ci/output
# Build dists into .github/output
docker run \
-u "$(id -u)" \
--rm -v $repo/.ci/output:/code/elasticsearch-serverless-python/dist \
--rm -v $repo/.github/output:/code/elasticsearch-serverless-python/dist \
$product \
/bin/bash -c "python /code/elasticsearch-serverless-python/utils/build-dists.py $VERSION"

# Verify that there are dists in .ci/output
if compgen -G ".ci/output/*" > /dev/null; then
# Verify that there are dists in .github/output
if compgen -G ".github/output/*" > /dev/null; then

# Tarball everything up in .ci/output
# Tarball everything up in .github/output
if [[ "$WORKFLOW" == 'snapshot' ]]; then
cd $repo/.ci/output && tar -czvf elasticsearch-serverless-python-$VERSION-SNAPSHOT.tar.gz * && cd -
cd $repo/.github/output && tar -czvf elasticsearch-serverless-python-$VERSION-SNAPSHOT.tar.gz * && cd -
else
cd $repo/.ci/output && tar -czvf elasticsearch-serverless-python-$VERSION.tar.gz * && cd -
cd $repo/.github/output && tar -czvf elasticsearch-serverless-python-$VERSION.tar.gz * && cd -
fi

echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m"
Expand Down Expand Up @@ -175,5 +175,5 @@ if [[ "$CMD" == "examplesgen" ]]; then
echo "TODO"
fi

echo "Must be called with '.ci/make.sh [command]"
echo "Must be called with '.github/make.sh [command]"
exit 1
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
python -m pip install nox
- name: Run tests
shell: bash
run: .ci/run-nox.sh
run: .github/run-nox.sh
env:
PYTHON_VERSION: ${{ matrix.python-version }}
NOX_SESSION: ${{ matrix.nox-session }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ cython_debug/
# elasticsearch files
test_elasticsearch/cover
test_elasticsearch/local.py
.ci/output
.github/output
junit/

# sample code for GitHub issues
Expand Down

0 comments on commit 2b8e964

Please sign in to comment.