-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
137 additions
and
100 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
.github/workflows/reusable-build-and-test-oceanbase-ce.yml
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,53 @@ | ||
name: test and release oceanbase-ce image | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cache_key: | ||
required: true | ||
type: string | ||
image_name: | ||
required: true | ||
type: string | ||
version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/reusable-build-oceanbase-ce.yml | ||
with: | ||
cache_key: ${{ inputs.cache_key }} | ||
image_name: ${{ inputs.image_name }} | ||
version: ${{ inputs.version }} | ||
|
||
test-slim: | ||
needs: build | ||
uses: ./.github/workflows/reusable-test-oceanbase-ce.yml | ||
with: | ||
cache_key: ${{ inputs.cache_key }} | ||
image_name: ${{ inputs.image_name }} | ||
image_file: ${{ inputs.image_name }}-amd64.tar | ||
mode: slim | ||
port: 1234 | ||
test_password: 123456 | ||
init_sql: "USE test; | ||
CREATE TABLE user(id INT(10) PRIMARY KEY, name VARCHAR(20)); | ||
INSERT INTO user VALUES (1, 'tom'), (2, 'jerry');" | ||
|
||
test-mini: | ||
needs: build | ||
uses: ./.github/workflows/reusable-test-oceanbase-ce.yml | ||
with: | ||
cache_key: ${{ inputs.cache_key }} | ||
image_name: ${{ inputs.image_name }} | ||
image_file: ${{ inputs.image_name }}-amd64.tar | ||
cluster_name: github-action | ||
mode: mini | ||
port: 1234 | ||
sys_password: 1234567 | ||
test_tenant: mini | ||
test_password: 7654321 | ||
init_sql: "USE test; | ||
CREATE TABLE user(id INT(10) PRIMARY KEY, name VARCHAR(20)); | ||
INSERT INTO user VALUES (1, 'tom'), (2, 'jerry');" |
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,56 @@ | ||
name: build oblogproxy-ce image | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cache_key: | ||
required: true | ||
type: string | ||
image_file: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build-oblogproxy-ce: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free disk space on Ubuntu runner | ||
uses: kfir4444/free-disk-space@main | ||
with: | ||
tool-cache: false | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
swap-storage: true | ||
|
||
- name: Print environment variables | ||
run: printenv | ||
|
||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build oblogproxy-ce image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./oblogproxy-ce | ||
platforms: linux/amd64 | ||
file: ./oblogproxy-ce/Dockerfile | ||
push: false | ||
load: true | ||
tags: oblogproxy-ce | ||
|
||
- name: Export Docker image | ||
run: docker save -o ${{ inputs.image_file }} oblogproxy-ce | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.cache_key }} | ||
path: ${{ inputs.image_file }} |
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
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