-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ci make target for dirs with spaces and netctl for kubeadm #292
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,9 +276,17 @@ echo "Applying contiv installation" | |
grep -q -F "netmaster" /etc/hosts || echo "$netmaster netmaster" >>/etc/hosts | ||
echo "To customize the installation press Ctrl+C and edit $contiv_yaml." | ||
sleep 5 | ||
chmod +x ./netctl | ||
rm -f /usr/bin/netctl | ||
cp ./netctl /usr/bin/ | ||
|
||
# extract netctl from netplugin container | ||
echo "Extracting netctl from netplugin container" | ||
netplugin_version=$( | ||
sed '/contiv_network_version/!d;s/.*\: \?"\(.*\)".*/\1/' \ | ||
install/ansible/env.json) | ||
docker rm netplugin-tmp >/dev/null 2>/dev/null || : | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, that's shorter,can change if the CI fails again |
||
c_id=$(docker create --name netplugin-tmp contiv/netplugin:$netplugin_version) | ||
docker cp ${c_id}:/contiv/bin/netctl /usr/bin | ||
docker rm ${c_id} | ||
|
||
# Install Contiv | ||
$kubectl apply -f $contiv_yaml | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,8 @@ v2plugin_version=${CONTIV_V2PLUGIN_VERSION} | |
# where everything is assembled, always start with a clean dir and clean it up | ||
output_tmp_dir="$(mktemp -d)" | ||
output_dir="${output_tmp_dir}/contiv-${CONTIV_INSTALLER_VERSION}" | ||
mkdir -p ${output_dir} | ||
trap 'rm -rf ${output_tmp_dir}' EXIT | ||
mkdir -p "${output_dir}" | ||
trap 'rm -rf "${output_tmp_dir}"' EXIT | ||
|
||
release_dir=release | ||
mkdir -p $release_dir | ||
|
@@ -45,7 +45,7 @@ cp -rf scripts/generate-certificate.sh $output_dir/install | |
chmod +x $output_dir/install/genInventoryFile.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to quote everywhere There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. output_dir is $(mktemp -d), which wont' have spaces . . unless TMPDIR is set and has spaces, for this PR, assuming it's not set to a dir with spaces |
||
chmod +x $output_dir/install/generate-certificate.sh | ||
|
||
cp -a ${CONTIV_ARTIFACT_STAGING}/ansible ${output_dir}/ | ||
cp -a "${CONTIV_ARTIFACT_STAGING}/ansible" ${output_dir}/ | ||
|
||
# Replace versions | ||
files=$(find $output_dir -type f -name "*.yaml" -or -name "*.sh" -or -name "*.json") | ||
|
@@ -96,14 +96,14 @@ curl --fail -sL -o $binary_cache/ovs-switch.deb http://mirrors.kernel.org/ubuntu | |
# Copy the netplugin release into the binary cache for "full" installer | ||
# Netplugin releases built locally based on a branch are named by their SHA, | ||
# but there is a symlink to point to the SHA named tarball by it's branch name | ||
plugin_tball=${CONTIV_ARTIFACT_STAGING}/$CONTIV_NETPLUGIN_TARBALL_NAME | ||
plugin_tball="${CONTIV_ARTIFACT_STAGING}/$CONTIV_NETPLUGIN_TARBALL_NAME" | ||
if [[ -L "${plugin_tball}" ]]; then | ||
# copy the link (so other processes can find the tarball) and the tarball | ||
target_plugin_tball=$(readlink ${plugin_tball}) | ||
cp -a ${plugin_tball} ${binary_cache}/ | ||
plugin_tball=${CONTIV_ARTIFACT_STAGING}/${target_plugin_tball} | ||
target_plugin_tball="$(readlink "${plugin_tball}")" | ||
cp -a "${plugin_tball}" "${binary_cache}/" | ||
plugin_tball="${CONTIV_ARTIFACT_STAGING}/${target_plugin_tball}" | ||
fi | ||
cp ${plugin_tball} ${binary_cache}/ | ||
cp "${plugin_tball}" "${binary_cache}/" | ||
|
||
env_file=$output_dir/install/ansible/env.json | ||
sed -i.bak 's#__AUTH_PROXY_LOCAL_INSTALL__#true#g' "$env_file" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍