forked from secretflow/kuscia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
273 additions
and
96 deletions.
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
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,98 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/configuration-reference | ||
version: 2.1 | ||
|
||
parameters: | ||
DEPS_Tag: | ||
type: string | ||
default: "" | ||
|
||
executors: | ||
linux_x64_executor: # declares a reusable executor | ||
docker: | ||
- image: secretflow/kuscia-ci:0.4 | ||
resource_class: 2xlarge | ||
shell: /bin/bash --login -eo pipefail | ||
linux_aarch64_executor: | ||
docker: | ||
- image: secretflow/ubuntu-base-ci:latest | ||
resource_class: arm.2xlarge | ||
shell: /bin/bash --login -eo pipefail | ||
|
||
commands: | ||
build_kuscia_deps: | ||
steps: | ||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
- run: | ||
name: "install go" | ||
command: | | ||
ARCH=$(uname -m) | ||
case "$ARCH" in | ||
x86_64) ARCH="amd64";; | ||
aarch64) ARCH="arm64";; | ||
*) echo "Unsupported architecture"; exit 1;; | ||
esac | ||
GOLANG_DIR="/opt" | ||
GOLANG_VERSION="1.22.2" | ||
GOLANG_URL="https://golang.org/dl/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz" | ||
if ! command -v go &> /dev/null; then | ||
wget "$GOLANG_URL" | ||
tar -C "$GOLANG_DIR" -xzf "go${GOLANG_VERSION}.linux-${ARCH}.tar.gz" | ||
echo 'export PATH=$PATH:/opt/go/bin' | tee -a ~/.bashrc | ||
echo 'export PATH=$PATH:/opt/go/bin' >> $BASH_ENV | ||
source ~/.bashrc | ||
fi | ||
- 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: secretflow/kuscia-ci:0.4 | ||
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 |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/.idea/ | ||
/build/apps/ | ||
/build/k3s/ | ||
/build/linux/ | ||
/etc/certs/ | ||
**.log | ||
.vscode | ||
|
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
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
File renamed without changes.
Binary file not shown.
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
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
Oops, something went wrong.