-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathdeps-config.yml
86 lines (80 loc) · 2.46 KB
/
deps-config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1
parameters:
GHA_Actor:
type: string
default: ""
GHA_Action:
type: string
default: ""
GHA_Event:
type: string
default: ""
GHA_Meta:
type: string
default: ""
DEPS_Tag:
type: string
default: ""
executors:
linux_x64_executor: # declares a reusable executor
docker:
- image: secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-ci:0.6
resource_class: 2xlarge
shell: /bin/bash --login -eo pipefail
linux_aarch64_executor:
docker:
- image: secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-ci:0.6
resource_class: arm.2xlarge
shell: /bin/bash --login -eo pipefail
commands:
build_kuscia_deps:
steps:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: "make build"
command: |
git config --global --add safe.directory ./
make deps-build
- store_artifacts:
path: build
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/configuration-reference/#jobs
jobs:
linux_build_kuscia_deps:
parameters:
executor:
type: string
executor: <<parameters.executor>>
steps:
- checkout
- build_kuscia_deps
image_publish:
docker:
- image: cimg/deploy:2023.06.1
shell: /bin/bash --login -eo pipefail
steps:
- attach_workspace:
at: build
- checkout
- setup_remote_docker
- run:
name: Build image and publish
command: |
DEPS_IMAGE=secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-deps:<< pipeline.parameters.DEPS_Tag >>
# login kuscia aliyun registry
docker login -u ${ALIYUN_DOCKER_USERNAME} -p ${ALIYUN_DOCKER_PASSWORD} secretflow-registry.cn-hangzhou.cr.aliyuncs.com
docker buildx create --name kuscia_deps --platform linux/arm64,linux/amd64 --use
docker buildx build -t ${DEPS_IMAGE}:${CIRCLETAG} --platform linux/arm64,linux/amd64 -f ./build/dockerfile/base/kuscia-deps.Dockerfile . --push
workflows:
build_deps_workflow:
jobs:
- linux_build_kuscia_deps:
matrix:
parameters:
executor: [ "linux_x64_executor", "linux_aarch64_executor" ]
- image_publish:
requires:
- linux_build_kuscia_deps