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

remove deploy uid #62

Open
wants to merge 1 commit into
base: alauda/release-v0.32.x
Choose a base branch
from
Open
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
295 changes: 295 additions & 0 deletions .build/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
kind: Build
apiVersion: builds.katanomi.dev/v1alpha1
spec:
runTemplate:
spec:
workspaces:
- name: cache
persistentVolumeClaim:
claimName: build-cache
workspaces:
- name: source
- name: cache
tasks:
## read oss version
- name: oss-version
taskRef:
kind: ClusterTask
name: alauda-read-oss-version
params:
- name: version-file-path
value: ".build/opensource-version"
workspaces:
- name: source
workspace: source
- name: golang-test
taskRef:
kind: ClusterTask
name: go-unit-test
runAfter:
- oss-version
params:
- name: command
value: |
export GOPROXY=https://build-nexus.alauda.cn/repository/golang/,https://goproxy.cn,direct
export CGO_ENABLED=0
export GONOSUMDB=*
export GOMAXPROCS=8
go mod download

go test -v -json -coverprofile cover.out ./... | tee test.json

- name: quality-gate-rules
value:
- lines-coverage=10
- passed-tests-rate=100
- name: tool-image
value: registry.alauda.cn:60080/devops/builder-go:1.18-ubuntu-495a3d88
- name: test-report-path
value: ./test.json
- name: coverage-report-path
value: ./cover.out
workspaces:
- name: source
workspace: source
- name: cache
workspace: cache
## ko publish image
- name: build-entrypoint
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/entrypoint"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/entrypoint"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-git-init
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/git-init"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/git-init"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-pipeline-controller
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/controller"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/controller"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-pipeline-webhook
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/webhook"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/webhook"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-pipeline-imagedigestexporter
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/imagedigestexporter"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/imagedigestexporter"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-pipeline-kubeconfigwriter
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/kubeconfigwriter"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/kubeconfigwriter"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-pipeline-nop
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/nop"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/nop"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-pipeline-workingdirinit
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/workingdirinit"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/workingdirinit"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-pipeline-resolvers
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/resolvers"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/resolvers"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)
## ko publish image
- name: build-pipeline-pullrequest-init
taskRef:
kind: ClusterTask
name: alauda-ko-build
workspaces:
- name: source
workspace: source
runAfter:
- oss-version
params:
- name: verbose
value: "false"
- name: import-path
value: "github.com/tektoncd/pipeline/cmd/pullrequest-init"
- name: container-image
value: "build-harbor.alauda.cn/devops/tektoncd/pipeline/cmd/pullrequest-init"
- name: container-image-tag
value: v$(tasks.oss-version.results.oss-version)-$(tasks.oss-version.results.commit-short-id)

#################
# code-scan
#################
- name: code-scan
timeout: 30m
retries: 0
taskRef:
kind: ClusterTask
name: sonarqube-analysis
workspaces:
- name: source
workspace: source
params:
- name: server
value: https://build-sonar.alauda.cn

#################
# runTemplate
#################
runTemplate:
spec:
taskRunSpecs:
- pipelineTaskName: golang-test
stepOverrides:
- name: prepare
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 50m
memory: 50Mi
- name: test
resources:
requests:
cpu: "6"
memory: 4Gi
limits:
cpu: "8"
memory: 6Gi
- name: analysis
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 50m
memory: 50Mi
1 change: 1 addition & 0 deletions .build/opensource-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.32.0
3 changes: 0 additions & 3 deletions config/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ spec:
capabilities:
drop:
- all
# User 65532 is the distroless nonroot user ID
runAsUser: 65532
runAsGroup: 65532
ports:
- name: metrics
containerPort: 9090
Expand Down