Skip to content

Commit

Permalink
Revert "Remove r10k env vars with proper args"
Browse files Browse the repository at this point in the history
It broke all unit tests jobs:
http://logs.openstack.org/98/535698/16/gate/puppet-openstack-unit-4.8-centos-7/bd7dedf/job-output.txt.gz#_2018-02-05_23_19_05_369251


This reverts commit 9f14f75.

Change-Id: Ibcb2bb60a668d232371e4d87febad6d67b3302d8
  • Loading branch information
EmilienM committed Feb 6, 2018
1 parent 932aa7b commit 3c8f4cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
16 changes: 7 additions & 9 deletions functions
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,21 @@
#
# - ``SCRIPT_DIR`` must be set to script path
# - ``GEM_BIN_DIR`` must be set to Gem bin directory
# - ``MODULES_DIR`` must be set to Puppet modules directory
install_external() {
r10k -v DEBUG puppetfile install --puppetfile ${SCRIPT_DIR}/Puppetfile1 --moduledir ${MODULES_DIR}
PUPPETFILE=${SCRIPT_DIR}/Puppetfile1 r10k -v DEBUG puppetfile install
}

# Install Puppet OpenStack modules with zuul-cloner
# Uses the following variables:
#
# - ``MODULES_DIR`` must be set to Puppet modules directory
# - ``PUPPETFILE_DIR`` must be set to Puppet modules directory
# - ``SCRIPT_DIR`` must be set to script path
# - ``ZUUL_BRANCH`` must be set to Zuul branch. Fallback to 'master'.
install_openstack() {
cat > clonemap.yaml <<EOF
clonemap:
- name: '(.*?)/puppet-(.*)'
dest: '$MODULES_DIR/\2'
dest: '$PUPPETFILE_DIR/\2'
EOF

# Periodic jobs run without ref on master
Expand All @@ -40,26 +39,25 @@ EOF

# Because openstack-integration can't be a class name.
# https://projects.puppetlabs.com/issues/5268
mv $MODULES_DIR/openstack-integration $MODULES_DIR/openstack_integration
mv $PUPPETFILE_DIR/openstack-integration $PUPPETFILE_DIR/openstack_integration
}

# Install all Puppet modules with r10k
# Uses the following variables:
#
# - ``SCRIPT_DIR`` must be set to script path
# - ``MODULES_DIR`` must be set to Puppet modules directory
install_all() {
# When installing from local source, we want to install the current source
# we're working from.
r10k -v DEBUG puppetfile install --puppetfile ${SCRIPT_DIR}/Puppetfile --moduledir ${MODULES_DIR}
cp -a ${SCRIPT_DIR} ${MODULES_DIR}/openstack_integration
PUPPETFILE=${SCRIPT_DIR}/Puppetfile r10k -v DEBUG puppetfile install
cp -a ${SCRIPT_DIR} ${PUPPETFILE_DIR}/openstack_integration
}

# Install Puppet OpenStack modules and dependencies by using
# zuul-cloner or r10k.
# Uses the following variables:
#
# - ``MODULES_DIR`` must be set to Puppet modules directory
# - ``PUPPETFILE_DIR`` must be set to Puppet modules directory
# - ``SCRIPT_DIR`` must be set to script path
# - ``ZUUL_BRANCH`` must be set to Zuul branch
install_modules() {
Expand Down
4 changes: 2 additions & 2 deletions install_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ -e /opt/puppetlabs/bin/puppet ]; then
fi

export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
export MODULES_DIR=${MODULES_DIR:-${PUPPET_BASE_PATH}/modules}
export PUPPETFILE_DIR=${PUPPETFILE_DIR:-${PUPPET_BASE_PATH}/modules}
source $SCRIPT_DIR/functions

print_header 'Start (install_modules.sh)'
Expand All @@ -31,7 +31,7 @@ gem install puppet_forge -v '= 2.2.6' --verbose
gem install r10k --no-ri --no-rdoc --verbose

# make sure there is no puppet module pre-installed
rm -rf "${MODULES_DIR:?}/"*
rm -rf "${PUPPETFILE_DIR:?}/"*

print_header 'Install Modules'
install_modules
Expand Down
2 changes: 1 addition & 1 deletion install_modules_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
fi

export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
export MODULES_DIR=${MODULES_DIR:-${PUPPET_BASE_PATH}/modules}
export PUPPETFILE_DIR=${PUPPETFILE_DIR:-${PUPPET_BASE_PATH}/modules}
source $SCRIPT_DIR/functions

print_header 'Start (install_modules_unit.sh)'
Expand Down

0 comments on commit 3c8f4cc

Please sign in to comment.