Skip to content

Commit

Permalink
deploy packetfence-ci-lib package in a common location
Browse files Browse the repository at this point in the history
  • Loading branch information
nqb committed Nov 28, 2022
1 parent eadb254 commit 3779627
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ variables:
script:
- ./${UPLOAD_DIR}/deploy-artifacts.sh packetfence-release
- ./${UPLOAD_DIR}/deploy-artifacts.sh packetfence-export
- ./${UPLOAD_DIR}/deploy-artifacts.sh packetfence-ci-lib
tags:
- shell

Expand Down
17 changes: 17 additions & 0 deletions ci/lib/upload/deploy-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,22 @@ packetfence_export_deploy() {
done
}

packetfence_ci_lib_deploy() {
# Deb (only)
for release_name in $(ls $DEB_RESULT_DIR); do
src_dir="$DEB_RESULT_DIR/${release_name}"
dst_repo="$DEB_BASE_DIR/debian"
dst_dir="$DEPLOY_USER@$DEPLOY_HOST:$dst_repo"
pf_ci_lib_deb_file=$(basename $(ls $src_dir/packetfence-ci-lib*))
pf_ci_lib_deb_dest_name=${PF_CI_LIB_DEB_DEST_NAME:-"packetfence-ci-lib_${PF_MINOR_RELEASE}.deb"}
declare -p src_dir dst_dir pf_ci_lib_deb_file pf_ci_lib_deb_dest_name

echo "scp: ${src_dir}/${pf_ci_lib_deb_file} -> ${dst_dir}/${pf_ci_lib_deb_dest_name}"
scp "${src_dir}/${pf_ci_lib_deb_file}" "${dst_dir}/${pf_ci_lib_deb_dest_name}" \
|| die "scp failed"
done
}

ppa_deploy() {
# warning: slashs at end of dirs are significant for rsync
src_dir="$PUBLIC_DIR/"
Expand Down Expand Up @@ -185,6 +201,7 @@ case $1 in
deb) deb_deploy ;;
packetfence-release) packetfence_release_deploy ;;
packetfence-export) packetfence_export_deploy ;;
packetfence-ci-lib) packetfence_ci_lib_deploy ;;
ppa) ppa_deploy ;;
website) website_deploy ;;
*) die "Wrong argument"
Expand Down

0 comments on commit 3779627

Please sign in to comment.