From: Kefu Chai Date: Fri, 3 Sep 2021 23:08:46 +0000 (+0800) Subject: scripts/build_utils: remove create_build_status() X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c8951d3fb929dedf6d0cd793182d473d697d4b42;p=ceph-build.git scripts/build_utils: remove create_build_status() it's identical to update_build_status(), apart from that it is only used for creating the build status. but from the semantic point of view, create is also an "update", IMHO. so consolidating them sounds like a good move. Signed-off-by: Kefu Chai --- diff --git a/ceph-build/build/setup_deb b/ceph-build/build/setup_deb index e91ed75c..41788229 100644 --- a/ceph-build/build/setup_deb +++ b/ceph-build/build/setup_deb @@ -53,7 +53,7 @@ NORMAL_DISTRO_VERSION=$DIST NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH pkgs=( "chacractl>=0.0.21" ) TEMPVENV=$(create_venv_dir) diff --git a/ceph-build/build/setup_rpm b/ceph-build/build/setup_rpm index 4a8d91b3..e507a7ee 100644 --- a/ceph-build/build/setup_rpm +++ b/ceph-build/build/setup_rpm @@ -43,7 +43,7 @@ NORMAL_DISTRO_VERSION=$RELEASE NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH pkgs=( "chacractl>=0.0.21" ) TEMPVENV=$(create_venv_dir) diff --git a/ceph-dev-build/build/setup_deb b/ceph-dev-build/build/setup_deb index 5d2481c1..a2a4dc1b 100644 --- a/ceph-dev-build/build/setup_deb +++ b/ceph-dev-build/build/setup_deb @@ -53,7 +53,7 @@ NORMAL_DISTRO_VERSION=$DIST NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH pkgs=( "chacractl>=0.0.21" ) TEMPVENV=$(create_venv_dir) diff --git a/ceph-dev-build/build/setup_osc b/ceph-dev-build/build/setup_osc index 1e350ed7..10714cf3 100644 --- a/ceph-dev-build/build/setup_osc +++ b/ceph-dev-build/build/setup_osc @@ -75,7 +75,7 @@ NORMAL_DISTRO_VERSION=$RELEASE NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH pkgs=( "chacractl>=0.0.21" ) TEMPVENV=$(create_venv_dir) diff --git a/ceph-dev-build/build/setup_rpm b/ceph-dev-build/build/setup_rpm index 74f4e365..11016cd3 100644 --- a/ceph-dev-build/build/setup_rpm +++ b/ceph-dev-build/build/setup_rpm @@ -45,7 +45,7 @@ NORMAL_DISTRO_VERSION=$RELEASE NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH pkgs=( "chacractl>=0.0.21" ) TEMPVENV=$(create_venv_dir) diff --git a/ceph-dev-cron/build/notify b/ceph-dev-cron/build/notify index cb1ed771..27fa3cd8 100644 --- a/ceph-dev-cron/build/notify +++ b/ceph-dev-cron/build/notify @@ -6,4 +6,4 @@ BRANCH=`branch_slash_filter ${GIT_BRANCH}` SHA1=${GIT_COMMIT} -create_build_status "queued" "ceph" +update_build_status "queued" "ceph" diff --git a/ceph-dev-new-build/build/setup_deb b/ceph-dev-new-build/build/setup_deb index 5d2481c1..a2a4dc1b 100644 --- a/ceph-dev-new-build/build/setup_deb +++ b/ceph-dev-new-build/build/setup_deb @@ -53,7 +53,7 @@ NORMAL_DISTRO_VERSION=$DIST NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH pkgs=( "chacractl>=0.0.21" ) TEMPVENV=$(create_venv_dir) diff --git a/ceph-dev-new-build/build/setup_mingw b/ceph-dev-new-build/build/setup_mingw index 27507c6a..0b944127 100644 --- a/ceph-dev-new-build/build/setup_mingw +++ b/ceph-dev-new-build/build/setup_mingw @@ -42,7 +42,7 @@ NORMAL_DISTRO_VERSION="1809" NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH pkgs=( "chacractl>=0.0.21" ) TEMPVENV=$(create_venv_dir) diff --git a/ceph-dev-new-build/build/setup_rpm b/ceph-dev-new-build/build/setup_rpm index 776f52f4..f7f57d48 100644 --- a/ceph-dev-new-build/build/setup_rpm +++ b/ceph-dev-new-build/build/setup_rpm @@ -43,7 +43,7 @@ NORMAL_DISTRO_VERSION=$RELEASE NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH pkgs=( "chacractl>=0.0.21" ) TEMPVENV=$(create_venv_dir) diff --git a/ceph-dev-new-trigger/build/notify b/ceph-dev-new-trigger/build/notify index 39411b7a..73699554 100644 --- a/ceph-dev-new-trigger/build/notify +++ b/ceph-dev-new-trigger/build/notify @@ -6,5 +6,5 @@ BRANCH=`branch_slash_filter ${GIT_BRANCH}` SHA1=${GIT_COMMIT} -create_build_status "queued" "ceph" +update_build_status "queued" "ceph" diff --git a/ceph-dev-trigger/build/notify b/ceph-dev-trigger/build/notify index cb1ed771..27fa3cd8 100644 --- a/ceph-dev-trigger/build/notify +++ b/ceph-dev-trigger/build/notify @@ -6,4 +6,4 @@ BRANCH=`branch_slash_filter ${GIT_BRANCH}` SHA1=${GIT_COMMIT} -create_build_status "queued" "ceph" +update_build_status "queued" "ceph" diff --git a/kernel/build/setup b/kernel/build/setup index e698f596..a8ede06f 100644 --- a/kernel/build/setup +++ b/kernel/build/setup @@ -89,4 +89,4 @@ git clean -fxd export SHA1="${GIT_COMMIT}" # create build status in shaman -create_build_status "started" "kernel" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $ARCH +update_build_status "started" "kernel" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $ARCH diff --git a/nfs-ganesha-stable/build/build_deb b/nfs-ganesha-stable/build/build_deb index 4bda8cc5..a3239fbd 100644 --- a/nfs-ganesha-stable/build/build_deb +++ b/nfs-ganesha-stable/build/build_deb @@ -102,7 +102,7 @@ NORMAL_DISTRO_VERSION=$DIST NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "nfs-ganesha-stable" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "nfs-ganesha-stable" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH cd $WORKSPACE/nfs-ganesha-debian git checkout ${NFS_GANESHA_DEBIAN_BRANCH} diff --git a/nfs-ganesha-stable/build/build_rpm b/nfs-ganesha-stable/build/build_rpm index 4a02ef8c..3fd82cbd 100644 --- a/nfs-ganesha-stable/build/build_rpm +++ b/nfs-ganesha-stable/build/build_rpm @@ -77,7 +77,7 @@ NORMAL_DISTRO_VERSION=$RELEASE NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "nfs-ganesha-stable" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "nfs-ganesha-stable" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH cd $WORKSPACE/nfs-ganesha diff --git a/nfs-ganesha/build/build_deb b/nfs-ganesha/build/build_deb index 511b8aea..2b2166dd 100644 --- a/nfs-ganesha/build/build_deb +++ b/nfs-ganesha/build/build_deb @@ -38,7 +38,7 @@ NORMAL_DISTRO_VERSION=$DIST NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "nfs-ganesha" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "nfs-ganesha" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH ## Setup the pbuilder setup_pbuilder use_gcc diff --git a/nfs-ganesha/build/build_rpm b/nfs-ganesha/build/build_rpm index 71d2b3d9..cd1ae371 100644 --- a/nfs-ganesha/build/build_rpm +++ b/nfs-ganesha/build/build_rpm @@ -88,7 +88,7 @@ NORMAL_DISTRO_VERSION=$RELEASE NORMAL_ARCH=$ARCH # create build status in shaman -create_build_status "started" "nfs-ganesha" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH +update_build_status "started" "nfs-ganesha" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH cd $WORKSPACE/nfs-ganesha diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index cb086a45..c09519db 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -363,26 +363,8 @@ EOF update_build_status() { - # A proxy script to PUT (update) the status of a build in shaman - # 'state' can be either of: 'started', 'completed', or 'failed' - # 'project' is used to post to the right url in shaman - - # required - state=$1 - project=$2 - - # optional - distro=$3 - distro_version=$4 - distro_arch=$5 - - submit_build_status "POST" $state $project $distro $distro_version $distro_arch -} - - -create_build_status() { - # A proxy script to POST (create) the status of a build in shaman for - # a normal/initial build + # A proxy script to PUT (create or update) the status of a build + # in shaman for a normal/initial build # 'state' can be either of: 'started', 'completed', or 'failed' # 'project' is used to post to the right url in shaman