diff --git a/.github/workflows/release_manually.yml b/.github/workflows/release_manually.yml index 5bb6b1f99..695c22187 100644 --- a/.github/workflows/release_manually.yml +++ b/.github/workflows/release_manually.yml @@ -27,6 +27,7 @@ on: - 'logical-backup' - 'ci-builder' - 'elasticsearch-with-s3-plugin' + - 'mysql-operator-sidecar-80' upstream-ref: description: 'upstream ref' required: false @@ -42,6 +43,38 @@ env: BUILD_PLATFORM: linux/amd64,linux/arm64 jobs: + mysql-operator-sidecar-80: + if : ${{ inputs.job == 'mysql-operator-sidecar-80' }} + runs-on: ubuntu-latest + steps: + - name: Git clone repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2.0.0 + - name: ci-builder + uses: docker/build-push-action@v3.1.1 + with: + context: ./arm64/images/mysql-operator-sidecar-8.0 + file: ./arm64/images/mysql-operator-sidecar-8.0/Dockerfile + github-token: ${{ secrets.GITHUB_TOKEN }} + push: true + platforms: ${{ env.BUILD_PLATFORM }} + tags: | + ${{ env.ONLINE_REGISTER }}/mysql-operator-sidecar-8.0:${{ inputs.tag }} + ${{ env.ONLINE_REGISTER }}/mysql-operator-sidecar-8.0:latest + cache-from: type=gha + cache-to: type=gha,mode=max + ci-builder: if : ${{ inputs.job == 'ci-builder' }} runs-on: ubuntu-latest diff --git a/arm64/images/mysql-operator-sidecar-8.0/Dockerfile b/arm64/images/mysql-operator-sidecar-8.0/Dockerfile index 3d46b0365..01522e86a 100644 --- a/arm64/images/mysql-operator-sidecar-8.0/Dockerfile +++ b/arm64/images/mysql-operator-sidecar-8.0/Dockerfile @@ -15,9 +15,9 @@ ENV GOPROXY=https://goproxy.cn ENV GOPATH=/build WORKDIR /build -RUN wget -O arm64.zip https://github.com/ksmartdata/mysql-operator/archive/refs/heads/arm64.zip -RUN unzip arm64.zip -WORKDIR /build/mysql-operator-arm64 +RUN wget -O extra_image.zip https://github.com/ksmartdata/mysql-operator/archive/refs/heads/extra_image.zip +RUN unzip extra_image.zip +WORKDIR /build/mysql-operator-extra_image RUN go mod tidy RUN CGO_ENABLED=0 go build -o /mysql-operator-sidecar cmd/mysql-operator-sidecar/main.go @@ -26,6 +26,7 @@ FROM --platform=$TARGETPLATFORM centos:8.3.2011 as all USER root +ARG XTRABACKUP_VERSION=8.0.35-31 COPY rootfs/ / @@ -57,17 +58,17 @@ RUN chmod +x /usr/local/bin/rclone # percona-xtrabackup WORKDIR /build -RUN wget -O percona-xtrabackup-8.0.29-22.zip https://github.com/percona/percona-xtrabackup/archive/refs/tags/percona-xtrabackup-8.0.29-22.zip -RUN unzip percona-xtrabackup-8.0.29-22 -WORKDIR /build/percona-xtrabackup-percona-xtrabackup-8.0.29-22 +RUN wget -O percona-xtrabackup-${XTRABACKUP_VERSION}.zip https://github.com/percona/percona-xtrabackup/archive/refs/tags/percona-xtrabackup-${XTRABACKUP_VERSION}.zip +RUN unzip percona-xtrabackup-${XTRABACKUP_VERSION} +WORKDIR /build/percona-xtrabackup-percona-xtrabackup-${XTRABACKUP_VERSION} RUN yum -y install cmake openssl-devel libaio libaio-devel automake autoconf \ bison libtool ncurses-devel libgcrypt-devel libev-devel libcurl-devel zlib-devel \ vim-common -WORKDIR /build/percona-xtrabackup-percona-xtrabackup-8.0.29-22/build -WORKDIR /build/percona-xtrabackup-percona-xtrabackup-8.0.29-22 +WORKDIR /build/percona-xtrabackup-percona-xtrabackup-${XTRABACKUP_VERSION}/build +WORKDIR /build/percona-xtrabackup-percona-xtrabackup-${XTRABACKUP_VERSION} RUN yum install -y gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-binutils