Skip to content

Commit

Permalink
add new build.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: jtcheng <[email protected]>
  • Loading branch information
jtcheng committed Apr 11, 2024
1 parent ec992be commit fba4c93
Showing 1 changed file with 53 additions and 31 deletions.
84 changes: 53 additions & 31 deletions .build/build2.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apiVersion: builds.katanomi.dev/v1alpha1
kind: Build
spec:
git:
options:
depth: 1
runTemplate:
spec:
workspaces:
Expand Down Expand Up @@ -72,13 +75,17 @@ spec:
params:
- name: command
value: |
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
set -x
BUILDTARGET=_build_prepare make build
BUILDPATH=$(workspaces.source.path) \
make build \
-e VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e IMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e BASEIMAGETAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e PUSHBASEIMAGE=false \
-e DOCKERBUILD="docker buildx build --builder builder --push" \
-e BUILDTARGET=_build_prepare
- name: build-image-db
timeout: 2.5h
Expand All @@ -93,14 +100,17 @@ spec:
params:
- name: command
value: |
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
DOCKERBUILD=docker buildx build
set -x
BUILDTARGET=_build_db make build
BUILDPATH=$(workspaces.source.path) \
make build \
-e VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e IMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e BASEIMAGETAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e PUSHBASEIMAGE=false \
-e DOCKERBUILD="docker buildx build --builder builder --push" \
-e BUILDTARGET=_build_db
- name: build-image-portal
timeout: 2.5h
Expand All @@ -115,13 +125,17 @@ spec:
params:
- name: command
value: |
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
set -x
BUILDTARGET=_build_portal make build
BUILDPATH=$(workspaces.source.path) \
make build \
-e VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e IMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e BASEIMAGETAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e PUSHBASEIMAGE=false \
-e DOCKERBUILD="docker buildx build --builder builder --push" \
-e BUILDTARGET=_build_portal
- name: build-image-core
timeout: 2.5h
Expand All @@ -136,13 +150,17 @@ spec:
params:
- name: command
value: |
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
set -x
BUILDTARGET=_build_core make build
BUILDPATH=$(workspaces.source.path) \
make build \
-e VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e IMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e BASEIMAGETAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e PUSHBASEIMAGE=false \
-e DOCKERBUILD="docker buildx build --builder builder --push" \
-e BUILDTARGET=_build_core
- name: build-image-jobservice
timeout: 2.5h
Expand All @@ -157,10 +175,14 @@ spec:
params:
- name: command
value: |
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
set -x
BUILDTARGET=_build_jobservice make build
BUILDPATH=$(workspaces.source.path) \
make build \
-e VERSIONTAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e IMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e BASEIMAGETAG=2.6.4-$(build.git.lastCommit.shortID)-amd64 \
-e BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops \
-e PUSHBASEIMAGE=false \
-e DOCKERBUILD="docker buildx build --builder builder --push" \
-e BUILDTARGET=_build_jobservice

0 comments on commit fba4c93

Please sign in to comment.