Skip to content

Commit

Permalink
chore: build redis image for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjingfm committed Jan 22, 2025
1 parent a4dc372 commit bab2dfd
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions .build/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
- name: run_sonar
type: string
description: |
Controls whether to run a sonar scan.
Controls whether to run a sonar scan.
The sonar of the open source component does not need to run frequently, and the sonar service may cause pipeline failure due to too many scanning tasks, which is a huge cost for building a harbor image, so the sonar scan is turned off by default, and the switch control is added, and it is turned on only when necessary.
tasks:
- name: readme-please
Expand Down Expand Up @@ -139,14 +139,14 @@ spec:
- name: command
value: |
set -ex
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.12.0-$(build.git.lastCommit.shortID)-amd64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
REGISTRY_SRC_TAG=v2.8.3
# compile harbor
BUILDPATH="$(workspaces.source.path)" make compile
- name: compile-amd64-thirdparty
Expand All @@ -164,15 +164,15 @@ spec:
- name: command
value: |
set -ex
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.12.0-$(build.git.lastCommit.shortID)-amd64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
REGISTRY_SRC=https://github.com/distribution/distribution.git
REGISTRY_SRC=https://github.com/distribution/distribution.git
REGISTRY_SRC_TAG=v2.8.3
# compile registry
cd ${BUILDPATH}/make/photon/registry && ./builder ${REGISTRY_SRC_TAG} ${REGISTRY_SRC} && cd -
Expand All @@ -196,14 +196,14 @@ spec:
- name: command
value: |
set -ex
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.12.0-$(build.git.lastCommit.shortID)-arm64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
REGISTRY_SRC_TAG=v2.8.3
# compile harbor
BUILDPATH="$(workspaces.source.path)" make compile
- name: compile-arm64-thirdparty
Expand All @@ -221,15 +221,15 @@ spec:
- name: command
value: |
set -ex
BUILDPATH=$(workspaces.source.path)
VERSIONTAG=2.12.0-$(build.git.lastCommit.shortID)-arm64
BASEIMAGETAG=${VERSIONTAG}
BASEIMAGENAMESPACE=build-harbor.alauda.cn/devops
IMAGENAMESPACE=build-harbor.alauda.cn/devops
REGISTRY_SRC=https://github.com/distribution/distribution.git
REGISTRY_SRC=https://github.com/distribution/distribution.git
REGISTRY_SRC_TAG=v2.8.3
# compile registry
cd ${BUILDPATH}/make/photon/registry && ./builder ${REGISTRY_SRC_TAG} ${REGISTRY_SRC} && cd -
Expand Down Expand Up @@ -257,6 +257,7 @@ spec:
params:
- name: command
value:
- make build -e BUILDTARGET=_build_redis
- make build -e BUILDTARGET=_build_portal
- make build -e BUILDTARGET=_build_core
- make build -e BUILDTARGET=_build_jobservice
Expand All @@ -272,7 +273,7 @@ spec:
set -ex
# some build target need wget
apt-get update && apt-get install -y wget
export VERSIONTAG=2.12.0-$(build.git.lastCommit.shortID)-amd64
export IMAGENAMESPACE=build-harbor.alauda.cn/devops
export BASEIMAGETAG=2.12.0-$(build.git.lastCommit.shortID)-amd64
Expand Down Expand Up @@ -300,6 +301,7 @@ spec:
params:
- name: command
value:
- make build -e BUILDTARGET=_build_redis
- make build -e BUILDTARGET=_build_portal
- make build -e BUILDTARGET=_build_core
- make build -e BUILDTARGET=_build_jobservice
Expand All @@ -315,7 +317,7 @@ spec:
set -ex
# some build target need wget
apt-get update && apt-get install -y wget
export VERSIONTAG=2.12.0-$(build.git.lastCommit.shortID)-arm64
export IMAGENAMESPACE=build-harbor.alauda.cn/devops
export BASEIMAGETAG=2.12.0-$(build.git.lastCommit.shortID)-arm64
Expand Down Expand Up @@ -346,6 +348,7 @@ spec:
params:
- name: container-images
value:
- build-harbor.alauda.cn/devops/goharbor-harbor-redis:2.12.0-$(build.git.lastCommit.shortID)
- build-harbor.alauda.cn/devops/goharbor-harbor-portal:2.12.0-$(build.git.lastCommit.shortID)
- build-harbor.alauda.cn/devops/goharbor-harbor-registryctl:2.12.0-$(build.git.lastCommit.shortID)
- build-harbor.alauda.cn/devops/goharbor-registry-photon:2.12.0-$(build.git.lastCommit.shortID)
Expand All @@ -356,6 +359,8 @@ spec:
- build-harbor.alauda.cn/devops/goharbor-harbor-exporter:2.12.0-$(build.git.lastCommit.shortID)
- name: source-image-digests
value:
- build-harbor.alauda.cn/devops/goharbor-harbor-redis:2.12.0-$(build.git.lastCommit.shortID)-amd64
- build-harbor.alauda.cn/devops/goharbor-harbor-redis:2.12.0-$(build.git.lastCommit.shortID)-arm64
- build-harbor.alauda.cn/devops/goharbor-harbor-portal:2.12.0-$(build.git.lastCommit.shortID)-amd64
- build-harbor.alauda.cn/devops/goharbor-harbor-portal:2.12.0-$(build.git.lastCommit.shortID)-arm64
- build-harbor.alauda.cn/devops/goharbor-harbor-registryctl:2.12.0-$(build.git.lastCommit.shortID)-amd64
Expand Down Expand Up @@ -411,4 +416,4 @@ spec:
- vulnerability.ignore-unfixed=true
- vulnerability.type[0]=os
- db.skip-update=false
- db.repository=build-harbor.alauda.cn/ops/aquasecurity/trivy-db
- db.repository=build-harbor.alauda.cn/ops/aquasecurity/trivy-db

0 comments on commit bab2dfd

Please sign in to comment.