Skip to content
Snippets Groups Projects
Closed Gitlab Hugo template fails CI/CD build with "latest" docker version
  • View options
  • Gitlab Hugo template fails CI/CD build with "latest" docker version

  • View options
  • Closed Issue created by Rory Meyer

    Afternoon,

    I used Gitlab's "New Project" > "Create from template" > "Pages/Hugo" tool. I followed the README's instructions to rename the project namespace and to change it in the config file. I've cloned the project and built it locally using Hugo with success. When I use the gitlab pipeline it fails with error:

    Running with gitlab-runner 14.9.0~beta.68.g1283960c (1283960c)
      on green-1.shared.runners-manager.gitlab.com/default JLgUopmM
    Preparing the "docker+machine" executor
    00:09
    Using Docker executor with image registry.gitlab.com/pages/hugo:0.96.0 ...
    Authenticating with credentials from job payload (GitLab Registry)
    Pulling docker image registry.gitlab.com/pages/hugo:0.96.0 ...
    Using docker image sha256:42ceee9caae61ca21f7c230700b5e68f9ccfe84d3a9b3aa3a386186ca91046d6 for registry.gitlab.com/pages/hugo:0.96.0 with digest registry.gitlab.com/pages/hugo@sha256:e774dc9db5d515e523b0163560c05f35f67f9a3a5f98a471d1cf514037367167 ...
    Preparing environment
    00:01
    Running on runner-jlguopmm-project-35131488-concurrent-0 via runner-jlguopmm-shared-1649244007-ffcf1695...
    Getting source from Git repository
    00:02
    $ eval "$CI_PRE_CLONE_SCRIPT"
    Fetching changes with git depth set to 20...
    Initialized empty Git repository in /builds/openais/open-ais-blog/.git/
    Created fresh repository.
    Checking out fe4c0093 as master...
    Updating/initializing submodules recursively with git depth set to 20...
    Executing "step_script" stage of the job script
    00:01
    Using docker image sha256:42ceee9caae61ca21f7c230700b5e68f9ccfe84d3a9b3aa3a386186ca91046d6 for registry.gitlab.com/pages/hugo:0.96.0 with digest registry.gitlab.com/pages/hugo@sha256:e774dc9db5d515e523b0163560c05f35f67f9a3a5f98a471d1cf514037367167 ...
    $ hugo
    Start building sites … 
    hugo v0.96.0-2fd4a7d3d6845e75f8b8ae3a2a7bd91438967bbb linux/amd64 BuildDate=2022-03-26T09:15:58Z VendorInfo=gohugoio
    ERROR 2022/04/06 11:20:59 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/openais/open-ais-blog/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState
    ERROR 2022/04/06 11:20:59 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/openais/open-ais-blog/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState
    ERROR 2022/04/06 11:20:59 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/openais/open-ais-blog/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState
    ERROR 2022/04/06 11:20:59 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/openais/open-ais-blog/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState
    Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/openais/open-ais-blog/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState
    Total in 84 ms
    Cleaning up project directory and file based variables
    00:01
    ERROR: Job failed: exit code 255

    When I change the .gitlab-ci.yml to use an older image (chosen arbitrarily) it works:

    image: registry.gitlab.com/pages/hugo:0.91.0

    I've seen a couple issues about this but I'm totally new to Hugo and Gitlab's CI/CD so I can't tell if it's the same. Thought I should mention it anyway.

    Edited by Achilleas Pipinellis

    Linked items 0

  • Link items together to show that they're related or that one is blocking others.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading