Skip to content
Snippets Groups Projects
Commit fef60e07 authored by Mihai Patrascoiu's avatar Mihai Patrascoiu
Browse files

CI: Remove the "publish-production" publish job. This has been moved to the...

CI: Remove the "publish-production" publish job. This has been moved to the "fts/build-utils" repository
parent 044d4675
No related branches found
No related tags found
No related merge requests found
Pipeline #4285772 passed
......@@ -96,20 +96,3 @@ testing-rpms:
rules:
- if: '$CI_COMMIT_REF_NAME != "develop" && $CI_COMMIT_TAG == null'
when: manual
publish-production:
stage: publish
image: gitlab-registry.cern.ch/eos/gitlab-eos/cc7:latest
script:
- yum install -y python sssd-client sudo createrepo
- automount
- cat "$repo_passwd" | kinit "$repo_user"
- eosfusebind
- packaging/syncrepo --base-origin /eos/project/d/dmc/www/repos/rc --base-dest /eos/project/d/dmc/www/repos/ '*.rpm'
- sleep 60
tags:
- docker-privileged
retry: 2
rules:
- if: $CI_COMMIT_TAG != null
when: manual
#!/bin/bash
set -e
function die()
{
echo "$1"
exit 1
}
# Defaults
ORIGIN=
DESTINATION=
PATTERN=
# Read options
while [ -n "$1" ]; do
case "$1" in
--base-origin)
shift
ORIGIN="$1"
;;
--base-dest)
shift
DESTINATION="$1"
;;
*)
PATTERN=$1
;;
esac
shift
done
if [ -z "${ORIGIN}" ]; then
die "Missing origin"
fi
if [ -z "${DESTINATION}" ]; then
die "Missing destination"
fi
if [ -z "${PATTERN}" ]; then
die "Missing pattern"
fi
echo "* Origin: ${ORIGIN}"
echo "* Destination: ${DESTINATION}"
echo "* Pattern: ${PATTERN}"
# Find out nested repositories
REPOSITORIES=""
repodatas=`find ${ORIGIN}/el* -name "repodata"`
for repodata in ${repodatas}; do
repo=`dirname "${repodata}"`
echo "Found repository ${repo}"
REPOSITORIES="${REPOSITORIES} ${repo}"
done
# Sync them
for src_repo in ${REPOSITORIES}; do
subpath=${src_repo/${ORIGIN}/}
dst_repo="$DESTINATION/${subpath}"
echo "* Sync ${src_repo} => ${dst_repo}"
mkdir -p "${dst_repo}"
for pattern in $PATTERN; do
check=$(find "${src_repo}" -maxdepth 1 -name "${pattern}")
if [ -n "$check" ]; then
cp --no-clobber -v ${src_repo}/${pattern} ${dst_repo}
else
echo "No pattern match for ${src_repo}/${pattern}"
fi
done
echo "* Update repo ${dst_repo}"
createrepo "${dst_repo}"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment