Skip to content

Commit

Permalink
Added workflows for obagent and ob-configserver (#7)
Browse files Browse the repository at this point in the history
* fix(obproxy): removed redundant double quote for obproxy starup param values

* chore(ci): added ci workflows for obagent and ob-configserver

* fix(CR): rename obconfigserver to ob-configserver
  • Loading branch information
powerfooI authored Jun 6, 2024
1 parent f05979d commit 338bf99
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release-ob-configserver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: release ob-configserver

on:
push:
tags:
- "ob-configserver-*"

env:
tagName: ${{ github.ref_name }}

jobs:
release-ob-configserver:
runs-on: ubuntu-latest
steps:
- name: Log in to Docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set Version variables
id: set_version_vars
run: echo "version=$(echo $tagName | grep -P '(\d*\.\d*\.\d*-\d*)' --only-matching)" >> $GITHUB_OUTPUT

- name: Build and push ob-configserver w/o cache
uses: docker/build-push-action@v2
with:
context: ./ob-configserver
platforms: linux/amd64,linux/arm64
file: ./ob-configserver/Dockerfile
push: true
tags: ${{ vars.DOCKER_PUSH_BASE }}/ob-configserver:${{ steps.set_version_vars.outputs.version }}
build-args: |
VERSION=${{ steps.set_version_vars.outputs.version }}
43 changes: 43 additions & 0 deletions .github/workflows/release-obagent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: release obagent

on:
push:
tags:
- "obagent-*"

env:
tagName: ${{ github.ref_name }}

jobs:
release-obagent:
runs-on: ubuntu-latest
steps:
- name: Log in to Docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set Version variables
id: set_version_vars
run: echo "version=$(echo $tagName | grep -P '(\d*\.\d*\.\d*-\d*)' --only-matching)" >> $GITHUB_OUTPUT

- name: Build and push obagent w/o cache
uses: docker/build-push-action@v2
with:
context: ./obagent
platforms: linux/amd64,linux/arm64
file: ./obagent/Dockerfile
push: true
tags: ${{ vars.DOCKER_PUSH_BASE }}/obagent:${{ steps.set_version_vars.outputs.version }}
build-args: |
VERSION=${{ steps.set_version_vars.outputs.version }}
2 changes: 1 addition & 1 deletion .github/workflows/release-oceanbase-cloud-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Build and push observer w/o cache
uses: docker/build-push-action@v2
with:
context: .
context: ./oceanbase-cloud-native
platforms: linux/amd64,linux/arm64
file: ./oceanbase-cloud-native/Dockerfile
push: true
Expand Down
2 changes: 1 addition & 1 deletion obproxy-ce/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ while IFS='=' read -r key value; do
if [[ $key == ODP_* ]]; then
# Remove the prefix "ODP_" from the key and transform to lower case
key=$(echo $key | sed 's/^ODP_//g' | tr '[:upper:]' '[:lower:]')
opts=$(concat_opts $opts "$(printf "%s=\"%s\"" "$key" "$value")")
opts=$(concat_opts $opts "$(printf "%s=%s" "$key" "$value")")
fi
done < <(env)

Expand Down

0 comments on commit 338bf99

Please sign in to comment.