From: Frank Brehm Date: Wed, 13 Jul 2022 08:12:10 +0000 (+0200) Subject: Fixing deploy job in .gitlab-ci.yml X-Git-Tag: 0.4.3^2~1 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=a296d0f045c66d7666832ee2fa6db079d1d8d89c;p=pixelpark%2Fpp-admin-tools.git Fixing deploy job in .gitlab-ci.yml --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5c9425..e6932ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -398,10 +398,18 @@ Sign EL 8 packages: fi script: - echo "Packages to deploy:"; find rpmdir/*RPMS -type f -print0 | xargs --null --no-run-if-empty ls -l -d --color=always - - scp -p -o StrictHostKeyChecking=no rpmdir/SRPMS/*.rpm "${YUM_REPO_USER}@${YUM_REPO_HOST}:${YUM_REPO_DIR}/src/" - - ssh -o StrictHostKeyChecking=no "${YUM_REPO_USER}@${YUM_REPO_HOST}" "cd ${YUM_REPO_DIR}/src/ && createrepo --update . && chmod -v a+x repodata && chmod -Rv a+r repodata" - - scp -p -o StrictHostKeyChecking=no rpmdir/RPMS/*/*.rpm "${YUM_REPO_USER}@${YUM_REPO_HOST}:${YUM_REPO_DIR}/${EL_MAJOR_VERSION}/" - - ssh -o StrictHostKeyChecking=no "${YUM_REPO_USER}@${YUM_REPO_HOST}" "cd ${YUM_REPO_DIR}/${EL_MAJOR_VERSION}/ && createrepo --update . && chmod -v a+x repodata && chmod -Rv a+r repodata" + - | + src_repo_dir="${YUM_REPO_DIR}/${EL_MAJOR_VERSION}-src" + echo "Deploying source packages to ${YUM_REPO_HOST}:${src_repo_dir}/ ..." + ssh -o StrictHostKeyChecking=no "${YUM_REPO_USER}@${YUM_REPO_HOST}" "if [ ! test -d ${src_repo_dir} ] ; then mkdir -pv ${src_repo_dir} ; fi" + scp -p -o StrictHostKeyChecking=no rpmdir/SRPMS/*.rpm "${YUM_REPO_USER}@${YUM_REPO_HOST}:${src_repo_dir}/" + ssh -o StrictHostKeyChecking=no "${YUM_REPO_USER}@${YUM_REPO_HOST}" "cd ${src_repo_dir}/ && createrepo --update . && chmod -v a+x repodata && chmod -Rv a+r repodata" + - | + bin_repo_dir="${YUM_REPO_DIR}/${EL_MAJOR_VERSION}" + echo "Deploying binary packages to ${YUM_REPO_HOST}:${bin_repo_dir}/ ..." + ssh -o StrictHostKeyChecking=no "${YUM_REPO_USER}@${YUM_REPO_HOST}" "if [ ! test -d ${bin_repo_dir} ] ; then mkdir -pv ${bin_repo_dir} ; fi" + scp -p -o StrictHostKeyChecking=no rpmdir/RPMS/*/*.rpm "${YUM_REPO_USER}@${YUM_REPO_HOST}:${bin_repo_dir}/" + ssh -o StrictHostKeyChecking=no "${YUM_REPO_USER}@${YUM_REPO_HOST}" "cd ${bin_repo_dir}/ && createrepo --update . && chmod -v a+x repodata && chmod -Rv a+r repodata" after_script: - rm -rf rpmdir environment: @@ -442,6 +450,10 @@ Deploy packages EL8: # - 'Deploy packages EL7' # - 'Deploy packages EL8' +################################### +# CAUTION! +# Notification via E-Mail is currently not possible on current runners + # # --------------------------- # Notify Success: # stage: notify