Swiss Meetup exercise pipeline fails for me

I am following along with the video. You can see their pipeline results at approximately 41:00.

I am working in gitlab.com with the web IDE. The presenter adds a .gitlab-ci.yml file and commits it. The pipeline fails the first time on purpose. After removing a comment, it works. Mine does not. Their pipeline log has at line 26:

  • $ go fmt $(go list ./… | grep -v /vendor/)
  • main.go
  • tanuki.go
  • tanuki_test.go
  • version.go

Mine is line 25, and the next lines have the error message 4 times.

I think this means I am missing some files in my project. How can I add them to my gitlab.com project?

The reason they are at line 26 is because they have line 3:

  • Resolving secrets.

I have tried googling this, but the results are almost entirely for other websites, not GitLab. Plus, the recommendation sounds like a terminal command, and I am working on the web right now.

Is there anything else I can provide?

To get it working just do the following:

  • open “.gitlab-ci.yml” file
  • replace this line:
    image: golang:latest
    with this one:
    image: golang:1.14

It is related to this “go 1.14” setting in “go.mod” file.

Or you can try to update the version of GO with the latest one in “go.mod” file.

@rshmyr Thanks for sharing and bringing it to my attention. @karljjenkinson Sorry, I missed this question. Suggest to tag me when it comes to questions for this specific workshop.

The first pipeline and fixing the code works as expected. Pipeline · Developer Evangelism at GitLab / workshops / 1. Swiss Meetup 2021 January · GitLab

Reading semver, it is the secondary exercise with the version test. Pipeline · Developer Evangelism at GitLab / workshops / 1. Swiss Meetup 2021 January · GitLab

I’ve logged an issue for visibility. Version test exercise does not work; semver breaks on go.mod sum (#3) · Issues · Developer Evangelism at GitLab / workshops / 1. Swiss Meetup 2021 January · GitLab

You can manually add go.sum to your repository from this MR: Add missing go.sum for go build (!121) · Merge requests · Developer Evangelism at GitLab / workshops / 1. Swiss Meetup 2021 January · GitLab I’ve verified this working.

Cheers,
Michael