-
Notifications
You must be signed in to change notification settings - Fork 950
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
test: refact travis-ci #2673
test: refact travis-ci #2673
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 |
---|---|---|
|
@@ -13,4 +13,3 @@ coverage.txt | |
.DS_Store | ||
bin/ | ||
coverage/ | ||
install/ | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
export OSS_ENDPOINT="oss-cn-beijing.aliyuncs.com" | ||
export OSS_BUCKET="pouch-oss" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ set -euo pipefail | |
|
||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
source "./check.sh" | ||
source "./config.sh" | ||
|
||
readonly NSENTER_VERSION="2.24.1" | ||
readonly cmd="nsenter" | ||
|
@@ -29,43 +30,15 @@ nsenter::check_version() { | |
|
||
# nsenter::ubuntu::install_dependencies will use apt-get to install dependencies. | ||
nsenter::ubuntu::install_dependencies() { | ||
apt-get install -y -q \ | ||
libncurses5-dev \ | ||
libslang2-dev \ | ||
gettext \ | ||
zlib1g-dev \ | ||
libselinux1-dev \ | ||
debhelper \ | ||
lsb-release \ | ||
pkg-config \ | ||
po-debconf \ | ||
autoconf \ | ||
automake \ | ||
autopoint \ | ||
libtool | ||
apt-get install -y -q wget | ||
} | ||
|
||
# nsenter::ubuntu::install will install nsenter. | ||
# TODO: change to get binary from aliyun oss storage. | ||
nsenter::ubuntu::install() { | ||
local url target tmpdir | ||
|
||
target="util-linux-${NSENTER_VERSION}.tar.gz" | ||
url="https://www.kernel.org/pub/linux/utils/util-linux/v2.24" | ||
url="${url}/${target}" | ||
|
||
tmpdir="$(mktemp -d /tmp/nsenter-install-XXXXXX)" | ||
trap 'rm -rf /tmp/nsenter-install-*' EXIT | ||
|
||
wget --quiet "${url}" -P "${tmpdir}" | ||
tar xf "${tmpdir}/${target}" -C "${tmpdir}" | ||
|
||
cd "${tmpdir}/util-linux-${NSENTER_VERSION}" | ||
./autogen.sh | ||
autoreconf -vfi | ||
./configure | ||
make | ||
|
||
cp "${cmd}" /usr/local/bin | ||
wget "https://${OSS_BUCKET}.${OSS_ENDPOINT}/pouch-test/ubuntu/nsenter-2.24.1" \ | ||
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. just reminder, if someone wants to run the script without nsenter binary, it might fail. however, we can install nsenter manually to let the script work. 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. nsenter is public in aliyun oss, so everyone can get it. |
||
-O /usr/local/bin/nsenter | ||
chmod +x /usr/local/bin/nsenter | ||
} | ||
|
||
# nsenter::centos::install will install nsenter. | ||
|
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.
ping @houstar just curiosity, why we ignore
install
folder here?