Files
packetary/perestroika/docker-builder/update-rpm-chroot.sh
Sergey Kulanov 05d86902d5 [perestroika] Inject perestroika into fuel-mirror
While we have migration of perestroika to Python implementation
we need to have friendly and open way to share and fix issues
in current perestroika code

Change-Id: I7fced52ddadc81d4d8a52659358936f6e68cc3e4
Closes-bug: #1489470
2015-10-19 20:59:46 +03:00

24 lines
627 B
Bash
Executable File

#!/bin/bash
set -ex
BIN="${0%/*}"
source "${BIN}/config"
CONTAINERNAME=mockbuild:latest
CACHEPATH=/var/cache/docker-builder/mock
# check DIST=centos6 which can be passed from upstream job or defined in env
DIST_VERSION=${DIST/centos/}
# by default we init env for CentOS 7
[ -z "${DIST_VERSION}" ] && DIST_VERSION=7
if [ "${DIST_VERSION}" != 6 ] && [ "${DIST_VERSION}" != 7 ]; then
echo "Unknown dist version: ${DIST_VERSION}"
exit 1
fi
docker run ${DNSPARAM} --privileged --rm -v ${CACHEPATH}/cache:/var/cache/mock ${CONTAINERNAME} \
bash -c "su - abuild -c 'mock -r centos-${DIST_VERSION}-x86_64 -v --update'"