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 support for xgo #4276

Merged
merged 8 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"pnpm-lock.yaml",
"**/node_modules/**/*",
"cmd/server/docs/docs.go",
"renovate.json",
// TODO: remove the following
"docs/**/*.js",
"docs/**/*.ts"
Expand Down
10 changes: 6 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>woodpecker-ci/renovate-config"],
"automergeType": "pr",
"enabledManagers": ["woodpecker"],
"customManagers": [
{
"customType": "regex",
"fileMatch": ["shared/constant/constant.go"],
"matchStrings": [
"//\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+DefaultCloneImage = \"docker.io/woodpeckerci/plugin-git:(?<currentValue>.*)\""
"//\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+DefaultClonePlugin = \"docker.io/woodpeckerci/plugin-git:(?<currentValue>.*)\""
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}
Expand All @@ -30,7 +31,7 @@
},
{
"groupName": "golang-lang",
"matchPackagePatterns": ["^golang$", "xgo"],
"matchPackagePatterns": ["^golang$"],
"matchUpdateTypes": ["minor", "patch"]
},
{
Expand Down Expand Up @@ -61,9 +62,10 @@
"matchFileNames": ["docs/**/package.json"]
},
{
"description": "Extract version from xgo container tags",
"matchDatasources": ["docker"],
"matchPackagePatterns": ["xgo"],
"versioning": "regex:^go-(?<major>\\d+)?(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))$"
"matchPackagePatterns": ["techknowlogick/xgo"],
"versioning": "regex:^go-(?<major>\\d+)\\.(?<minor>\\d+)\\.x$"
}
]
}
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ CGO_ENABLED ?= 1 # only used to compile server

HAS_GO = $(shell hash go > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
ifeq ($(HAS_GO),GO)
XGO_VERSION ?= go-1.20.x
# renovate: datasource=docker depName=docker.io/techknowlogick/xgo
XGO_VERSION ?= go-1.22.x
CGO_CFLAGS ?= $(shell go env CGO_CFLAGS)
endif
CGO_CFLAGS ?=
Expand Down
17 changes: 3 additions & 14 deletions docker/Dockerfile.make
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
FROM docker.io/golang:1.23-alpine3.19 as golang_image
FROM docker.io/node:23-alpine3.19
FROM docker.io/golang:1.23-alpine as golang_image
FROM docker.io/node:23-alpine

# renovate: datasource=repology depName=alpine_3_19/make versioning=loose
ENV MAKE_VERSION="4.4.1-r2"
# renovate: datasource=repology depName=alpine_3_19/gcc versioning=loose
ENV GCC_VERSION="13.2.1_git20231014-r0"
# renovate: datasource=repology depName=alpine_3_19/binutils-gold versioning=loose
ENV BINUTILS_GOLD_VERSION="2.41-r0"
# renovate: datasource=repology depName=alpine_3_19/musl-dev versioning=loose
ENV MUSL_DEV_VERSION="1.2.4_git20230717-r4"
# renovate: datasource=repology depName=alpine_3_19/protoc versioning=loose
ENV PROTOC_VERSION="24.4-r0"

RUN apk add --no-cache --update make=${MAKE_VERSION} gcc=${GCC_VERSION} binutils-gold=${BINUTILS_GOLD_VERSION} musl-dev=${MUSL_DEV_VERSION} protoc=${PROTOC_VERSION} && \
RUN apk add --no-cache --update make gcc binutils-gold musl-dev protoc && \
corepack enable

# Build packages.
Expand Down