.ubuntu_script: &ubuntu_script name: docker build ubuntu script: - cd ubuntu - docker build -t ubuntu-${VERSION} -f ${VERSION}.Dockerfile . .ubuntu_build_pipeline: &ubuntu_build_pipeline services: # 流水线中启用 docker 服务 - docker stages: - <<: *ubuntu_script env: VERSION: 18 - <<: *ubuntu_script env: VERSION: 20 - <<: *ubuntu_script env: VERSION: 22 - <<: *ubuntu_script env: VERSION: 24 .debian_script: &debian_script name: docker build debian ${VERSION} script: - cd debian - docker build -t ${VERSION} -f ${VERSION}.Dockerfile . .debian_build_pipeline: &debian_build_pipeline services: # 流水线中启用 docker 服务 - docker stages: - <<: *debian_script env: VERSION: bookworm-12 - <<: *debian_script env: VERSION: bullseye-11 - <<: *debian_script env: VERSION: buster-10 - <<: *debian_script env: VERSION: stretch-9 .python_build_pipeline: &python_build_pipeline services: # 流水线中启用 docker 服务 - docker stages: - name: docker build python script: - cd python - docker build -t python-demo . .php_build_pipeline: &php_build_pipeline services: # 流水线中启用 docker 服务 - docker stages: - name: docker build python script: - cd php - docker build -t php-demo . .alpine_build_pipeline: &alpine_build_pipeline services: # 流水线中启用 docker 服务 - docker stages: - name: docker build alpine script: - cd alpine - docker build -t alpine-demo . main: push: - <<: *ubuntu_build_pipeline name: ubuntu-amd runner: tags: cnb:arch:amd64 - <<: *ubuntu_build_pipeline name: ubuntu-arm runner: tags: cnb:arch:arm64:v8 - <<: *debian_build_pipeline name: debian-arm runner: tags: cnb:arch:arm64:v8 - <<: *debian_build_pipeline name: debian-amd runner: tags: cnb:arch:amd64 - <<: *python_build_pipeline name: python-amd runner: tags: cnb:arch:amd64 - <<: *python_build_pipeline name: python-arm runner: tags: cnb:arch:arm64:v8 - <<: *php_build_pipeline name: php-amd runner: tags: cnb:arch:amd64 - <<: *php_build_pipeline name: php-arm runner: tags: cnb:arch:arm64:v8 - <<: *alpine_build_pipeline name: alpine-amd runner: tags: cnb:arch:amd64 - <<: *alpine_build_pipeline name: alpine-arm runner: tags: cnb:arch:arm64:v8