Restructure packages for reuse

This commit is contained in:
Arthur Barr
2017-11-21 14:32:09 +00:00
parent 3848c39147
commit 099397442b
9 changed files with 49 additions and 66 deletions

View File

@@ -12,23 +12,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
# Build stage to build Go code
###############################################################################
FROM golang:1.9 as builder
WORKDIR /go/src/github.com/ibm-messaging/mq-container/
COPY cmd/ ./cmd
COPY pkg/ ./pkg
COPY internal/ ./internal
COPY vendor/ ./vendor
RUN go build ./cmd/runmqserver/
RUN go build ./cmd/chkmqready/
RUN go build ./cmd/chkmqhealthy/
# Run all unit tests
RUN go test -v ./cmd/... ./internal/...
# Build stage to run Go unit tests
FROM golang:1.9 as tester
COPY pkg/ ./pkg
RUN cd pkg/name && go test
RUN cd pkg/linux/capabilities && go test
###############################################################################
# Main build stage, to build MQ image
###############################################################################
FROM ubuntu:16.04
# The URL to download the MQ installer from in tar.gz format