Skip to content

Commit

Permalink
Squashed 'hack/libbuild/' changes from 4cca4459..5e13446a
Browse files Browse the repository at this point in the history
5e13446a shfmt -l -w -ci -i 2 *.sh
499a1ab8 Add kubeware script
8e0811f8 Add kubevault script
f1cf7f24 Rename kiteci to kubeci
0e54dac9 Use go 1.9 compiler since tar package breaks static build
7117c1b8 Add soter image
a1aad737 Update README.md
eb754899 Mount /.cache folder to /tmp
dcf8ff35 Don't use upx with Windows binaries
f1197df8 Update README.md
6e94151a Use Golang 1.10.0-alpine
2bd987dd Add kubepack script
bf8075a7 Update Golang to 1.9.4
2634f8cc Keep the original file when bzip2-ing
f38a25e0 Use bzip2 without tar
21306b4c Fix upx command
17b0826f Fix compress process
068e6317 Conditionally enable upx
dd8f2507 Stop using upx
a40fdcb1 Use zip to compress in windows
7aea4cbb Update libbuild.py
59c194c2 Create *.tar.bz2 archives (#17)
53cabf10 Compress Go binaries using upx (#16)
81dd7359 only update canary tags for images built from master branch (#14)
c21c4816 Switch to GO 1.9.3
f0faa64b Remove `-it` from docker builds
430a90bc Use kiteci/golang:1.9.2-alpine image
fc9db855 Add kiteci.sh
55918b96 Add pharmer script
d8ec9c74 Update to go 1.9.2 alpine image
4c4d9152 Use Docker hub for public images
f1e269ab Update alpine image to 1.9.1
7b029988 Set GOBIN var
c409b02a Use current user to build alpine image.
b70065d4 Add build command for alpine (#12)
27220cfa Update libbuild.py

git-subtree-dir: hack/libbuild
git-subtree-split: 5e13446ab1012269f7c3ba914dbf93a399db41ed
  • Loading branch information
tamalsaha committed Jul 8, 2018
1 parent 54c59a4 commit e4043e9
Show file tree
Hide file tree
Showing 14 changed files with 1,315 additions and 544 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.DS_Store
*.box
.vscode/
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[![CLA assistant](https://cla-assistant.io/readme/badge/appscode/libbuild)](https://cla-assistant.io/appscode/libbuild)

[Website](https://appscode.com)[Slack](https://slack.appscode.com)[Forum](https://discuss.appscode.com)[Twitter](https://twitter.com/AppsCodeHQ)

Common build scripts used by AppsCode repositories.

## Installing
Expand Down Expand Up @@ -60,6 +56,9 @@ import antipackage
from github.appscode.libbuild import libbuild
```

## Prerequisites
We use [upx](https://upx.github.io/) to compress Go binaries. You need to install upx 3.92 or later to produce [valid Max OSX binaries](https://github.com/upx/upx/issues/4). Ubuntu 16.04 will install upx 3.91. So, [download and install](https://launchpad.net/ubuntu/+source/upx-ucl) upx deb files from [here](https://launchpad.net/ubuntu/+source/upx-ucl/3.94-4/+build/14175315).

## Acknowledgement
- `pydotenv` is a fork of [python-dotenv](https://github.com/theskumar/python-dotenv). This provides support of [antipackage](https://github.com/ellisonbg/antipackage)
for python-dotenv.
Expand Down
191 changes: 97 additions & 94 deletions common/cowrypay_image.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,114 +1,117 @@
#!/bin/bash

DOCKER_REGISTRY=${DOCKER_REGISTRY:-cowrypay}
export DOCKER_REGISTRY=${DOCKER_REGISTRY:-cowrypay}
source $(dirname "${BASH_SOURCE}")/lib.sh

# override this one if you need to change push & pull
docker_push() {
hub_canary
hub_canary
}

docker_pull() {
hub_pull
hub_pull
}


source_repo() {
RETVAL=0
RETVAL=0

if [ $# -eq 0 ]; then
cmd=${DEFAULT_COMMAND:-build}
$cmd
exit $RETVAL
fi
if [ $# -eq 0 ]; then
cmd=${DEFAULT_COMMAND:-build}
$cmd
exit $RETVAL
fi

case "$1" in
build)
build
;;
build_binary)
build_binary
;;
build_docker)
build_docker
;;
clean)
clean
;;
push)
docker_push
;;
pull)
docker_pull
;;
release)
docker_release
;;
check)
docker_check
;;
run)
docker_run
;;
sh)
docker_sh
;;
rm)
docker_rm
;;
rmi)
docker_rmi
;;
*) (10)
echo $"Usage: $0 {build|build_binary|build_docker|clean|push|pull|release|check|sh|rm|rmi}"
RETVAL=1
esac
exit $RETVAL
case "$1" in
build)
build
;;
build_binary)
build_binary
;;
build_docker)
build_docker
;;
clean)
clean
;;
push)
docker_push
;;
pull)
docker_pull
;;
release)
docker_release
;;
check)
docker_check
;;
run)
docker_run
;;
sh)
docker_sh
;;
rm)
docker_rm
;;
rmi)
docker_rmi
;;
*)
(10)
echo $"Usage: $0 {build|build_binary|build_docker|clean|push|pull|release|check|sh|rm|rmi}"
RETVAL=1
;;
esac
exit $RETVAL
}

binary_repo() {
RETVAL=0
RETVAL=0

if [ $# -eq 0 ]; then
cmd=${DEFAULT_COMMAND:-build}
$cmd
exit $RETVAL
fi
if [ $# -eq 0 ]; then
cmd=${DEFAULT_COMMAND:-build}
$cmd
exit $RETVAL
fi

case "$1" in
build)
build
;;
clean)
clean
;;
push)
docker_push
;;
pull)
docker_pull
;;
release)
docker_release
;;
check)
docker_check
;;
run)
docker_run
;;
sh)
docker_sh
;;
rm)
docker_rm
;;
rmi)
docker_rmi
;;
*) (10)
echo $"Usage: $0 {build|clean|push|pull|release|check|sh|rm|rmi}"
RETVAL=1
esac
exit $RETVAL
case "$1" in
build)
build
;;
clean)
clean
;;
push)
docker_push
;;
pull)
docker_pull
;;
release)
docker_release
;;
check)
docker_check
;;
run)
docker_run
;;
sh)
docker_sh
;;
rm)
docker_rm
;;
rmi)
docker_rmi
;;
*)
(10)
echo $"Usage: $0 {build|clean|push|pull|release|check|sh|rm|rmi}"
RETVAL=1
;;
esac
exit $RETVAL
}
117 changes: 117 additions & 0 deletions common/kubeci_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/bin/bash

export DOCKER_REGISTRY=${DOCKER_REGISTRY:-kubeci}
source $(dirname "${BASH_SOURCE}")/lib.sh

# override this one if you need to change push & pull
docker_push() {
hub_canary
}

docker_pull() {
hub_pull
}

source_repo() {
RETVAL=0

if [ $# -eq 0 ]; then
cmd=${DEFAULT_COMMAND:-build}
$cmd
exit $RETVAL
fi

case "$1" in
build)
build
;;
build_binary)
build_binary
;;
build_docker)
build_docker
;;
clean)
clean
;;
push)
docker_push
;;
pull)
docker_pull
;;
release)
docker_release
;;
check)
docker_check
;;
run)
docker_run
;;
sh)
docker_sh
;;
rm)
docker_rm
;;
rmi)
docker_rmi
;;
*)
(10)
echo $"Usage: $0 {build|build_binary|build_docker|clean|push|pull|release|check|sh|rm|rmi}"
RETVAL=1
;;
esac
exit $RETVAL
}

binary_repo() {
RETVAL=0

if [ $# -eq 0 ]; then
cmd=${DEFAULT_COMMAND:-build}
$cmd
exit $RETVAL
fi

case "$1" in
build)
build
;;
clean)
clean
;;
push)
docker_push
;;
pull)
docker_pull
;;
release)
docker_release
;;
check)
docker_check
;;
run)
docker_run
;;
sh)
docker_sh
;;
rm)
docker_rm
;;
rmi)
docker_rmi
;;
*)
(10)
echo $"Usage: $0 {build|clean|push|pull|release|check|sh|rm|rmi}"
RETVAL=1
;;
esac
exit $RETVAL
}
Loading

0 comments on commit e4043e9

Please sign in to comment.