okkur / syna-start

Clonable starter repository for a Syna theme based website
Apache License 2.0
27 stars 59 forks source link

syna-start does not work at GitLab-CI #37

Open certik opened 4 years ago

certik commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?: bug

What happened:

Fails to properly build with the latest extended Hugo in a docker image at GitLab CI.

How to reproduce it (as minimally and precisely as possible):

I discovered this at my private website, then traced it even to the latest master of syna-start (09caeb5c8d1c27fd76e0165e7964a113acf4bff2). If you push this master to GitLab, as I have done here:

https://gitlab.com/certik/syna-start

Then create a branch and add a minimal .gitlab-ci.yml and open an MR:

https://gitlab.com/certik/syna-start/-/merge_requests/1

The build will succeed, but the generated files are missing content. Here is the build log:

https://gitlab.com/certik/syna-start/-/jobs/640973648

In the build log, I cat the generated html file at line 43: https://gitlab.com/certik/syna-start/-/jobs/640973648#L43, and as you can see, that html file is incorrect. It doesn't contain any of the content of syna-start.

Anything else we need to know?:

I am using the monachus/hugo Docker image. If I run the image locally, and copy over the website and run hugo from it, then it builds properly.... That makes this extremely hard to track down. I don't know how else to reproduce it besides what I have done above with gitlab.com itself. I can't think of any differences to if I run the docker locally.

Any ideas how to debug this? I spent about 5h debugging this in various ways (tried --debug, --templateMetrics, -DEF, -v etc.). I can't see any difference to my local docker (or non-docker) setup.

But since it fails at GitLab-CI, I have to figure out how to fix it. Other themes seem to work, I've been using Hugo at GitLab in several other projects. I suspect this might be a bug in Hugo itself, but I am posting here first if you have any ideas what could be happening.

Environment:

stp-ip commented 4 years ago

Haven't had time to dig into this. Still on my list of things to debug.

certik commented 4 years ago

@stp-ip thank you!