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

Buffalo build does not work with gitlab-ci #1631

Open
nkovacs opened this Issue Mar 21, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@nkovacs
Copy link

commented Mar 21, 2019

Description

The .gitlab-ci.yml file generated by buffalo new contains a script that symlinks the build directory into the GOPATH of the golang docker image:

- ln -s /builds /go/src/$(echo "{{.opts.App.PackagePkg}}" | cut -d "/" -f1)

If you try to run buffalo build in this environment, it will fail. The generated buffalo_build_main.go will contain relative imports to the a, actions and grifts packages, leading to local import in non-local package errors.

Steps to Reproduce the Problem

  1. Create a new project with buffalo new --ci-provider gitlab-ci <projectname>
  2. Add a build step to the generated .gitlab-ci.yml consisting of a buffalo build command
  3. Push the code to gitlab

Expected Behavior

The build should succeed.

Actual Behavior

The build fails with "local import in non-local package" errors.

Info

Please run buffalo info and paste the information below where it says "PASTE_HERE".

Pwd is /home/n/go/src/github.com/nkovacs/buffdef, not /home/n/progs/nkovacs/buffdef as reported by buffalo info. This is actually a symlink to /home/n/progs/nkovacs/buffdef, to simulate the gitlab ci environment.

buffalo info
### Buffalo Version
v0.14.2

### App Information
Pwd=/home/n/progs/nkovacs/buffdef
Root=/home/n/go/src/github.com/nkovacs/buffdef
GoPath=/home/n/go
PackagePkg=../../progs/nkovacs/buffdef
ActionsPkg=../../progs/nkovacs/buffdef/actions
ModelsPkg=../../progs/nkovacs/buffdef/models
GriftsPkg=../../progs/nkovacs/buffdef/grifts
WithModules=false
Name=buffdef
Bin=bin/buffdef
VCS=git
WithPop=true
WithSQLite=false
WithDep=true
WithWebpack=true
WithNodeJs=true
WithYarn=true
WithDocker=true
WithGrifts=true
AsWeb=true
AsAPI=false
PackageJSON={map[]}

### Go Version
go version go1.10 linux/amd64

### Go Env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/n/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/n/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build618079501=/tmp/go-build -gno-record-gcc-switches"

### Node Version
v8.10.0

### NPM Version
5.6.0

### Yarn Version
1.12.1

### PostgreSQL Version
PostgreSQL Not Found

### MySQL Version
mysql  Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using  EditLine wrapper

### SQLite Version
SQLite Not Found

### Dep Version
dep:
 version     : devel
 build date  : 
 git hash    : 
 go version  : go1.10
 go compiler : gc
 platform    : linux/amd64
 features    : ImportDuringSolve=false

### Dep Status
PROJECT                                             CONSTRAINT     VERSION        REVISION  LATEST   PKGS USED
dmitri.shuralyov.com/text/kebabcase                 branch master  branch master  0797b6d   0797b6d  1   
github.com/BurntSushi/toml                          v0.3.1         v0.3.1         3012a1d   v0.3.1   1   
github.com/ajg/form                                 v1.5.1         v1.5.1         5c4e226   v1.5.1   1   
github.com/blang/semver                             v3.5.1         v3.5.1         2ee8785   v3.5.1   1   
github.com/cockroachdb/cockroach-go                 branch master  branch master  e0a95df   e0a95df  1   
github.com/davecgh/go-spew                          v1.1.1         v1.1.1         8991bc2   v1.1.1   1   
github.com/dustin/go-humanize                       v1.0.0         v1.0.0         9f541cc   v1.0.0   1   
github.com/fatih/color                              v1.7.0         v1.7.0         5b77d2a   v1.7.0   1   
github.com/fatih/structs                            v1.1.0         v1.1.0         4966fc6   v1.1.0   1   
github.com/fsnotify/fsnotify                        v1.4.7         v1.4.7         c282820   v1.4.7   1   
github.com/go-sql-driver/mysql                      v1.4.1         v1.4.1         72cd26f   v1.4.1   1   
github.com/gobuffalo/buffalo                        ^0.14.2        v0.14.2        98c7d0b   v0.14.2  6   
github.com/gobuffalo/buffalo-plugins                v1.14.0        v1.14.0        41e6248   v1.14.0  2   
github.com/gobuffalo/buffalo-pop                    v1.9.0         v1.9.0         43e750e   v1.9.0   2   
github.com/gobuffalo/envy                           ^1.6.15        v1.6.15        fa0dfdc   v1.6.15  1   
github.com/gobuffalo/events                         v1.2.0         v1.2.0         7405490   v1.2.0   1   
github.com/gobuffalo/fizz                           v1.6.1         v1.6.1         b1746c6   v1.6.1   2   
github.com/gobuffalo/flect                          v0.1.1         v0.1.1         8be8aca   v0.1.1   2   
github.com/gobuffalo/genny                          branch master  branch master  e16e52a   e16e52a  1   
github.com/gobuffalo/github_flavored_markdown       v1.0.7         v1.0.7         c57d0cf   v1.0.7   6   
github.com/gobuffalo/gogen                          branch master  branch master  8f38393   8f38393  3   
github.com/gobuffalo/httptest                       v1.1.0         v1.1.0         294cbc0   v1.1.0   1   
github.com/gobuffalo/logger                         branch master  branch master  86e12af   86e12af  1   
github.com/gobuffalo/makr                           v1.1.5         v1.1.5         bfe5373   v1.1.5   1   
github.com/gobuffalo/mapi                           v1.0.1         v1.0.1         09ac528   v1.0.1   1   
github.com/gobuffalo/meta                           branch master  branch master  a532014   a532014  1   
github.com/gobuffalo/mw-csrf                        branch master  branch master  25460a0   25460a0  1   
github.com/gobuffalo/mw-forcessl                    branch master  branch master  6d1ef7f   6d1ef7f  1   
github.com/gobuffalo/mw-i18n                        branch master  branch master  337de00   337de00  1   
github.com/gobuffalo/mw-paramlogger                 branch master  branch master  0d45762   0d45762  1   
github.com/gobuffalo/nulls                          branch master  branch master  85f3c92   85f3c92  1   
github.com/gobuffalo/packd                          branch master  branch master  a385830   a385830  1   
github.com/gobuffalo/packr                          ^2.0.7         v2.0.7         fefbc1d   v2.0.7   7   
github.com/gobuffalo/plush                          v3.7.33        v3.7.33        f69cf36   v3.7.33  5   
github.com/gobuffalo/pop                            ^4.10.0        v4.10.0        9eeaaa1   v4.10.0  5   
github.com/gobuffalo/suite                          ^2.6.0         v2.6.0         9b4d77a   v2.6.0   2   
github.com/gobuffalo/syncx                          branch master  branch master  33c2958   33c2958  1   
github.com/gobuffalo/tags                           v2.0.16        v2.0.16        d22139b   v2.0.16  3   
github.com/gobuffalo/uuid                           v2.0.5         v2.0.5         3f70165   v2.0.5   1   
github.com/gobuffalo/validate                       v2.0.3         v2.0.3         f6f3be4   v2.0.3   2   
github.com/gobuffalo/x                              branch master  branch master  6bb1341   6bb1341  3   
github.com/gofrs/uuid                               v3.2.0         v3.2.0         6b08a5c   v3.2.0   1   
github.com/gorilla/context                          v1.1.1         v1.1.1         08b5f42   v1.1.1   1   
github.com/gorilla/mux                              v1.7.0         v1.7.0         a796238   v1.7.0   1   
github.com/gorilla/securecookie                     v1.1.1         v1.1.1         e59506c   v1.1.1   1   
github.com/gorilla/sessions                         v1.1.3         v1.1.3         f57b7e2   v1.1.3   1   
github.com/inconshreveable/mousetrap                v1.0           v1.0           76626ae   v1.0     1   
github.com/jackc/pgx                                v3.3.0         v3.3.0         c59c9ca   v3.3.0   6   
github.com/jmoiron/sqlx                             v1.2.0         v1.2.0         d161d7a   v1.2.0   2   
github.com/joho/godotenv                            v1.3.0         v1.3.0         23d116a   v1.3.0   1   
github.com/karrick/godirwalk                        v1.8.0         v1.8.0         6d1c776   v1.8.0   1   
github.com/kballard/go-shellquote                   branch master  branch master  95032a8   95032a8  1   
github.com/konsorten/go-windows-terminal-sequences  v1.0.2         v1.0.2         f55edac   v1.0.2   1   
github.com/lib/pq                                   v1.0.0         v1.0.0         4ded0e9   v1.0.0   2   
github.com/markbates/going                          v1.0.3         v1.0.3         7745e38   v1.0.3   2   
github.com/markbates/grift                          ^1.0.5         v1.0.5         ce869fe   v1.0.5   1   
github.com/markbates/hmax                           v1.0.0         v1.0.0         800e180   v1.0.0   1   
github.com/markbates/inflect                        v1.0.4         v1.0.4         24b8319   v1.0.4   1   
github.com/markbates/oncer                          branch master  branch master  bf2de49   bf2de49  1   
github.com/markbates/refresh                        v1.7.1         v1.7.1         fdf2220   v1.7.1   3   
github.com/markbates/safe                           v1.0.1         v1.0.1         6fea05a   v1.0.1   1   
github.com/markbates/sigtx                          v1.0.0         v1.0.0         daa2e5f   v1.0.0   1   
github.com/mattn/go-colorable                       v0.0.9         v0.0.9         167de6b   v0.0.9   1   
github.com/mattn/go-isatty                          v0.0.7         v0.0.7         c2a7a6c   v0.0.7   1   
github.com/mattn/go-sqlite3                         v1.10.0        v1.10.0        c7c4067   v1.10.0  1   
github.com/microcosm-cc/bluemonday                  v1.0.2         v1.0.2         506f3da   v1.0.2   1   
github.com/mitchellh/go-homedir                     v1.1.0         v1.1.0         af06845   v1.1.0   1   
github.com/monoculum/formam                         v3.1           v3.1           0a5cdaa   v3.1     1   
github.com/nicksnyder/go-i18n                       v1.10.0        v1.10.0        0dc1626   v1.10.0  4   
github.com/pelletier/go-toml                        v1.2.0         v1.2.0         c01d127   v1.2.0   1   
github.com/pkg/errors                               v0.8.1         v0.8.1         ba968bf   v0.8.1   1   
github.com/pmezard/go-difflib                       v1.0.0         v1.0.0         792786c   v1.0.0   1   
github.com/rogpeppe/go-internal                     v1.2.2         v1.2.2         1cf9852   v1.2.2   3   
github.com/serenize/snaker                          branch master  branch master  a683aaf   a683aaf  1   
github.com/sergi/go-diff                            v1.0.0         v1.0.0         1744e29   v1.0.0   1   
github.com/shurcooL/go                              branch master  branch master  3fef8c7   3fef8c7  4   
github.com/shurcooL/go-goon                         branch master  branch master  37c2f52   37c2f52  1   
github.com/shurcooL/graphql                         branch master  branch master  d48a9a7   d48a9a7  1   
github.com/sirupsen/logrus                          v1.4.0         v1.4.0         dae0fa8   v1.4.0   1   
github.com/sourcegraph/annotate                     branch master  branch master  f4cad6c   f4cad6c  1   
github.com/sourcegraph/syntaxhighlight              branch master  branch master  bd320f5   bd320f5  1   
github.com/spf13/cobra                              v0.0.3         v0.0.3         ef82de7   v0.0.3   1   
github.com/spf13/pflag                              v1.0.3         v1.0.3         298182f   v1.0.3   1   
github.com/stretchr/testify                         v1.3.0         v1.3.0         ffdc059   v1.3.0   3   
github.com/unrolled/secure                          ^1.0.0         v1.0.0         76e6d4e   v1.0.0   1   
golang.org/x/crypto                                 branch master  branch master  b7391e9   b7391e9  3   
golang.org/x/net                                    branch master  branch master  1272bf9   1272bf9  2   
golang.org/x/sync                                   branch master  branch master  e225da7   e225da7  1   
golang.org/x/sys                                    branch master  branch master  f7bb7a8   f7bb7a8  2   
golang.org/x/tools                                  branch master  branch master  36c10c0   ae772f1  12  
google.golang.org/appengine                         v1.5.0         v1.5.0         54a98f9   v1.5.0   1   
gopkg.in/yaml.v2                                    v2.2.2         v2.2.2         51d6538   v2.2.2   1   

### config/buffalo-app.toml
name = "buffdef"
bin = "bin/buffdef"
vcs = "git"
with_pop = true
with_sqlite = false
with_dep = true
with_webpack = true
with_nodejs = true
with_yarn = true
with_docker = true
with_grifts = true
as_web = true
as_api = false

### config/buffalo-plugins.toml
[[plugin]]
  binary = "buffalo-plugins"
  go_get = "github.com/gobuffalo/buffalo-plugins"

[[plugin]]
  binary = "buffalo-pop"
  go_get = "github.com/gobuffalo/buffalo-pop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.