Skip to content

Commit bffd915

Browse files
authored
fix: the relationship between database and timeserieas is incorrect (#1)
* fix: the relationship between database and timeserieas is incorrect * remove useless print statements * add github actions * add screenshots --------- Co-authored-by: rick <[email protected]>
1 parent d18f00f commit bffd915

File tree

14 files changed

+273
-48
lines changed

14 files changed

+273
-48
lines changed

.github/release-drafter.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
2+
name-template: 'v$NEXT_PATCH_VERSION 🌈'
3+
tag-template: 'v$NEXT_PATCH_VERSION'
4+
version-template: $MAJOR.$MINOR.$PATCH
5+
# Emoji reference: https://gitmoji.carloscuesta.me/
6+
categories:
7+
- title: '🚀 Features'
8+
labels:
9+
- 'feature'
10+
- 'enhancement'
11+
- 'kind/feature'
12+
- title: '🐛 Bug Fixes'
13+
labels:
14+
- 'fix'
15+
- 'bugfix'
16+
- 'bug'
17+
- 'regression'
18+
- 'kind/bug'
19+
- title: 📝 Documentation updates
20+
labels:
21+
- documentation
22+
- 'kind/doc'
23+
- title: 👻 Maintenance
24+
labels:
25+
- chore
26+
- dependencies
27+
- 'kind/chore'
28+
- 'kind/dep'
29+
- title: 🚦 Tests
30+
labels:
31+
- test
32+
- tests
33+
exclude-labels:
34+
- reverted
35+
- no-changelog
36+
- skip-changelog
37+
- invalid
38+
autolabeler:
39+
- label: 'documentation'
40+
title:
41+
- '/docs:/i'
42+
- label: 'chore'
43+
title:
44+
- '/chore:/i'
45+
- label: 'bug'
46+
title:
47+
- '/fix:/i'
48+
- label: 'enhancement'
49+
title:
50+
- '/feat:/i'
51+
change-template: '* $TITLE (#$NUMBER) @$AUTHOR'
52+
template: |
53+
## What’s Changed
54+
55+
$CHANGES
56+
57+
## Thanks to
58+
$CONTRIBUTORS

.github/workflows/build.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
Test:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Set up Go
11+
uses: actions/setup-go@v3
12+
with:
13+
go-version: 1.22.x
14+
- uses: actions/[email protected]
15+
- name: Unit Test
16+
run: |
17+
make test
18+
19+
Build:
20+
runs-on: ubuntu-20.04
21+
steps:
22+
- name: Set up Go
23+
uses: actions/setup-go@v3
24+
with:
25+
go-version: 1.22.x
26+
- uses: actions/[email protected]
27+
- name: Run GoReleaser
28+
uses: goreleaser/goreleaser-action@v6
29+
with:
30+
version: '~> v2'
31+
args: release --clean --snapshot
32+
33+
BuildImage:
34+
runs-on: ubuntu-20.04
35+
steps:
36+
- uses: actions/[email protected]
37+
- name: Image
38+
run: make build-image
39+
40+
RunE2E:
41+
runs-on: ubuntu-20.04
42+
steps:
43+
- uses: actions/[email protected]
44+
- name: Run e2e
45+
run: |
46+
sudo curl -L https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
47+
sudo chmod u+x /usr/local/bin/docker-compose
48+
make run-e2e
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
UpdateReleaseDraft:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: release-drafter/release-drafter@v5
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}

.github/workflows/release.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches:
8+
- master
9+
10+
env:
11+
REGISTRY: ghcr.io
12+
REGISTRY_DOCKERHUB: docker.io
13+
IMAGE_NAME: ${{ github.repository }}
14+
15+
jobs:
16+
Test:
17+
runs-on: ubuntu-20.04
18+
steps:
19+
- name: Set up Go
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: 1.22.x
23+
- uses: actions/[email protected]
24+
- name: Unit Test
25+
run: |
26+
make test
27+
28+
goreleaser:
29+
runs-on: ubuntu-20.04
30+
if: github.ref != 'refs/heads/master'
31+
steps:
32+
- name: Checkout
33+
uses: actions/[email protected]
34+
with:
35+
fetch-tags: true
36+
fetch-depth: 0
37+
- name: Set output
38+
id: vars
39+
run: echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
40+
- name: Set up Go
41+
uses: actions/setup-go@v3
42+
with:
43+
go-version: 1.22.x
44+
- name: Image Registry Login
45+
run: |
46+
docker login --username linuxsuren --password ${{secrets.DOCKER_HUB_PUBLISH_SECRETS}}
47+
docker login ${{ env.REGISTRY }}/linuxsuren --username linuxsuren --password ${{secrets.GH_PUBLISH_SECRETS}}
48+
- name: Run GoReleaser
49+
uses: goreleaser/goreleaser-action@v6
50+
with:
51+
version: '~> v2'
52+
args: release --clean
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}
55+
- name: Upload via oras
56+
run: |
57+
export TAG=${{ steps.vars.outputs.tag }}
58+
cd dist
59+
oras push ${{ env.REGISTRY_DOCKERHUB }}/linuxsuren/atest-ext-store-orm:${TAG#v} */*
60+
oras push ${{ env.REGISTRY }}/linuxsuren/atest-ext-store-orm:${TAG#v} */*
61+
62+
image:
63+
runs-on: ubuntu-20.04
64+
steps:
65+
- name: Checkout
66+
uses: actions/[email protected]
67+
- name: Setup Docker buildx
68+
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
69+
- name: Log into registry ${{ env.REGISTRY }}
70+
if: github.event_name != 'pull_request'
71+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
72+
with:
73+
registry: ${{ env.REGISTRY }}
74+
username: ${{ github.actor }}
75+
password: ${{ secrets.GH_PUBLISH_SECRETS }}
76+
- name: Log into registry ${{ env.REGISTRY_DOCKERHUB }}
77+
if: github.event_name != 'pull_request'
78+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
79+
with:
80+
registry: ${{ env.REGISTRY_DOCKERHUB }}
81+
username: linuxsuren
82+
password: ${{ secrets.DOCKER_HUB_PUBLISH_SECRETS }}
83+
- name: Extract Docker metadata
84+
id: meta
85+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
86+
with:
87+
images: |
88+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
89+
${{ env.REGISTRY_DOCKERHUB }}/${{ env.IMAGE_NAME }}
90+
- name: Build and push Docker image
91+
id: build-and-push
92+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
93+
with:
94+
context: .
95+
push: ${{ github.event_name != 'pull_request' }}
96+
tags: ${{ steps.meta.outputs.tags }}
97+
labels: ${{ steps.meta.outputs.labels }}
98+
platforms: linux/amd64,linux/arm64
99+
cache-from: type=gha
100+
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ COPY . .
1010

1111
RUN GOPROXY=${GOPROXY} go mod download
1212
RUN GOPROXY=${GOPROXY} CGO_ENABLED=0 go build -ldflags "-w -s -X github.com/linuxsuren/api-testing/pkg/version.version=${VERSION}\
13-
-X github.com/linuxsuren/api-testing/pkg/version.date=$(date +%Y-%m-%d)" -o atest-store-iotdb .
13+
-X github.com/linuxsuren/api-testing/pkg/version.date=$(date +%Y-%m-%d)" -o atest-store-iotdb .
1414

1515
FROM ${BASE_IMAGE}
1616

17-
LABEL org.opencontainers.image.source=https://github.com/LinuxSuRen/atest-ext-store-orm
18-
LABEL org.opencontainers.image.description="ORM database Store Extension of the API Testing."
17+
LABEL org.opencontainers.image.source=https://github.com/LinuxSuRen/atest-ext-store-iotdb
18+
LABEL org.opencontainers.image.description="IoTDB database Store Extension of the API Testing."
1919

2020
COPY --from=builder /workspace/atest-store-iotdb /usr/local/bin/atest-store-iotdb
2121

README-zh.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# atest-ext-store-iotdb
2+
3+
这个项目是 [atest](https://github.com/linuxsuren/api-testing) 框架的一个存储插件。它为操作 IoTDB(时序数据库)提供了支持,用户可以通过 Web UI 的方式轻松操作数据库,包括查询、插入和管理时序数据。
4+
5+
## 功能
6+
7+
-`api-testing` 框架无缝集成。
8+
- 提供操作 IoTDB 的 Web UI。
9+
- 支持查询和管理时序数据。
10+
- 简化 IoTDB 用户的数据库操作。
11+
12+
## 截图
13+
14+
![image](https://github.com/user-attachments/assets/e36c4cfd-5a2f-4999-a1fc-2a44bf6c221e)
15+
![image](https://github.com/user-attachments/assets/90a78156-55aa-4877-a442-0832c217dbfb)

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# atest-ext-store-iotdb
2+
3+
This project is a storage plugin for the [atest](https://github.com/linuxsuren/api-testing) framework. It provides support for interacting with the IoTDB (Time Series Database) through a web UI. With this plugin, users can easily operate the IoTDB database, including querying, inserting, and managing time-series data.
4+
5+
## Features
6+
7+
- Seamless integration with the `api-testing` framework.
8+
- Web UI for interacting with IoTDB.
9+
- Support for querying and managing time-series data.
10+
- Simplifies database operations for IoTDB users.
11+
12+
## Screenshots
13+
14+
![image](https://github.com/user-attachments/assets/e36c4cfd-5a2f-4999-a1fc-2a44bf6c221e)
15+
![image](https://github.com/user-attachments/assets/90a78156-55aa-4877-a442-0832c217dbfb)

e2e/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ FROM ghcr.io/linuxsuren/api-testing:master
33

44
WORKDIR /workspace
55
COPY . .
6-
COPY --from=ext /usr/local/bin/atest-store-orm /usr/local/bin/atest-store-orm
6+
COPY --from=ext /usr/local/bin/atest-store-iotdb /usr/local/bin/atest-store-iotdb
77

88
CMD [ "/workspace/entrypoint.sh" ]

e2e/testing-data-query.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ items:
5555
X-Store-Name: "{{.param.store}}"
5656
body: |
5757
{
58-
"sql": "",
58+
"sql": "show databases",
5959
"key": ""
60-
}
60+
}

nvim-linux-x86_64.tar.gz

-11.5 MB
Binary file not shown.

0 commit comments

Comments
 (0)