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

Replaced docker-compose with docker compose in Makefile #848

Merged
merged 9 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
22 changes: 15 additions & 7 deletions .github/workflows/integration-unreleased.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
fail-fast: false
matrix:
entry:
- { node_version: '16.x', opensearch_ref: '1.x' }
- { node_version: '16.x', opensearch_ref: '2.0' }
- { node_version: '16.x', opensearch_ref: '2.x' }
- { node_version: '16.x', opensearch_ref: 'main' }
- { node_version: '16.x', opensearch_ref: '1.x', jdk_version: '11' }
- { node_version: '16.x', opensearch_ref: '2.0', jdk_version: '17' }
- { node_version: '16.x', opensearch_ref: '2.x', jdk_version: '17' }
- { node_version: '16.x', opensearch_ref: 'main', jdk_version: '17' }
steps:
- name: Checkout OpenSearch
uses: actions/checkout@v3
Expand All @@ -36,17 +36,25 @@ jobs:
working-directory: opensearch
run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT


- name: Restore cached build
id: cache-restore
uses: actions/cache/restore@v3
with:
path: opensearch/distribution/archives/linux-tar/build/distributions
key: ${{ steps.get-key.outputs.key }}

- name: Setup Java JDK
uses: actions/setup-java@v3
if: steps.cache-restore.outputs.cache-hit != 'true'
with:
distribution: 'corretto'
nhtruong marked this conversation as resolved.
Show resolved Hide resolved
java-version: ${{ matrix.entry.jdk_version }}

- name: Assemble OpenSearch
if: steps.cache-restore.outputs.cache-hit != 'true'
working-directory: opensearch
run: ./gradlew :distribution:archives:linux-tar:assemble
run: ./gradlew :distribution:archives:linux-tar:assemble --stacktrace

- name: Save cached build
if: steps.cache-restore.outputs.cache-hit != 'true'
Expand All @@ -72,7 +80,7 @@ jobs:
fi
echo '=====> waiting...'
done
exit 1
exit 1

- name: Checkout Javascript Client
uses: actions/checkout@v3
Expand Down Expand Up @@ -100,4 +108,4 @@ jobs:
with:
name: opensearch-logs-${{ matrix.entry.opensearch_ref }}-js-${{ matrix.entry.node_version }}
path: |
opensearch/distribution/archives/linux-tar/build/distributions/**/logs/*
opensearch/distribution/archives/linux-tar/build/distributions/**/logs/*
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Deprecated
### Removed
### Fixed
- Fixed docker-compose command in Makefile ([#845](https://github.com/opensearch-project/opensearch-js/issues/845))
### Security

## [2.11.0]
Expand Down
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
cluster.opensearch.build:
docker-compose --project-directory .ci/opensearch build;
docker compose --project-directory .ci/opensearch build;

cluster.opensearch.start:
docker-compose --project-directory .ci/opensearch up -d ;
sleep 60;
docker compose --project-directory .ci/opensearch up -d ;
for attempt in {1..20}; do
sleep 5
if [ "$$SECURE_INTEGRATION" = "true" ]; then
if curl -s -k https://localhost:9200; then
echo '=====> secured cluster ready'
exit 0
fi
else
if curl -s http://localhost:9200; then
echo '=====> unsecured cluster ready'
exit 0
fi
fi
echo '=====> waiting...'
done

cluster.opensearch.stop:
docker-compose --project-directory .ci/opensearch down ;
docker compose --project-directory .ci/opensearch down ;

cluster.clean: ## Remove unused Docker volumes and networks
@printf "\033[2m→ Cleaning up Docker assets...\033[0m\n"
Expand Down
Loading