Commit 377d84a5 authored by Elvin Sindrilaru's avatar Elvin Sindrilaru
Browse files

CI: Refactor the rpm publising

parent c3f7b632
Pipeline #2383714 failed with stages
in 29 minutes and 19 seconds
......@@ -3,7 +3,7 @@ stages:
- build
- publish
deps-cc7:
deps-el-7:
stage: deps
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
......@@ -18,7 +18,7 @@ deps-cc7:
paths:
- "$CI_JOB_NAME"
deps-c8:
deps-el-8:
stage: deps
image: gitlab-registry.cern.ch/linuxsupport/c8-base
script:
......@@ -33,7 +33,7 @@ deps-c8:
paths:
- "$CI_JOB_NAME"
deps-fedora-32:
deps-fc-32:
stage: deps
image: fedora:32
script:
......@@ -49,7 +49,7 @@ deps-fedora-32:
paths:
- "$CI_JOB_NAME"
deps-fedora-32-tsan:
deps-fc-32-tsan:
stage: deps
image: fedora:32
script:
......@@ -65,7 +65,7 @@ deps-fedora-32-tsan:
paths:
- "$CI_JOB_NAME"
deps-fedora-rawhide:
deps-fc-rawhide:
stage: deps
image: registry.fedoraproject.org/fedora:rawhide
script:
......@@ -81,11 +81,11 @@ deps-fedora-rawhide:
- "$CI_JOB_NAME"
allow_failure: true
cc7:
el-7:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
dependencies:
- deps-cc7
- deps-el-7
script:
- yum install -y rpmdevtools python-devel python-setuptools sudo tar yum-plugin-priorities yum-utils centos-release-scl
- yum install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
......@@ -98,11 +98,11 @@ cc7:
paths:
- "$CI_JOB_NAME"
c8:
el-8:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/c8-base
dependencies:
- deps-c8
- deps-el-8
script:
- dnf install -y rpmdevtools python3-devel python3-setuptools sudo tar yum-utils
- dnf install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
......@@ -115,11 +115,11 @@ c8:
paths:
- "$CI_JOB_NAME"
fedora-32:
fc-32:
stage: build
image: fedora:32
dependencies:
- deps-fedora-32
- deps-fc-32
script:
- dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
- yum install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
......@@ -133,11 +133,11 @@ fedora-32:
paths:
- "$CI_JOB_NAME"
fedora-32-tsan:
fc-32-tsan:
stage: build
image: fedora:32
dependencies:
- deps-fedora-32-tsan
- deps-fc-32-tsan
script:
- dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
- dnf install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
......@@ -151,11 +151,11 @@ fedora-32-tsan:
paths:
- "$CI_JOB_NAME"
fedora-rawhide:
fc-rawhide:
stage: build
image: registry.fedoraproject.org/fedora:rawhide
dependencies:
- deps-fedora-rawhide
- deps-fc-rawhide
script:
- dnf install --nogpg -y rpmdevtools python-devel python-setuptools sudo tar dnf-plugins-core
- dnf install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
......@@ -172,39 +172,22 @@ fedora-rawhide:
publish:
stage: publish
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
dependencies:
- deps-c8
- deps-fedora-32
- deps-fedora-32-tsan
- deps-fedora-rawhide
- c8
- fedora-32
- fedora-32-tsan
- fedora-rawhide
tags:
- docker_node
retry: 2
script:
- yum install -y tree sudo sssd-client createrepo
- sudo -u stci -s tree
- sudo -u stci -s ${PWD}/deploy-rpms.sh c8 el-8
- sudo -u stci -s ${PWD}/deploy-rpms.sh fedora-32 fc-32
- sudo -u stci -s ${PWD}/deploy-rpms.sh fedora-32-tsan fc-32-tsan
- sudo -u stci -s ${PWD}/deploy-rpms.sh fedora-rawhide fc-rawhide
publish-critical:
# Publish folly RPMs for critical production platforms.
# Manual only, think twice before running this!
when: manual
stage: publish
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
- sudo -u stci -H ./gitlab-ci/publish_rpms.sh
dependencies:
- deps-cc7
- cc7
- deps-el-7
- deps-el-8
- deps-fc-32
- deps-fc-32-tsan
- deps-fc-rawhide
- el-7
- el-8
- fc-32
- fc-32-tsan
- fc-rawhide
tags:
- docker_node
script:
- yum install -y tree sudo sssd-client createrepo
- sudo -u stci -s tree
- sudo -u stci -s ${PWD}/deploy-rpms.sh cc7 el-7
retry: 2
#!/usr/bin/env bash
set -ex
JOB_NAME="$1"
BUILD_TYPE="$2"
EOS_CODENAME="diopside"
mkdir -p /eos/project/s/storage-ci/www/eos/${EOS_CODENAME}-depend/${BUILD_TYPE}/x86_64/
mkdir -p /eos/project/s/storage-ci/www/eos/${EOS_CODENAME}-depend/${BUILD_TYPE}/SRPM/
cp -n "${JOB_NAME}"/RPMS/x86_64/* /eos/project/s/storage-ci/www/eos/${EOS_CODENAME}-depend/${BUILD_TYPE}/x86_64/
cp -n "${JOB_NAME}"/SRPMS/* /eos/project/s/storage-ci/www/eos/${EOS_CODENAME}-depend/${BUILD_TYPE}/SRPM/
cp -n "deps-${JOB_NAME}"/RPMS/x86_64/* /eos/project/s/storage-ci/www/eos/${EOS_CODENAME}-depend/${BUILD_TYPE}/x86_64/
cp -n "deps-${JOB_NAME}"/SRPMS/* /eos/project/s/storage-ci/www/eos/${EOS_CODENAME}-depend/${BUILD_TYPE}/SRPM/
createrepo -q /eos/project/s/storage-ci/www/eos/${EOS_CODENAME}-depend/${BUILD_TYPE}/x86_64/
#!/usr/bin/env bash
set -ex
EOS_CODENAME="diopside"
STCI_ROOT_PATH=/eos/project/s/storage-ci/www/eos/
for BUILD_TYPE in "el-7" "el-8" "fc-32" "fc-32-tsan" "fc-rawhide" ; do
EXPORT_DIR_RPMS=${STCI_ROOT_PATH}/${EOS_CODENAME}-depend/${BUILD_TYPE}/x86_64/
EXPORT_DIR_SRPMS=${STCI_ROOT_PATH}/${EOS_CODENAME}-depend/${BUILD_TYPE}/SRPM/
echo "Publishing for: ${BUILD_TYPE} in location: ${EXPORT_DIR_RPMS}"
mkdir -p ${EXPORT_DIR_RPMS}
mkdir -p ${EXPORT_DIR_SRPMS}
cp -n ${BUILD_TYPE}/RPMS/x86_64/*.rpm ${EXPORT_DIR_RPMS}
cp -n ${BUILD_TYPE}/SRPMS/*.srpm ${EXPORT_DIR_SRPMS}
cp -n "deps-${BUILD_TYPE}"/RPMS/x86_64/*.rpm ${EXPORT_DIR_RPMS}
cp -n "deps-${BUILD_TYPE}"/SRPMS/*.srpm ${EXPORT_DIR_SRPMS}
createrepo -q ${EXPORT_DIR_RPMS}
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment