1
0
Fork 0

Fix share script and improve runenv

main
Ambrose Chua 2018-12-02 14:09:42 +08:00
parent f6840bba07
commit 8a608a1bbb
6 changed files with 35 additions and 5 deletions

View File

@ -46,6 +46,7 @@ RUN ./.install/yadm.sh
RUN ./.install/packr.sh
RUN ./.install/caddy.sh
RUN ./.install/kubectl.sh
RUN ./.install/minio-client.sh
RUN ./.install/yarn.sh
#RUN ./.install/grunt.sh
#RUN ./.install/gulp.sh

View File

@ -117,10 +117,20 @@ steps:
kind: pipeline
name: test-kubectl
steps:
- name: test-kubctl
- name: test-kubectl
image: alpine:latest
commands:
- ./.install/sudo.sh
- ./.install/kubectl.sh
- ~/.local/bin/kubectl version -c
---
kind: pipeline
name: test-minio-client
steps:
- name: test-minio-client
image: alpine:latest
commands:
- ./.install/sudo.sh
- ./.install/minio-client.sh
- ~/.local/bin/mc version

17
.install/minio-client.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
set -e
source ./.versions
echo
echo "Installing minio-client..."
echo
sudo apk add --no-cache --virtual .build-deps \
curl
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/mc https://dl.minio.io/client/mc/release/linux-amd64/mc
chmod a+x ~/.local/bin/mc
sudo apk del .build-deps

View File

@ -74,6 +74,8 @@ docker pull $CONTAINER_IMAGE
cmd="\n\
docker run -it $delete$name$ports$workdir$volumes\n\
-v $HOME/.ssh:$CONTAINER_HOME/.ssh \n\
-v $HOME/.kube:$CONTAINER_HOME/.kube \n\
-v $HOME/.mc:$CONTAINER_HOME/.mc \n\
$CONTAINER_IMAGE \n\
$@\
"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/zsh
if [ ! -x "$(which mc)" ]; then
echo "Please install the minio client first"
@ -63,7 +63,7 @@ while getopts "hn:e:f:" opt; do
done
read_fileopts
for i in ${!FILES[@]}; do
for i in {1..$#foo}; do
FILE="${FILES[$i]}"
NAME="${NAMES[$i]}"
EXPIRE="${EXPIRES[$i]}"

View File

@ -25,8 +25,8 @@ docker run -it -p 8080:8080 -v $PWD:/home/ambrose/src -v $HOME/.ssh:/home/ambros
Which is also packed as a script:
```sh
curl -fLo ~/.bin/runenv https://raw.githubusercontent.com/serverwentdown/env/master/.runenv
chmod +x ~/.bin/runenv
curl -fLo ~/.local/bin/runenv https://raw.githubusercontent.com/serverwentdown/env/master/.local/bin/runenv
chmod +x ~/.local/bin/runenv
runenv
```