feat(workflow): push apisix:dev image on commit#12300
Conversation
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| paths-ignore: | ||
| - "docs/**" | ||
| - "**/*.md" | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Here is the only difference from https://github.com/apache/apisix-docker/blob/master/.github/workflows/apisix_dev_push_docker_hub.yaml .
- Removed the
schedulebecause we are already able to ensure the latest. - Added
workflow_dispatchto allow manual triggering of builds if necessary.
There was a problem hiding this comment.
It is best to build each time a contributor commits (in the their dev branch), but not push, to help us detect potential build errors in advance.
There was a problem hiding this comment.
It is best to build each time a contributor commits (in the their dev branch), but not push, to help us detect potential build errors in advance.
done.
| restart: always | ||
| environment: |
There was a problem hiding this comment.
Here is the only difference from https://github.com/apache/apisix-docker/blob/d5322d57d58c569d98c225f89a8abd991429ec10/compose/docker-compose-master.yaml#L40.
I removed the unnecessary volume map
| wget -q https://github.com/google/brotli/archive/refs/tags/v${BORTLI_VERSION}.zip || exit 1 | ||
| unzip v${BORTLI_VERSION}.zip && cd ./brotli-${BORTLI_VERSION} && mkdir build && cd build || exit 1 | ||
| local CMAKE=$(command -v cmake3 >/dev/null 2>&1 && echo cmake3 || echo cmake) || exit 1 | ||
| ${CMAKE} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/brotli .. || exit 1 | ||
| sudo ${CMAKE} --build . --config Release --target install || exit 1 | ||
| if [ -d "/usr/local/brotli/lib64" ]; then | ||
| echo /usr/local/brotli/lib64 | sudo tee /etc/ld.so.conf.d/brotli.conf | ||
| else | ||
| echo /usr/local/brotli/lib | sudo tee /etc/ld.so.conf.d/brotli.conf | ||
| fi | ||
| sudo ldconfig || exit 1 |
There was a problem hiding this comment.
Here, change all "exit -1" to "exit 1".
I don't know how the original file in apisix-docker passed the review before, which doesn't fit the shell specifications I know, nor can I pass the ci in apisix
apisix:dev image on commit
apisix:dev image on commitapisix:dev image on commit
|
The current script itself has problems and cannot be built in the apisix-docker repository. I tried it locally and couldn't build the image Waiting for a fix in apisix. |
…ow/push-dev-image-on-commit
Merged the latest master of APISIX, all working fine. |
| # limitations under the License. | ||
| # | ||
|
|
||
| FROM api7/apisix-runtime:dev AS build |
There was a problem hiding this comment.
I found api7/apisix-runtime:dev is outdated, we can replace this dockerfile with https://github.com/apache/apisix-docker/blob/master/debian-dev/Dockerfile.local
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| APISIX_VERSION: master |
There was a problem hiding this comment.
Pull Request Overview
This PR integrates the dev-image build pipeline into the main repository by moving Docker scripts and workflows from apisix-docker into apisix, and adds a GitHub Actions workflow to build and push the apache/apisix:dev image on every commit.
- Introduce
check_standalone_config.shto validate standalone-mode settings - Add
install-brotli.sh,docker-entrypoint.sh, Debian-dev Dockerfile and compose files - Add Makefile targets (
build-on-debian-dev,push-multiarch-dev-on-debian) and a GitHub Actions workflow
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docker/utils/check_standalone_config.sh | New script to enforce standalone-mode config in config.yaml |
| docker/debian-dev/install-brotli.sh | Script to download, build, install, and clean up Brotli |
| docker/debian-dev/docker-entrypoint.sh | Entrypoint handling standalone vs cluster initialization |
| docker/debian-dev/Dockerfile | Multi-stage build for Debian-based dev image |
| docker/compose/docker-compose-master.yaml | Compose definition for local dev environment |
| docker/compose/apisix_conf/master/config.yaml | Master config for compose-based dev environment |
| Makefile | Targets to build/push Debian-dev and multiarch dev images |
| .github/workflows/push-dev-image-on-commit.yml | CI workflow to build, test, and push apisix:dev on commit |
Comments suppressed due to low confidence (2)
docker/debian-dev/install-brotli.sh:22
- [nitpick] The variable name
BORTLI_VERSIONis a typo and can be confusing; consider renaming it toBROTL I_VERSIONto match the project name and improve readability.
local BORTLI_VERSION="1.1.0"
docker/utils/check_standalone_config.sh:1
- [nitpick] This new validation script is untested; consider adding unit or integration tests to verify each error path in
check_standalone_config.sh.
#!/usr/bin/env bash
membphis
left a comment
There was a problem hiding this comment.
LGTM
One minor issue, we can fix it later
| - apisix | ||
|
|
||
| etcd: | ||
| image: bitnami/etcd:3.4.9 |
There was a problem hiding this comment.
the lastest bitnami/etcd is 3.6.*
I think we should update it




Description
What
This is a part of #12234.
This PR add a workflow, so that when submitting a commit in any PR, the build and push(only master) of the
apisix:devimage will be triggered.How
This PR moves the https://github.com/apache/apisix-docker/blob/d5322d57d58c569d98c225f89a8abd991429ec10/.github/workflows/apisix_dev_push_docker_hub.yaml and related files into apisix.
Why
apisix-dashboard, the latest dev image with the latest code is required.apisix-dockerin the past were more like nightly images, only released at a specific time each day, which hindered developers from using images with the latest code for testing.apisix-dashboardhas already been integrated intoapisix, theapisix-dockerrepository no longer has much significance and also lacks maintenance. Integrating it directly into theapisixrepository will be easier to maintain.Depend on
Which issue(s) this PR fixes:
Fixes #
Checklist