forked from moby/buildkit
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Alauda/v0.13.1 #9
Open
kycheng
wants to merge
21
commits into
0.13
Choose a base branch
from
alauda/v0.13.1
base: 0.13
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
88abb45
feat: support buildkit v0.13.1
kycheng 3c2de0b
fix: change alpine version to 3.19
kycheng d300f3d
feat: add buildkit image test.
kycheng badaff7
chore: use image file replace remote registry.
kycheng 844da20
Merge pull request #1 from alauda/feat/upgrade-buildkit
kycheng 6d042a3
chore: use mirror images to improve build speed.
kycheng b543f4a
Merge pull request #3 from alauda/fix/image-mirrors
kycheng 34e7269
fix: bump opencontainers/runc package version
nanjingfm 41665ad
Merge pull request #4 from alauda/fix/buildkit-runc
nanjingfm 182053e
fix: add default newInsecureDefaultClient
kycheng b760a02
Merge pull request #5 from alauda/test/insecure-client
kycheng 9821908
fix: upgrade cni plugin to 1.5.1
kycheng 611f13d
Merge pull request #6 from alauda/fix/image-vul
kycheng 1a94d99
bump: update docker/docker version to v26.1.4
kycheng 22ce22b
Merge pull request #7 from alauda/fix/vul-docker-25
kycheng 266d164
chore: update docker/docker version to v26.1.5
kycheng ea094c2
Merge pull request #8 from alauda/fix/vul-docker-26.1.5
kycheng 9621645
chore: update GO_VERSION to 1.22 in Dockerfile
kycheng 4f8d972
Merge pull request #10 from alauda/fix/vul-golang
kycheng f664a7c
chore: upgrade cni to 1.6.0
l-qing 0251cdf
Merge pull request #11 from alauda/chore/upgrade-cni-to-1.6.0
l-qing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,188 @@ | ||
apiVersion: builds.katanomi.dev/v1alpha1 | ||
kind: Build | ||
spec: | ||
runTemplate: | ||
spec: | ||
workspaces: | ||
- name: cache | ||
persistentVolumeClaim: | ||
claimName: build-cache | ||
subPath: golang | ||
workspaces: | ||
- description: | | ||
This workspace is shared among all the pipeline tasks to read/write common resources | ||
name: source | ||
- description: golang cache | ||
name: cache | ||
tasks: | ||
- name: buildkit-oss-version | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
taskSpec: | ||
description: | | ||
generate oss version | ||
results: | ||
- description: oss version | ||
name: oss-version | ||
steps: | ||
- image: build-harbor.alauda.cn/devops/builder-tools:alpine-v3.8.0 | ||
name: read-oss-file | ||
imagePullPolicy: IfNotPresent | ||
workingDir: $(workspaces.source.path) | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
script: | | ||
echo "generate oss version" | ||
echo -n "$(cat ./buildkit_version| xargs echo -e)" | ||
echo -n "$(cat ./buildkit_version| xargs echo -e)" > $(results.oss-version.path) | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
- name: build-buildkit-image | ||
runAfter: | ||
- buildkit-oss-version | ||
timeout: 30m | ||
retries: 0 | ||
taskRef: | ||
kind: ClusterTask | ||
name: alauda-build-image | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
params: | ||
- name: container-image | ||
value: build-harbor.alauda.cn/devops/buildkit | ||
- name: container-image-tag | ||
value: $(tasks.buildkit-oss-version.results.oss-version)-alpine-$(build.git.lastCommit.shortID) | ||
- name: dockerfile | ||
value: Dockerfile | ||
- name: labels | ||
value: | ||
- branch=$(build.git.branch) | ||
- commit=$(build.git.lastCommit.id) | ||
- name: build-extra-args | ||
value: >- | ||
--build-arg app_version=$(build.git.version.docker) | ||
--build-arg commit_id=$(build.git.lastCommit.id) | ||
--build-arg GIT_REVISION=$(build.git.lastCommit.id) | ||
--build-arg GIT_VERSION=$(build.git.version.docker) | ||
--build-arg RUNC_VERSION=release-1.1 | ||
- name: platform | ||
value: | ||
- linux/amd64 | ||
- linux/arm64 | ||
- name: tools-image | ||
value: registry.alauda.cn:60080/devops/builder-tools:v3.8-0-g377a3f9 | ||
- name: verbose | ||
value: "false" | ||
- name: image-scan | ||
runAfter: | ||
- build-buildkit-image | ||
timeout: 30m | ||
retries: 0 | ||
taskRef: | ||
kind: ClusterTask | ||
name: trivy-image-scan | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
- name: cache | ||
workspace: cache | ||
when: [] | ||
params: | ||
- name: targets | ||
value: | ||
- $(tasks.build-buildkit-image.results.ociContainerImageBuild-url) | ||
- name: quality-gate | ||
value: "false" | ||
- name: scan-flags | ||
value: | ||
- vulnerability.ignore-unfixed=true | ||
- db.skip-update=false | ||
- db.repository=build-harbor.alauda.cn/ops/aquasecurity/trivy-db | ||
- name: quality-gate-rules | ||
value: | ||
- severity=High | ||
- name: test-image | ||
runAfter: | ||
- build-buildkit-image | ||
timeout: "1h" | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
params: | ||
- name: tools-image | ||
value: build-harbor.alauda.cn/devops/buildkit:$(tasks.buildkit-oss-version.results.oss-version)-alpine-$(build.git.lastCommit.shortID) | ||
taskSpec: | ||
params: | ||
- name: tools-image | ||
description: test image reference | ||
volumes: | ||
- name: dind-certs | ||
emptyDir: {} | ||
sidecars: | ||
- image: docker-mirrors.alauda.cn/library/docker:20.10-dind | ||
name: docker-daemon | ||
args: | ||
- --storage-driver=overlay2 | ||
- --userland-proxy=false | ||
- --debug | ||
- --registry-mirror=https://docker-mirrors.alauda.cn | ||
securityContext: | ||
privileged: true | ||
env: | ||
- name: DOCKER_TLS_CERTDIR # 将生成的证书写入与客户端共享的路径 | ||
value: /certs | ||
resources: | ||
requests: | ||
cpu: 1000m | ||
memory: 2000Mi | ||
limits: | ||
cpu: 4000m | ||
memory: 8000Mi | ||
volumeMounts: | ||
- mountPath: /certs/client | ||
name: dind-certs | ||
- mountPath: /workspace/source | ||
name: $(workspaces.source.volume) | ||
readinessProbe: # 等待 dind daemon 生成它与客户端共享的证书 | ||
periodSeconds: 1 | ||
exec: | ||
command: [ 'ls', '/certs/client/ca.pem' ] | ||
steps: | ||
- name: test-run | ||
image: registry.alauda.cn:60080/devops/builder-tools:ubuntu-v3.8.1 | ||
imagePullPolicy: IfNotPresent | ||
workingDir: $(workspaces.source.path) | ||
timeout: 2.5h | ||
resources: | ||
requests: | ||
cpu: 1000m | ||
memory: 2000Mi | ||
limits: | ||
cpu: 2000m | ||
memory: 4000Mi | ||
env: | ||
- name: DOCKER_HOST | ||
value: tcp://localhost:2376 | ||
- name: DOCKER_TLS_VERIFY | ||
value: "1" | ||
- name: DOCKER_CERT_PATH | ||
value: /certs/client | ||
volumeMounts: | ||
- mountPath: /certs/client | ||
name: dind-certs | ||
script: | | ||
#!/bin/bash | ||
set -e | ||
/katanomi/bin/ktn-settings copy docker --always-match=true ~/.docker/config.json | ||
cd e2e | ||
source ./tools.sh | ||
perpare | ||
docker run --rm --net=host -v $(pwd):/workspace -v ~/.docker/:/root/.docker/ --privileged --entrypoint /workspace/test.sh $(params.tools-image) | ||
workspaces: | ||
- name: source | ||
workspace: source |
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,7 @@ | ||
# buildkit 变更记录 | ||
|
||
官方地址:[buildkit](https://github.com/moby/buildkit/tree/v0.13.1) | ||
|
||
- 自动识别 http/https 仓库,默认使用insecure client请求。 | ||
- [DEVOPS-19463](https://jira.alauda.cn/browse/DEVOPS-19463) pull http仓库失败问题 | ||
- [DEVOPS-19601](https://jira.alauda.cn/browse/DEVOPS-19601) 连接自签名https仓库拉取失败问题 |
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
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 @@ | ||
v0.13.1 |
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,26 @@ | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: buildkit | ||
title: buildkit | ||
description: Buildkit 是一个高效的构建镜像的工具,该镜像基于官方版本做了若干参数的调整定制。 | ||
annotations: | ||
# gitlab plugin | ||
gitlab.com/project-slug: devops/builder-buildkit | ||
gitlab.com/instance: gitlab-ce.alauda.cn | ||
# acp cicd plugin | ||
acp.cpaas.io/ci-pipeline: devops/business-build/tools/builder-buildkit | ||
acp.cpaas.io/instance: edge.alauda.cn | ||
# harbor plugin | ||
goharbor.io/repository-slug: devops/buildkit | ||
# sonarqube plugin | ||
sonarqube.org/project-key: "" | ||
# backstage techdocs plugin | ||
backstage.io/techdocs-ref: dir:./buildkit-v0.10.4 | ||
acp.cpaas.io/owner: [email protected] | ||
|
||
spec: | ||
type: tools | ||
system: system:katanomi-system | ||
lifecycle: production | ||
owner: devops |
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,7 @@ | ||
ARG FROM_IMAGE=registry.alauda.cn:60080 | ||
|
||
FROM ${FROM_IMAGE}/ops/alpine:3 | ||
COPY Dockerfile . | ||
|
||
|
||
|
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,29 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIE7DCCAtQCCQCRFDmZ5nbJSTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQGEwJj | ||
cTELMAkGA1UECAwCY3ExCzAJBgNVBAcMAmNxMQ8wDQYDVQQKDAZhbGF1ZGEwHhcN | ||
MjQwNDA4MDcxNDI1WhcNMjUwNDA4MDcxNDI1WjA4MQswCQYDVQQGEwJjcTELMAkG | ||
A1UECAwCY3ExCzAJBgNVBAcMAmNxMQ8wDQYDVQQKDAZhbGF1ZGEwggIiMA0GCSqG | ||
SIb3DQEBAQUAA4ICDwAwggIKAoICAQC98eorsKlIURK8CD/kRrq1XZfvMdeY9V/5 | ||
oki8gUUJMvIZe3vTG7qFgr1He+tGxl0PK7M1/QrVVTGxovO+98kd5U7TE5w74OAo | ||
2jNBhRZ/cPUEQjKy4wbM0EyTAqtAuDkr2MKXToZQ3P2kSEo8p3lhsArlYXkRrWS3 | ||
d3hQKpcej9NLK9FQerAdyRMzjVdl6VhZ5erjU+xBO/VI5PEyrFVF3RoRGmRwy8Bn | ||
WgUEPSl5IMCg6yZhg0YSoioi0OSXAIaj77CAm1UD7Yn18r4vl/eI2mi5dYYuNzqt | ||
Wo9p3NubwD/ZcG3MtewviUNJdTsjl/SwQJTGUjUizYyN7XosyhlCgFFUukFCsVGr | ||
Vc0M7TU4Ov+jAyKILRNscwJC+38aCS4OivVj4zLsDFiFREUJei4IuxWKZhupM2a9 | ||
BenSuk6RITOE5siml5mAt9NSPADBLHAzDu/vrTudzmvUTDVA524xTjMzfTPC9PdD | ||
/WSbhl9MOIGCW7S4RMdU63xUHcS2aUviRttjSrIHQB0/pQURKOI9ZfYGhHWiFtjE | ||
ErwpCm/VTsEHRuJ5pULS4bnoUF2dfl3hg21tPhtKrLqtbKSR3SS2e1gFAkb6Wl4z | ||
SRBPT/wyFmXGrlhQhl9t9bU634MorkPgE6eFvAz+TPVY+BC0Khs+7k4aahSuN+5z | ||
ZXHzWbOToQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQA3b6BSiaSMpz+iNEYstg3E | ||
rDgrYmFZ/Td+58A89B/e9WUv9albnKZyf3RtYF0O/HuJ3gIfq7DBvV4aLMwsNfP7 | ||
m5loF2ZWYEAc5/EZ+ZS/jm+Y0xPdCUWj90AoH9aZhSlpxrY+1mwokzUd7pR4qulC | ||
UfYcQ1Q+Rhst0VaMdwM0uq2BCxShcE5scYCfjbFMKAFoFlaGOiyKUYKIxe42ND/G | ||
UD3Kh48Um/feKsx0y7MfN/dvl9Qvr0rUPjM5ZPKmy3CQvjAxUAmUvYO+HgYGYRo7 | ||
PqSr7DAfdIbN5PZfkyQFhUvy5PONqQs28g/Ad1qinduMnOYK6nQhsqk4SSEf2bbK | ||
R3AQ5WH+EOl3Irbai71oC/WZ0x4EgqHZN9SL/RGpy4aFOKqpBzhChqro6xxOoAu8 | ||
Rh9ezL8hAR0/lhhSfu/XfSjVuN08hzZTDfbuvCCt55v8l/O2cfRrMccgC2mzrLnH | ||
WkD8fwvkX7lKCRVk8zGNlNrAKuwK+8+bO3B97AxjBA7Nv+mm6HYKk3mf6fpQMFAk | ||
IlpR/GbUB6bHMOynhC3xZ3nevJVhyPzHxY7ENR7M0P9c+UDy7MJdIFtVAgRqFXdn | ||
O4g8MYFaz0luiOWpITI6jlNEXvV92sdUX/Zzc3Q1ljqARPoRwFykXI71gPrhOli0 | ||
rd8FH4ceNfAsbJO6IBPkaQ== | ||
-----END CERTIFICATE----- |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
漏洞修复