Skip to content

Commit

Permalink
QD-8148 Set up renovate for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Jan 17, 2024
1 parent b3b9031 commit 066803b
Show file tree
Hide file tree
Showing 35 changed files with 884 additions and 652 deletions.
35 changes: 35 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"regexManagers": [
{
"fileMatch": [
"(^|/)Dockerfile$"
],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\sENV .*?_VERSION=\"?(?<currentValue>.*?)\"?\\s"
],
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
}
],
"packageRules": [
{
"datasources": [
"repology"
],
"packagePatterns": [
"^debian_11/"
],
"separateMajorMinor": false,
"groupName": "debian packages",
"groupSlug": "debian"
}
],
"includePaths": [
"2023.2/**",
"2023.3/**",
"next/**"
]
}
33 changes: 25 additions & 8 deletions 2023.3/android-community/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ ARG NODE_TAG="16-bullseye-slim"
FROM node:$NODE_TAG AS node_base
FROM debian:$BASE_TAG

# renovate: datasource=repology depName=debian_11/ca-certificates versioning=loose
ENV CA_CERTIFICATES_VERSION="20210119"
# renovate: datasource=repology depName=debian_11/curl versioning=loose
ENV CURL_VERSION="7.74.0-1.3+deb11u11"
# renovate: datasource=repology depName=debian_11/fontconfig versioning=loose
ENV FONTCONFIG_VERSION="2.13.1-4.2"
# renovate: datasource=repology depName=debian_11/git versioning=loose
ENV GIT_VERSION="1:2.30.2-1+deb11u2"
# renovate: datasource=repology depName=debian_11/git-lfs versioning=loose
ENV GIT_LFS_VERSION="2.13.2-1+b5"
# renovate: datasource=repology depName=debian_11/gnupg2 versioning=loose
ENV GNUPG2_VERSION="2.2.27-2+deb11u2"
# renovate: datasource=repology depName=debian_11/locales versioning=loose
ENV LOCALES_VERSION="2.31-13+deb11u6"
# renovate: datasource=repology depName=debian_11/procps versioning=loose
ENV PROCPS_VERSION="2:3.3.17-5"

ENV HOME="/root" \
LC_ALL="en_US.UTF-8" \
QODANA_DIST="/opt/idea" \
Expand All @@ -18,14 +35,14 @@ RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean && \
mkdir -m 777 -p /opt $QODANA_DATA $QODANA_CONF && apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates=20210119 \
curl=7.74.0-1.3+deb11u11 \
fontconfig=2.13.1-4.2 \
git=1:2.30.2-1+deb11u2 \
git-lfs=2.13.2-1+b5 \
gnupg2=2.2.27-2+deb11u2 \
locales=2.31-13+deb11u6 \
procps=2:3.3.17-5 && \
ca-certificates=$CA_CERTIFICATES_VERSION \
curl=$CURL_VERSION \
fontconfig=$FONTCONFIG_VERSION \
git=$GIT_VERSION \
git-lfs=$GIT_LFS_VERSION \
gnupg2=$GNUPG2_VERSION \
locales=$LOCALES_VERSION \
procps=$PROCPS_VERSION && \
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && locale-gen && \
apt-get autoremove -y && apt-get clean && \
chmod 777 -R $HOME && \
Expand Down
33 changes: 25 additions & 8 deletions 2023.3/base/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ ARG NODE_TAG="16-bullseye-slim"
FROM node:$NODE_TAG AS node_base
FROM debian:$BASE_TAG

# renovate: datasource=repology depName=debian_11/ca-certificates versioning=loose
ENV CA_CERTIFICATES_VERSION="20210119"
# renovate: datasource=repology depName=debian_11/curl versioning=loose
ENV CURL_VERSION="7.74.0-1.3+deb11u11"
# renovate: datasource=repology depName=debian_11/fontconfig versioning=loose
ENV FONTCONFIG_VERSION="2.13.1-4.2"
# renovate: datasource=repology depName=debian_11/git versioning=loose
ENV GIT_VERSION="1:2.30.2-1+deb11u2"
# renovate: datasource=repology depName=debian_11/git-lfs versioning=loose
ENV GIT_LFS_VERSION="2.13.2-1+b5"
# renovate: datasource=repology depName=debian_11/gnupg2 versioning=loose
ENV GNUPG2_VERSION="2.2.27-2+deb11u2"
# renovate: datasource=repology depName=debian_11/locales versioning=loose
ENV LOCALES_VERSION="2.31-13+deb11u6"
# renovate: datasource=repology depName=debian_11/procps versioning=loose
ENV PROCPS_VERSION="2:3.3.17-5"

ENV HOME="/root" \
LC_ALL="en_US.UTF-8" \
QODANA_DIST="/opt/idea" \
Expand All @@ -18,14 +35,14 @@ RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean && \
mkdir -m 777 -p /opt $QODANA_DATA $QODANA_CONF && apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates=20210119 \
curl=7.74.0-1.3+deb11u11 \
fontconfig=2.13.1-4.2 \
git=1:2.30.2-1+deb11u2 \
git-lfs=2.13.2-1+b5 \
gnupg2=2.2.27-2+deb11u2 \
locales=2.31-13+deb11u6 \
procps=2:3.3.17-5 && \
ca-certificates=$CA_CERTIFICATES_VERSION \
curl=$CURL_VERSION \
fontconfig=$FONTCONFIG_VERSION \
git=$GIT_VERSION \
git-lfs=$GIT_LFS_VERSION \
gnupg2=$GNUPG2_VERSION \
locales=$LOCALES_VERSION \
procps=$PROCPS_VERSION && \
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && locale-gen && \
apt-get autoremove -y && apt-get clean && \
chmod 777 -R $HOME && \
Expand Down
7 changes: 6 additions & 1 deletion 2023.3/base/debian.js.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ ARG NODE_TAG="16-bullseye-slim"
FROM node:$NODE_TAG AS node_base
FROM debianbase

# renovate: datasource=npm depName=eslint
ENV ESLINT_VERSION="8.47.0"
# renovate: datasource=npm depName=pnpm
ENV PNPM_VERSION="8.7.1"

ENV PATH="/opt/yarn/bin:$PATH"
COPY --from=node_base /usr/local/bin/node /usr/local/bin/
COPY --from=node_base /usr/local/include/node /usr/local/include/node
Expand All @@ -13,6 +18,6 @@ RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
node --version && \
npm --version && \
yarn --version && \
npm install -g eslint@v8.47.0 pnpm@v8.7.1 && npm config set update-notifier false && \
npm install -g eslint@$ESLINT_VERSION pnpm@$PNPM_VERSION && npm config set update-notifier false && \
chmod 777 -R "$HOME/.npm" "$HOME/.npmrc" && \
mkdir -p -m 777 "$HOME/.m2" "$HOME/.m2/repository"
189 changes: 10 additions & 179 deletions 2023.3/base/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,50 +1,11 @@
group "default" {
targets = ["debian", "debian-js", "python", "python-js", "dotnet", "go", "js", "php", "rust", "ruby", "cpp", "cdnet"]
targets = ["debian", "debian-js", "python", "python-js", "other"]
}

variable "NODE_TAG" {
default = "16-bullseye-slim"
}

variable "BASE_TAG" {
default = "bullseye-slim"
}

# TODO: uncomment me when Docker is updated to the latest stable version
#target "other" {
# name = "${edition}-base-233"
# matrix = {
# edition = ["dotnet", "go", "js", "php", "rust", "ruby"]
# }
# args = {
# DOTNET_TAG = "6.0-bullseye-slim"
# GO_TAG = "1.19-bullseye"
# NODE_TAG = "${NODE_TAG}"
# PHP_TAG = "8.1-cli-bullseye"
# RUBY_TAG = "3.0-bullseye"
# RUST_TAG = "1.71-slim-bullseye"
# COMPOSER_TAG="2.5.1"
# }
# tags = [
# "registry.jetbrains.team/p/sa/containers/qodana:${edition}-base-233"
# ]
# platforms = ["linux/amd64", "linux/arm64"]
# dockerfile = "${edition}.Dockerfile"
# cache-from = [
# "type=local,src=docker_cache/other",
# ]
# cache-to = [
# "type=local,dest=docker_cache/other,mode=max",
# ]
#}

target "debian" {
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:debian-base-233"
]
args {
BASE_TAG = "${BASE_TAG}"
}
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "debian.Dockerfile"
cache-from = [
Expand All @@ -59,9 +20,6 @@ target "debian-js" {
contexts = {
debianbase = "target:debian"
}
args = {
NODE_TAG = "${NODE_TAG}"
}
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:debian-js-base-233"
]
Expand Down Expand Up @@ -96,9 +54,6 @@ target "python-js" {
contexts = {
pythonbase = "target:python"
}
args = {
NODE_TAG = "${NODE_TAG}"
}
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:python-js-base-233"
]
Expand All @@ -112,144 +67,20 @@ target "python-js" {
]
}

target "dotnet" {
args = {
DOTNET_TAG = "6.0-bullseye-slim"
NODE_TAG = "${NODE_TAG}"
}
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:dotnet-base-233"
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "dotnet.Dockerfile"
cache-from = [
"type=local,src=docker_cache/dotnet",
]
cache-to = [
"type=local,dest=docker_cache/dotnet,mode=max",
]
}

target "go" {
args = {
GO_TAG = "1.21-bullseye"
NODE_TAG = "${NODE_TAG}"
}
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:go-base-233"
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "go.Dockerfile"
cache-from = [
"type=local,src=docker_cache/go",
]
cache-to = [
"type=local,dest=docker_cache/go,mode=max",
]
}

target "js" {
args = {
NODE_TAG = "${NODE_TAG}"
}
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:js-base-233"
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "js.Dockerfile"
cache-from = [
"type=local,src=docker_cache/js",
]
cache-to = [
"type=local,dest=docker_cache/js,mode=max",
]
}

target "php" {
args = {
PHP_TAG = "8.2-cli-bullseye"
NODE_TAG = "${NODE_TAG}"
COMPOSER_TAG="2.6.3"
target "other" {
name = "${edition}-base-233"
matrix = {
edition = ["dotnet", "go", "js", "php", "rust", "cpp", "cdnet"]
}
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:php-base-233"
"registry.jetbrains.team/p/sa/containers/qodana:${edition}-base-233"
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "php.Dockerfile"
dockerfile = "${edition}.Dockerfile"
cache-from = [
"type=local,src=docker_cache/php",
"type=local,src=docker_cache/other",
]
cache-to = [
"type=local,dest=docker_cache/php,mode=max",
"type=local,dest=docker_cache/other,mode=max",
]
}

target "rust" {
args = {
RUST_TAG = "1.71-slim-bullseye"
NODE_TAG = "${NODE_TAG}"
}
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:rust-base-233"
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "rust.Dockerfile"
cache-from = [
"type=local,src=docker_cache/rust",
]
cache-to = [
"type=local,dest=docker_cache/rust,mode=max",
]
}

target "ruby" {
args = {
RUBY_TAG = "3.0-bullseye"
NODE_TAG = "${NODE_TAG}"
}
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:ruby-base-233"
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "ruby.Dockerfile"
cache-from = [
"type=local,src=docker_cache/ruby",
]
cache-to = [
"type=local,dest=docker_cache/ruby,mode=max",
]
}

target "cpp" {
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:cpp-base-233"
]
args {
BASE_TAG = "${BASE_TAG}"
}
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "cpp.Dockerfile"
cache-from = [
"type=local,src=docker_cache/cpp",
]
cache-to = [
"type=local,dest=docker_cache/cpp,mode=max",
]
}

target "cdnet" {
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:cdnet-base-233"
]
args {
BASE_TAG = "${BASE_TAG}"
}
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "dotnet.community.Dockerfile"
cache-from = [
"type=local,src=docker_cache/cdnet",
]
cache-to = [
"type=local,dest=docker_cache/cdnet,mode=max",
]
}
}
Loading

0 comments on commit 066803b

Please sign in to comment.