Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dockerfiles/cd/builders): add other golang 1.23 builder images #430

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pull-cd-builder-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Cache layers
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Cache layers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-cd-util-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Build images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-ci-runtime-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Cache layers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-prod-runtime-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Setup manifest-tool
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-cd-builder-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Cache layers
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Cache layers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-cd-util-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Publish images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-ci-runtime-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Cache layers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-prod-runtime-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Setup skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/

- name: Setup manifest-tool
Expand Down
5 changes: 0 additions & 5 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ msb-tidb-operator: (_clone "tidb-operator" "https://github.com/pingcap/tidb-oper

build_product_base_images: (_docker_build_prod_base_images "hub.pingcap.net/bases")

_msb component git_url git_branch:
[ -e ../{{component}} ] || git clone --recurse-submodules {{git_url}} --branch {{git_branch}} ../{{component}}
([ -e ../{{component}}/.dockerignore ] && rm ../{{component}}/.dockerignore) || true # make step depended on git metadata.
docker build -t {{component}} -f dockerfiles-multi-stages/{{component}}/Dockerfile ../{{component}}

_clone component git_url git_branch:
[ -e ../{{component}} ] || git clone --recurse-submodules -j8 {{git_url}} --branch {{git_branch}} ../{{component}}
([ -e ../{{component}}/.dockerignore ] && rm ../{{component}}/.dockerignore) || true # make step depended on git metadata.
Expand Down
44 changes: 0 additions & 44 deletions dockerfiles-multi-stages/tiflash/Dockerfile

This file was deleted.

45 changes: 45 additions & 0 deletions dockerfiles/cd/builders/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ build:
dockerfile: tidb-operator/Dockerfile
cache: {}
target: builder
tagPolicy:
customTemplate:
template: "{{ .SHA }}"
components:
- name: SHA
gitCommit:
variant: Tags
cluster:
concurrency: 0
randomDockerConfigSecret: false
Expand All @@ -197,6 +204,44 @@ profiles:
patches:
- { op: move, from: /build/artifacts/0/kaniko, path: /build/artifacts/0/docker }
- { op: move, from: /build/artifacts/1/kaniko, path: /build/artifacts/1/docker }
- name: go-1.23
patches:
- op: replace
path: /build/tagPolicy/customTemplate/template
value: "{{ .SHA }}-go1.23"
- op: add
path: /build/artifacts/0/kaniko/buildArgs
value: &value-go1-23
# renovate: datasource=docker depName=golang
GOLANG_VERSION: 1.23.1
- op: add
path: /build/artifacts/1/kaniko/buildArgs
value: *value-go1-23
- name: go-1.22
patches:
- op: replace
path: /build/tagPolicy/customTemplate/template
value: "{{ .SHA }}-go1.23"
- op: add
path: /build/artifacts/0/kaniko/buildArgs
value: &value-go1-22
# renovate: datasource=docker depName=golang
GOLANG_VERSION: 1.22.7
- op: add
path: /build/artifacts/1/kaniko/buildArgs
value: *value-go1-22
- name: go-1.21
patches:
- op: replace
path: /build/tagPolicy/customTemplate/template
value: "{{ .SHA }}-go1.23"
- op: add
path: /build/artifacts/0/kaniko/buildArgs
value: &value-go1-21
GOLANG_VERSION: 1.21.13
- op: add
path: /build/artifacts/1/kaniko/buildArgs
value: *value-go1-21
---
apiVersion: skaffold/v4beta6
kind: Config
Expand Down
10 changes: 5 additions & 5 deletions dockerfiles/cd/builders/tikv/fips.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# - docker build -t tikv -f Dockerfile ./tikv

########### stage: builder
FROM rockylinux:9.3.20231119 as builder
FROM quay.io/rockylinux/rockylinux:9.4.20240523 as builder
LABEL org.opencontainers.image.authors "[email protected]"
LABEL org.opencontainers.image.description "binary builder for TiKV with FIPS support"
LABEL org.opencontainers.image.source "https://github.com/PingCAP-QE/artifacts"
Expand All @@ -22,10 +22,10 @@ RUN dnf install -y \
git \
findutils \
curl \
python3 --allowerasing && \
dnf --enablerepo=crb install -y \
libstdc++-static && \
dnf clean all
python3 --allowerasing \
&& dnf --enablerepo=crb install -y libstdc++-static \
&& dnf clean all \
&& rm -Rf /var/cache/dnf

# install protoc.
# renovate: datasource=github-release depName=protocolbuffers/protobuf
Expand Down