Skip to content

Commit 4859c20

Browse files
authored
Merge pull request #7559 from everpcpc/fix-ci
ci: do not release sqllogic docker image
2 parents 0c878d2 + e5138a1 commit 4859c20

File tree

3 files changed

+62
-36
lines changed

3 files changed

+62
-36
lines changed

.github/workflows/build-sqllogic.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Sqllogic Test Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "tests/logictest/**"
9+
10+
permissions:
11+
id-token: write
12+
contents: read
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- uses: ./.github/actions/setup_docker
21+
id: login
22+
with:
23+
repo: build-tool
24+
ecr_role_arn: ${{ secrets.ECR_ROLE_ARN }}
25+
dockerhub_user: ${{ secrets.DOCKERHUB_USERNAME }}
26+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+
- name: Build and push
29+
id: docker_build
30+
uses: docker/build-push-action@v3
31+
with:
32+
push: true
33+
tags: |
34+
${{ steps.login.outputs.dockerhub_repo }}:sqllogic
35+
${{ steps.login.outputs.ecr_repo }}:sqllogic
36+
platforms: linux/amd64
37+
context: ./tests/logictest/
38+
file: ./tests/logictest/Dockerfile

.github/workflows/databend-release.yml

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,24 @@ jobs:
191191
target: ${{ steps.target.outputs.target }}
192192
repo_role_arn: ${{ secrets.REPO_ROLE_ARN }}
193193

194+
publish_sqllogic_testsuites:
195+
name: sqllogic testsuites
196+
runs-on: ubuntu-latest
197+
needs: [create_release]
198+
steps:
199+
- name: Checkout
200+
uses: actions/checkout@v3
201+
- name: Get the version
202+
id: get_version
203+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
204+
- name: Upload to github release
205+
env:
206+
GH_TOKEN: ${{ inputs.github_token }}
207+
run: |
208+
version=${{ needs.create_release.outputs.version }}
209+
tar -C ./tests/logictest -czvf testsuites-${version}.tar.gz suites
210+
gh release upload ${version} testsuites-${version}.tar.gz --clobber
211+
194212
release_docker_combined:
195213
name: docker image combined
196214
runs-on: ubuntu-latest
@@ -305,34 +323,3 @@ jobs:
305323
context: .
306324
file: ./docker/${{ matrix.distro }}/${{ matrix.service }}.Dockerfile
307325
build-args: VERSION=${{ needs.create_release.outputs.version }}
308-
309-
release_logic_test_docker_image:
310-
name: release logic test docker image
311-
runs-on: ubuntu-latest
312-
needs: [create_release]
313-
steps:
314-
- name: Checkout
315-
uses: actions/checkout@v3
316-
317-
- uses: ./.github/actions/setup_docker
318-
id: login
319-
with:
320-
repo: sqllogictest
321-
ecr_role_arn: ${{ secrets.ECR_ROLE_ARN }}
322-
dockerhub_user: ${{ secrets.DOCKERHUB_USERNAME }}
323-
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
324-
325-
- name: Build and push
326-
id: docker_build
327-
uses: docker/build-push-action@v3
328-
with:
329-
push: true
330-
tags: |
331-
${{ steps.login.outputs.dockerhub_repo }}:latest
332-
${{ steps.login.outputs.dockerhub_repo }}:${{ needs.create_release.outputs.version }}
333-
${{ steps.login.outputs.ecr_repo }}:latest
334-
${{ steps.login.outputs.ecr_repo }}:${{ needs.create_release.outputs.version }}
335-
platforms: linux/amd64
336-
context: ./tests/logictest/
337-
file: ./tests/logictest/Dockerfile
338-
build-args: VERSION=${{ needs.create_release.outputs.version }}

tests/logictest/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ FROM python:3.10
22

33
RUN python3 -m pip install --upgrade pip && pip install --user mysql-connector six PyHamcrest requests environs fire
44
RUN pip install https://github.com/youngsofun/clickhouse-sqlalchemy/archive/a116e3162c699c12e63a689385b547f639c13018.zip
5-
COPY *.py /
6-
COPY suites /suites
7-
WORKDIR /
5+
RUN mkdir /test
6+
WORKDIR /test
7+
COPY *.py /test
88

9-
ENTRYPOINT ["python"]
10-
CMD ["main.py"]
9+
VOLUME ["/test/suites"]
10+
11+
CMD ["/test/main.py"]

0 commit comments

Comments
 (0)