File tree Expand file tree Collapse file tree 3 files changed +49
-2
lines changed
Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 1+ #
2+
3+ FROM golang:1.12.6
4+
5+ RUN apt-get update
6+ RUN apt-get install -y ruby ruby-dev rubygems build-essential
7+ RUN gem install --no-ri --no-rdoc fpm
8+ ENV GOPATH=/tmp/go
9+
10+ RUN apt-get install -y curl
11+ RUN apt-get install -y rsync
12+ RUN apt-get install -y gcc
13+ RUN apt-get install -y g++
14+ RUN apt-get install -y bash
15+ RUN apt-get install -y git
16+ RUN apt-get install -y tar
17+ RUN apt-get install -y rpm
18+
19+ RUN mkdir -p $GOPATH/src/github.com/github/gh-ost
20+ WORKDIR $GOPATH/src/github.com/github/gh-ost
21+ COPY . .
22+ RUN bash build.sh
Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ main() {
6161
6262 mkdir -p ${buildpath}
6363 rm -rf ${buildpath:? } /*
64- build macOS osx darwin amd64
6564 build GNU/Linux linux linux amd64
65+ # build macOS osx darwin amd64
6666
6767 echo " Binaries found in:"
68- ls -1 $buildpath /gh-ost-binary * ${timestamp} .tar.gz
68+ find $buildpath /gh-ost* -type f -maxdepth 1
6969}
7070
7171main " $@ "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Usage:
4+ # dock <test|packages> [arg]
5+ # dock test: build gh-ost & run unit and integration tests
6+ # docker pkg [target-path]: build gh-ost release packages and copy to target path (default path: /tmp/gh-ost-release)
7+
8+ command=" $1 "
9+
10+ case " $command " in
11+ " test" )
12+ docker_target=" gh-ost-test"
13+ docker build . -f Dockerfile.test -t " ${docker_target} " && docker run --rm -it " ${docker_target} :latest"
14+ ;;
15+ " pkg" )
16+ packages_path=" ${2:-/ tmp/ gh-ost-release} "
17+ docker_target=" gh-ost-packaging"
18+ docker build . -f Dockerfile.packaging -t " ${docker_target} " && docker run --rm -it -v " ${packages_path} :/tmp/pkg" " ${docker_target} :latest" bash -c ' find /tmp/gh-ost-release/ -maxdepth 1 -type f | xargs cp -t /tmp/pkg'
19+ echo " packages generated on ${packages_path} :"
20+ ls -l " ${packages_path} "
21+ ;;
22+ * )
23+ >&2 echo " Usage: dock dock <test|alpine|packages> [arg]"
24+ exit 1
25+ esac
You can’t perform that action at this time.
0 commit comments