I’m trying to execute beego commands while building the following pipeline. It throws an error at the build phase saying bee: not found
. I’ve verified that command independently inside the docker image.
workspace:
base: /go
path: src/github.com/apremalal/my-app
pipeline:
build:
image: apremalal/glide:0.5
environment:
- GOOS=linux
- GOARCH=amd64
commands:
- export PATH=$PATH:$GOPATH/bin
- bee gendocs
- glide install
- export CGO_ENABLED=0
- export GOOS=linux
- export GOARCH=amd64
- go test -v -coverpkg=./controllers ./controllers_test -coverprofile=c.out && go tool cover -func=c.out
- go build
when:
event: [ push, tag ]
This is the Dockerfile for apremalal/glide. I was able to execute bee commands locally using this image.
# https://hub.docker.com/_/golang
FROM golang:1.10-alpine
MAINTAINER Anuruddha <anuruddhapremalal@gmail.com>
RUN apk update && \
apk upgrade && \
apk add git
RUN go get golang.org/x/tools/cmd/goimports
RUN go get github.com/beego/bee
RUN apk add --update --no-cache \
ca-certificates \
# https://github.com/Masterminds/glide#supported-version-control-systems
git mercurial subversion bzr \
openssh \
&& update-ca-certificates \
\
# Install build dependencies
&& apk add --no-cache --virtual .build-deps \
curl make \
\
# Download and unpack Glide sources
&& curl -L -o /tmp/glide.tar.gz \
https://github.com/Masterminds/glide/archive/v0.13.1.tar.gz \
&& tar -xzf /tmp/glide.tar.gz -C /tmp \
&& mkdir -p $GOPATH/src/github.com/Masterminds \
&& mv /tmp/glide-* $GOPATH/src/github.com/Masterminds/glide \
&& cd $GOPATH/src/github.com/Masterminds/glide \
\
# Build and install Glide executable
&& make install \
\
# Install Glide license
&& mkdir -p /usr/local/share/doc/glide \
&& cp LICENSE /usr/local/share/doc/glide/ \
\
# Cleanup unnecessary files
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* \
$GOPATH/src/* \
/tmp/*
ENV PATH=$PATH:$GOPATH/bin
WORKDIR $GOPATH
What would be the reason for bee command to not available in drone execution environment?