-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
- Loading branch information
Showing
11 changed files
with
548 additions
and
281 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,81 @@ | ||
name: Pull test for CD builder images | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "dockerfiles/cd/**/Dockerfile" | ||
- "dockerfiles/cd/**/*.Dockerfile" | ||
- "dockerfiles/cd/skaffold.yaml" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
skaffold: | ||
name: build images with skaffold | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
strategy: | ||
matrix: | ||
builder-profile: [local-docker] | ||
platform: [linux/amd64, linux/arm64] | ||
# go-profile: [go-1.21, go-1.20, go-1.19] | ||
# module: [builder-go, builder-others] | ||
go-profile: [go-1.21] | ||
module: [builder-go] | ||
exclude: | ||
- module: builder-others | ||
go-profile: go-1.20 | ||
- module: builder-others | ||
go-profile: go-1.19 | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
# https://github.com/docker/setup-qemu-action | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
# https://github.com/docker/setup-buildx-action | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup skaffold | ||
run: | | ||
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \ | ||
sudo install skaffold /usr/local/bin/ | ||
- name: Cache layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.skaffold/cache" | ||
key: skaffold/${{ matrix.platform }}/cd/${{ matrix.module }}/${{ matrix.go-profile }}-${{ github.sha }} | ||
restore-keys: | | ||
skaffold/${{ matrix.platform }}/cd/${{ matrix.module }}/${{ matrix.go-profile }}-${{ github.sha }} | ||
skaffold/${{ matrix.platform }}/cd/${{ matrix.module }}/${{ matrix.go-profile }}- | ||
skaffold/${{ matrix.platform }}/cd/${{ matrix.module }}/ | ||
- name: Build images | ||
working-directory: dockerfiles/cd | ||
run: | | ||
skaffold build \ | ||
--push=false \ | ||
--build-concurrency 1 \ | ||
--platform ${{ matrix.platform }} \ | ||
--module ${{ matrix.module }} \ | ||
--profile ${{ matrix.go-profile }},${{ matrix.builder-profile }} \ | ||
--default-repo ghcr.io/pingcap-qe/cd/builders |
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,71 @@ | ||
name: Pull test for CI utils images | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "dockerfiles/ci/release-utils/**/Dockerfile" | ||
- "dockerfiles/ci/release-utils/**/*.Dockerfile" | ||
- "dockerfiles/ci/skaffold.yaml" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
skaffold: | ||
name: build images with skaffold | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
strategy: | ||
matrix: | ||
builder-profile: [local-docker] | ||
platform: [linux/amd64, linux/arm64] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
# https://github.com/docker/setup-qemu-action | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
# https://github.com/docker/setup-buildx-action | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup skaffold | ||
run: | | ||
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \ | ||
sudo install skaffold /usr/local/bin/ | ||
- name: Cache layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.skaffold/cache" | ||
key: skaffold/${{ matrix.platform }}/release-utils-${{ github.sha }} | ||
restore-keys: | | ||
skaffold/${{ matrix.platform }}/release-utils-${{ github.sha }} | ||
skaffold/${{ matrix.platform }}/release-utils- | ||
- name: Build images | ||
working-directory: dockerfiles/ci | ||
run: | | ||
skaffold build \ | ||
--cache-artifacts \ | ||
--push=false \ | ||
--platform ${{ matrix.platform }} \ | ||
--module release-utils \ | ||
--profile ${{ matrix.builder-profile }} \ | ||
--default-repo ghcr.io/pingcap-qe/ci |
Oops, something went wrong.