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
24 lines
627 B
Bash
Executable File
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'"
|