mirror of
https://github.com/fsquillace/junest.git
synced 2026-01-23 02:34:30 +00:00
Change url
This commit is contained in:
parent
77acbf5214
commit
090629b837
4 changed files with 11 additions and 14 deletions
|
|
@ -40,11 +40,6 @@ archlinux:
|
|||
env:
|
||||
matrix:
|
||||
- TRAVIS_BASH_VERSION="4.0"
|
||||
global:
|
||||
# AWS_ACCESS_KEY_ID
|
||||
- secure: "ZotyKKWH5ZrBXDdEnVmV22gbn86BBSiqDZn2d2jVAApgUQdDc3wa7/uYAZP1bts6oQ897nnkUSFHk3M3QAcIoPJerUITTU5D7yjKcFDejgHdpJ4t9XSajmpY9CgKftWapwliWG4wolAKwyAp5GnYqz4GGltHyGxbF/VzUNRF3lw="
|
||||
# AWS_SECRET_ACCESS_KEY
|
||||
- secure: "AWixvJmhr6+rfF4cspMWMjkvLuOsdfNanLK5wrqkgx/0ezDGBBThH0qVhn5Mp1QFM6wVF+LRA6UESNnj0wNwByZHdM6LddkJWlWHb/qkVK+AO4RKUsXJWNyPyOkCNj/WEFpZHQKKUAlEtC8m8AmAcuoi90cr6ih0PXIePRyPFrM="
|
||||
|
||||
before_install:
|
||||
- ./ci/install-bash.sh "$TRAVIS_BASH_VERSION"
|
||||
|
|
|
|||
14
ci/deploy.sh
14
ci/deploy.sh
|
|
@ -6,7 +6,8 @@ IMG_PATH=$1
|
|||
|
||||
set -ux
|
||||
|
||||
MAX_OLD_IMAGES=30
|
||||
MAX_OLD_IMAGES=3
|
||||
ENDPOINT="https://gateway.storjshare.io"
|
||||
|
||||
# ARCH can be one of: x86, x86_64, arm
|
||||
HOST_ARCH=$(uname -m)
|
||||
|
|
@ -24,7 +25,8 @@ else
|
|||
exit 11
|
||||
fi
|
||||
|
||||
if [[ "$TRAVIS_BRANCH" == "master" ]]
|
||||
# TODO change branch here
|
||||
if [[ "$TRAVIS_BRANCH" == "storj" ]]
|
||||
then
|
||||
|
||||
export AWS_DEFAULT_REGION=eu-west-1
|
||||
|
|
@ -33,15 +35,15 @@ then
|
|||
# production file for a longer period of time.
|
||||
img_name=$(basename "${IMG_PATH}")
|
||||
cp "${IMG_PATH}" "${IMG_PATH}".temp
|
||||
aws s3 cp "${IMG_PATH}".temp s3://junest-repo/junest/
|
||||
aws s3 mv s3://junest-repo/junest/"$img_name".temp s3://junest-repo/junest/"$img_name"
|
||||
aws s3 --endpoint-url="$ENDPOINT" cp "${IMG_PATH}".temp s3://junest-repo/junest/
|
||||
aws s3 --endpoint-url="$ENDPOINT" mv s3://junest-repo/junest/"$img_name".temp s3://junest-repo/junest/"$img_name"
|
||||
|
||||
DATE=$(date +'%Y-%m-%d-%H-%M-%S')
|
||||
|
||||
aws s3 cp "s3://junest-repo/junest/$img_name" "s3://junest-repo/junest/${img_name}.${DATE}"
|
||||
aws s3 --endpoint-url="$ENDPOINT" cp "s3://junest-repo/junest/$img_name" "s3://junest-repo/junest/${img_name}.${DATE}"
|
||||
|
||||
# Cleanup old images
|
||||
aws s3 ls s3://junest-repo/junest/junest-${ARCH}.tar.gz. | awk '{print $4}' | head -n -${MAX_OLD_IMAGES} | xargs -I {} aws s3 rm "s3://junest-repo/junest/{}"
|
||||
aws s3 --endpoint-url="$ENDPOINT" ls s3://junest-repo/junest/junest-${ARCH}.tar.gz. | awk '{print $4}' | head -n -${MAX_OLD_IMAGES} | xargs -I {} aws s3 rm "s3://junest-repo/junest/{}"
|
||||
|
||||
# Test the newly deployed image can be downloaded correctly
|
||||
junest setup
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ else
|
|||
die "Unknown architecture ${HOST_ARCH}"
|
||||
fi
|
||||
|
||||
MAIN_REPO=https://dwa8bhj1f036z.cloudfront.net
|
||||
MAIN_REPO=https://link.storjshare.io/s/jvb5tgarnjtt565fffa44spvyuga/junest-repo
|
||||
ENV_REPO=${MAIN_REPO}/${CMD}
|
||||
# shellcheck disable=SC2016
|
||||
DEFAULT_MIRROR='https://mirror.rackspace.com/archlinux/$repo/os/$arch'
|
||||
|
|
@ -74,7 +74,7 @@ BWRAP="${JUNEST_HOME}/usr/bin/bwrap"
|
|||
PROOT="${JUNEST_HOME}/usr/bin/proot-${ARCH}"
|
||||
GROOT="${JUNEST_HOME}/usr/bin/groot"
|
||||
CLASSIC_CHROOT=chroot
|
||||
WGET="wget --no-check-certificate"
|
||||
WGET="wget --content-disposition --no-check-certificate"
|
||||
CURL="curl -L -J -O -k"
|
||||
TAR="tar"
|
||||
CHOWN="chown"
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ function setup_env(){
|
|||
info "Downloading ${NAME}..."
|
||||
builtin cd "${maindir}" || return 1
|
||||
local imagefile=${CMD}-${arch}.tar.gz
|
||||
download_cmd "${ENV_REPO}/${imagefile}"
|
||||
download_cmd "${ENV_REPO}/${imagefile}?download=1"
|
||||
|
||||
info "Installing ${NAME}..."
|
||||
_setup_env "${maindir}/${imagefile}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue