Skip to content

Commit

Permalink
[ci] Adapt the latest code catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
jackblack369 authored and chuandew committed Jan 9, 2025
1 parent e5610df commit a131f01
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ jobs:
run: make file_dep

- name: Build dingofs
run: make file_build only=//dingofs/src/* release=1
run: make file_build only=//src/* release=1

- name: Install dingofs
run: |
make file_deploy_config
- name: Archive the dingofs directory
run: |
tar -czvf dingofs.tar.gz -C dingofs/docker/rocky9 dingofs
tar -czvf dingofs.tar.gz -C docker/rocky9 dingofs
- name: Copy artifactory to another workflow
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

- name: Extract artifact
if: steps.check-event.outputs.continue == 'true'
run: tar -xzvf dingofs.tar.gz -C dingofs/docker/rocky9
run: tar -xzvf dingofs.tar.gz -C docker/rocky9

- name: Set up Docker Buildx
if: steps.check-event.outputs.continue == 'true'
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
if: steps.check-event.outputs.continue == 'true'
uses: docker/build-push-action@v6
with:
context: ./dingofs/docker/rocky9
file: ./dingofs/docker/rocky9/Dockerfile
context: ./docker/rocky9
file: ./docker/rocky9/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@ test/client/configs/*
# thirdparties
thirdparties/etcdclient/tmp/
thirdparties/etcdclient/*.h

build
docker/rocky9/dingofs
15 changes: 0 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,18 @@ help:
list:
@bash build-scripts/build.sh --stor=fs --list

build:
@bash build-scripts/build.sh --stor=fs --only=$(only) --dep=$(dep) --release=$(release) --ci=$(ci) --os=$(os)

file_build:
@bash build-scripts/file-build.sh --only=$(only) --dep=$(dep) --release=$(release) --os=$(os)

dep:
@bash build-scripts/build.sh --stor=fs --only="" --dep=1

file_dep:
@bash build-scripts/file-build.sh --only="" --dep=1

install:
@bash build-scripts/install.sh --stor=fs --prefix=$(prefix) --only=$(only)

file_install:
@bash build-scripts/file-install.sh --prefix=$(prefix) --only=$(only)

install_and_config:
@bash build-scripts/install_and_config.sh fs $(os)

file_deploy_config:
@bash build-scripts/file-deploy-config.sh $(os)

image:
@bash build-scripts/image.sh $(tag) $(os)

file_image:
@bash build-scripts/file-deploy-config.sh $(os) $(tag) ${build-image}

Expand Down
15 changes: 1 addition & 14 deletions build-scripts/file-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,7 @@ build_target() {
else
die "build dingofs failed\n"
fi

# build tools-v2
# g_toolsv2_root="tools-v2"
# if [ $g_release -eq 1 ]
# then
# (cd ${g_toolsv2_root} && make build version=${dingofs_version})
# else
# (cd ${g_toolsv2_root} && make debug version=${dingofs_version})
# fi
# if [ $? -eq 0 ]; then
# success "build tools-v2 success\n"
# else
# die "build tools-v2 failed\n"
# fi

}


Expand Down
6 changes: 3 additions & 3 deletions build-scripts/file-deploy-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ install_pkg() {
}

############################ MAIN()
docker_prefix="$(pwd)/dingofs/docker/$1"
prefix="$docker_prefix/dingofs" # /path/to/project/dingofs/docker/rocky9/dingofs
docker_prefix="$(pwd)/docker/$1"
prefix="$docker_prefix/dingofs" # /path/to/dingofs/docker/rocky9/dingofs
mkdir -p $prefix $prefix/conf
install_pkg $prefix
install_pkg $prefix etcd
install_pkg $prefix monitor

paths=`ls dingofs/conf/*`
paths=`ls conf/*`
# paths="$paths tools-v2/pkg/config/dingo.yaml"
for path in $paths;
do
Expand Down
10 changes: 3 additions & 7 deletions build-scripts/file-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ get_options() {
do
case "$1" in
-p|--prefix)
g_prefix=$2 # /path/to/project/dingofs/docker/rocky9/dingofs
g_prefix=$2 # /path/to/dingofs/docker/rocky9/dingofs
shift 2
;;
-o|--only)
Expand Down Expand Up @@ -249,11 +249,7 @@ install_monitor() {
g_project_name=$project_name

local project_prefix="$g_prefix/monitor"
if [ "$g_stor" == "bs" ]; then
local dst="monitor"
else
local dst="dingofs/monitor"
fi
local dst="monitor"
copy_file $dst $g_prefix
success "install $project_name success\n"
}
Expand All @@ -268,7 +264,7 @@ install_tools-v2() {
wget -O "$project_prefix/sbin/daemon" $tools_v2_daemo_file
chmod +x "$project_prefix/sbin/dingo"
chmod +x "$project_prefix/sbin/daemon"
copy_file "$project_name/conf/dingo.yaml" "$g_prefix/conf"
copy_file "conf/dingo.yaml" "$g_prefix/conf"
}

main() {
Expand Down

0 comments on commit a131f01

Please sign in to comment.