Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In drone got an error “/bin/sh: 1: base64: not found ”. #2296

Closed
JermineHu opened this issue Jan 10, 2018 · 1 comment
Closed

In drone got an error “/bin/sh: 1: base64: not found ”. #2296

JermineHu opened this issue Jan 10, 2018 · 1 comment

Comments

@JermineHu
Copy link

My .drone.yml file as follows code .

branches:
  include: [ master, dev ]
  exclude: [ develop, feature/* ]
clone:
  git:
    image: plugins/git
    depth: 50
workspace:
  base: /go
  path: src/xink.com/metis
pipeline:
  build:
    when:
      branch: master
    image: golang:alpine
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
   # - /usr/bin/base64:/bin/base64
    environment:
      - CGO=0
      - GOOS=linux
      - GOARCH=amd64
      - PATH=$PATH:/go
      - GOPATH=/go
    commands:
      - go env
      - go build -v -o metis

tim 20180110105337

When push code the Drone start pipeline build step. I try " /usr/bin/base64:/bin/base64 " by volumes but got " standard_init_linux.go:195: exec user process caused 'no such file or directory' " .

tim 20180110144744

I make file as follows code got successful status.

branches:
  include: [ master, dev ]
  exclude: [ develop, feature/* ]
clone:
  git:
    image: plugins/git
    depth: 50
workspace:
  base: /go
  path: src/xink.com/metis
pipeline:
  build:
    when:
      branch: master
    image: golang:alpine
    commands: go build -v -o metis

tim 333

So , I think this should be a bug in resolve .drone.yml at "environment","commands","volumes" node with multiple parameters or my .drone.yml configuration file is wrong ?

@JermineHu
Copy link
Author

This problem was solved ! In .drone.yml file at "environment" node - PATH=$GOPATH/bin:/usr/local/bin:$PATH destroyed PATH environment . So delete - PATH=$PATH:/go line code will be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant