summaryrefslogtreecommitdiffstats
path: root/build/make_repo.sh
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2016-08-19 08:03:05 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-19 08:03:06 +0000
commitdfa5128cfb407eaf4d1fe93404d3b423e26d8c8b (patch)
treeda5ab8fcab40ae077fb9ca2cc01aea7b77effb33 /build/make_repo.sh
parentd74aefc2d04b69a8a0a74af3f4e3114020ca748e (diff)
parent00214a8cf06840cf5be6427d3c8d0ba84a7a1069 (diff)
Merge "Revert "Prepare the jump host offline""
Diffstat (limited to 'build/make_repo.sh')
-rwxr-xr-xbuild/make_repo.sh55
1 files changed, 1 insertions, 54 deletions
diff --git a/build/make_repo.sh b/build/make_repo.sh
index f186c46c..f38da7ff 100755
--- a/build/make_repo.sh
+++ b/build/make_repo.sh
@@ -33,7 +33,6 @@ set -ex
cp /*.tar.gz /result -f
EOF
- sudo apt-get -f install
sudo apt-get install python-yaml -y
sudo apt-get install python-cheetah -y
}
@@ -43,7 +42,7 @@ function make_repo()
rm -f ${WORK_PATH}/work/repo/install_packages.sh
rm -f ${WORK_PATH}/work/repo/Dockerfile
- option=`echo "os-ver:,jh-os:,package-tag:,tmpl:,default-package:, \
+ option=`echo "os-ver:,package-tag:,tmpl:,default-package:, \
special-package:,special-package-script-dir:, \
special-package-dir:,ansible-dir:,special-package-dir" | sed 's/ //g'`
@@ -54,7 +53,6 @@ function make_repo()
eval set -- "$TEMP"
os_ver=""
- jh_os=""
package_tag=""
tmpl=""
default_package=""
@@ -66,7 +64,6 @@ function make_repo()
while :; do
case "$1" in
--os-ver) os_ver=$2; shift 2;;
- --jh-os) jh_os=$2; shift 2;;
--package-tag) package_tag=$2; shift 2;;
--tmpl) tmpl=$2; shift 2;;
--default-package) default_package=$2; shift 2;;
@@ -84,11 +81,6 @@ function make_repo()
return
fi
- if [[ -n ${package_tag} && ${package_tag} == "jhenv" && -n ${jh_os} ]]; then
- make_jhenv_repo
- return
- fi
-
if [[ -z ${os_ver} || -z ${package_tag} ]]; then
echo "parameter is wrong"
exit 1
@@ -275,53 +267,8 @@ function make_pip_repo()
cd $WORK_PATH/work/repo; tar -zcvf pip.tar.gz ./pip; cd -
}
-function make_jhenv_repo()
-{
- if [[ ${jh_os} == trusty ]]; then
- env_os_name=ubuntu
- fi
-
- if [[ ${jh_os} == xenial ]]; then
- env_os_name=ubuntu
- fi
-
- if [[ ${jh_os} =~ rhel[0-9]*$ ]]; then
- env_os_name=centos
- fi
-
- if [[ -d ${WORK_PATH}/build/jhenv_template/$env_os_name ]]; then
-
- jh_env_dockerfile=Dockerfile
- jh_env_docker_tmpl=${BUILD_PATH}/jhenv_template/$env_os_name/$jh_os/${jh_env_dockerfile}".tmpl"
- jh_env_docker_tag="$jh_os/env"
-
- rm -rf ${WORK_PATH}/work/repo/jhenv_template
- mkdir ${WORK_PATH}/work/repo/jhenv_template
- cp -rf ${WORK_PATH}/build/jhenv_template/$env_os_name/$jh_os/${jh_env_dockerfile} ${WORK_PATH}/work/repo/jhenv_template
-
-cat <<EOF >${WORK_PATH}/work/repo/jhenv_template/cp_env.sh
-#!/bin/bash
-set -ex
-cp /*.tar.gz /env -f
-EOF
-
- sudo docker build --no-cache=true -t ${jh_env_docker_tag} -f ${WORK_PATH}/work/repo/jhenv_template/${jh_env_dockerfile} ${WORK_PATH}/work/repo/jhenv_template
- sudo docker run -t -v ${WORK_PATH}/work/repo:/env ${jh_env_docker_tag}
-
- image_id=$(sudo docker images|grep ${jh_env_docker_tag}|awk '{print $3}')
-
- sudo docker rmi -f ${image_id}
-
-# cd $WORK_PATH/work/repo; tar -zcvf pip.tar.gz ./pip; cd -
- fi
-}
-
function make_all_repo()
{
- for env_os in trusty xanial rhel7; do
- make_repo --package-tag jhenv --jh-os $env_os
- done
-
make_repo --package-tag pip
make_repo --os-ver rhel7 --package-tag compass \