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

Fix renovate CI #8

Merged
merged 4 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@ jobs:
exit 1
fi
eternal-flame-AD marked this conversation as resolved.
Show resolved Hide resolved

git config user.name "gotifyci"
git config user.email "[email protected]"
eternal-flame-AD marked this conversation as resolved.
Show resolved Hide resolved

git tag "v${GO_VERSION}" -m "Bump to Go $GO_VERSION"
git push origin --tags
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about removing the newline from matchstrings like this.

      "matchStrings": [
        "^(?<currentValue>[0-9.]+)"
      ],

then the renovate stuff maybe works independent of the linebreak.

Copy link
Member Author

@eternal-flame-AD eternal-flame-AD Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.renovatebot.com/configuration-options/#matchstringsstrategy

I think all three will match every possible combination without the newline if I understand correctly.

Actually maybe not , I was just being cautious as I was reading some other configs that wrote it this way ..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem that way. I've ran this locally with the current mr it's

                 "replaceString": "1.22.4\n",

with the adjusted

                 "replaceString": "1.22.4",

So I guess currently it tries to replace with newline.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you get it running locally ... I tried every combination I can think of I always get this error. The CLI interface documentation is just ...

npx renovate --token $GITHUB_TOKEN --dry-run 1 --platform github gotify/build # and variations

 "loggerErrors": [
         {
           "name": "renovate",
           "level": 50,
           "logContext": "jyimdCaCMKo1Obj9ShKxc",
           "repository": "1",
           "err": {
             "message": "platform-unknown-error",
             "stack": "Error: platform-unknown-error\n    at Proxy.initRepo (/home/yume/.local/share/nvm/v22.9.0/lib/node_modules/renovate/lib/modules/platform/github/index.ts:512:13)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at getPlatformConfig (/home/yume/.local/share/nvm/v22.9.0/lib/node_modules/renovate/lib/workers/repository/init/apis.ts:97:26)\n    at initApis (/home/yume/.local/share/nvm/v22.9.0/lib/node_modules/renovate/lib/workers/repository/init/apis.ts:109:12)\n    at initRepo (/home/yume/.local/share/nvm/v22.9.0/lib/node_modules/renovate/lib/workers/repository/init/index.ts:53:12)\n    at Object.renovateRepository (/home/yume/.local/share/nvm/v22.9.0/lib/node_modules/renovate/lib/workers/repository/index.ts:62:14)\n    at attributes.repository (/home/yume/.local/share/nvm/v22.9.0/lib/node_modules/renovate/lib/workers/global/index.ts:218:11)\n    at start (/home/yume/.local/share/nvm/v22.9.0/lib/node_modules/renovate/lib/workers/global/index.ts:203:7)\n    at /home/yume/.local/share/nvm/v22.9.0/lib/node_modules/renovate/lib/renovate.ts:18:22"
           },
           "msg": "Repository has unknown error"
         }
       ]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker run -it -e LOG_LEVEL=debug -e RENOVATE_TOKEN=GITHUB_PERSONAL_TOKEN -v $PWD:/usr/src/app --rm renovate/renovate renovate --platform=local

I've used this, and $PWD is a locally checked out gotify/build repo.

"extractVersionTemplate": "^(?<version>.+)-bookworm$",
"depNameTemplate": "docker.io/library/golang",
"autoReplaceStringTemplate": "{{{newValue}}}",
"autoReplaceStringTemplate": "{{{newValue}}}\n",
"datasourceTemplate": "docker",
"versioningTemplate": "docker"
}
Expand Down