-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from vdaas/feat/support-two-version
Introduced two version support feature
- Loading branch information
Showing
6 changed files
with
149 additions
and
190 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# DO NOT EDIT | ||
name: "Run E2E test" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: vdaas/vald-client-ci/.github/actions/e2e@main | ||
with: | ||
client_type: node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,133 +1,30 @@ | ||
name: release | ||
# | ||
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# DO NOT EDIT | ||
name: "Run release" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*.*.*' | ||
- 'v*.*.*' | ||
- '*.*.*-*' | ||
- 'v*.*.*-*' | ||
pull_request: | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: rinx/setup-k3d@v0.0.4 | ||
with: | ||
version: latest | ||
name: vald | ||
agents: 1 | ||
- name: check k3d | ||
run: | | ||
kubectl cluster-info | ||
- uses: azure/setup-helm@v3 | ||
- name: Helm version | ||
run: | | ||
helm version | ||
- name: deploy Vald | ||
run: | | ||
helm repo add vald https://vald.vdaas.org/charts | ||
helm install \ | ||
--values ${VALUES} \ | ||
--set defaults.image.tag=nightly \ | ||
--set agent.ngt.dimension=300 \ | ||
--set agent.ngt.auto_index_length=2 \ | ||
--set agent.minReplicas=1 \ | ||
--set gateway.lb.enabled=false \ | ||
--set discoverer.enabled=false \ | ||
--set manager.index.enabled=false \ | ||
--generate-name vald/vald | ||
sleep 3 | ||
kubectl wait --for=condition=ready pod -l app=vald-agent --timeout=3m | ||
kubectl get pods | ||
env: | ||
VALUES: https://raw.githubusercontent.com/vdaas/vald/main/.github/helm/values/values-lb.yaml | ||
- name: node dependencies | ||
run: | | ||
npm install | ||
curl -L https://raw.githubusercontent.com/rinx/word2vecjson/master/data/wordvecs1000.json -o tests/wordvecs1000.json | ||
- name: run tests | ||
run: | | ||
kubectl port-forward statefulset/vald-agent 8081:8081 & | ||
pid=$! | ||
npm run test | ||
kill $pid | ||
- name: packing for running example code | ||
run: | | ||
npm install | ||
npm pack | ||
- name: verify example codes (ts) | ||
run: | | ||
kubectl port-forward statefulset/vald-agent 8081:8081 & | ||
pid=$! | ||
version=`make vald/client/node/version/print` | ||
npm install -g ts-node | ||
cd example-ts | ||
npm install ../vald-client-node-${version}.tgz -s -f | ||
DIM=300 ts-node example.ts | ||
kill $pid | ||
- name: verify example codes (js) | ||
run: | | ||
version=`make vald/client/node/version/print` | ||
cd example && npm install ../vald-client-node-${version}.tgz -s -f | ||
kubectl port-forward statefulset/vald-agent 8081:8081 & | ||
pid=$! | ||
DIM=300 node example.js | ||
kill $pid | ||
publish: | ||
if: startsWith( github.ref, 'refs/tags/') | ||
needs: | ||
- e2e | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://registry.npmjs.org' | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Build | ||
run: | | ||
make npm/deps | ||
export GOPATH=$HOME/go | ||
make all | ||
make vald/sha/update | ||
make vald/client/node/version/update | ||
rm -rf vald | ||
- name: publish | ||
run: | | ||
npm install | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
release: | ||
if: startsWith( github.ref, 'refs/tags/') | ||
needs: | ||
- e2e | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Create release | ||
if: startsWith( github.ref, 'refs/tags/') | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
uses: vdaas/vald-client-ci/.github/workflows/release.yaml@main | ||
with: | ||
client_type: node | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# DO NOT EDIT | ||
name: "Sync Vald" | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "*/10 * * * *" | ||
jobs: | ||
sync: | ||
uses: vdaas/vald-client-ci/.github/workflows/sync.yaml@main | ||
with: | ||
client_type: node | ||
secrets: | ||
CI_USER: ${{ secrets.CI_TOKEN }} | ||
CI_TOKEN: ${{ secrets.CI_USER }} | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
22 |