diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 645a0d2c..1825becc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -45,6 +45,11 @@ updates: open-pull-requests-limit: 10 - package-ecosystem: docker directory: "./dockerfiles/android" + schedule: + interval: weekly + open-pull-requests-limit: 10 + - package-ecosystem: docker + directory: "./dockerfiles/golang" schedule: interval: weekly open-pull-requests-limit: 10 \ No newline at end of file diff --git a/.gitpod/Dockerfile b/.gitpod/Dockerfile index 08911271..0306242b 100644 --- a/.gitpod/Dockerfile +++ b/.gitpod/Dockerfile @@ -1,7 +1,7 @@ # This Dockerfile is used to create a Gitpod workspace with GitHub CLI installed. # We start from the Gitpod full workspace image which includes a broad range of development tools. -FROM gitpod/workspace-full +FROM gitpod/workspace-full:2024-03-05-10-13-49 # The RUN command executes a series of commands in the new layer of the image and commits the results. # The following commands are executed: diff --git a/dockerfiles/golang/Dockerfile b/dockerfiles/golang/Dockerfile new file mode 100644 index 00000000..de5af3e7 --- /dev/null +++ b/dockerfiles/golang/Dockerfile @@ -0,0 +1,23 @@ +FROM jenkins/ssh-agent:5.25.0 as ssh-agent + +# ca-certificates because curl will need it later on for the maven installation +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Now time to install maven +ARG GOLANG_VERSION=1.21.8 +ARG TARGETARCH +ENV ARCHITECTURE=$TARGETARCH + +# Set SHELL flags for RUN commands to allow -e and pipefail +# Rationale:https://github.com/hadolint/hadolint/wiki/DL4006 +SHELL ["/bin/bash", "-eo", "pipefail", "-c"] + +RUN curl -sS -L -O --output-dir /tmp/ --create-dirs "https://go.dev/dl/go${GOLANG_VERSION}.linux-${ARCHITECTURE}.tar.gz" && \ + rm -rf /usr/local/go && tar -C /usr/local -xzf /tmp/go"$GOLANG_VERSION".linux-${ARCHITECTURE}.tar.gz && \ + rm -rf /tmp/go"$GOLANG_VERSION".linux-${ARCHITECTURE}.tar.gz + +ENV PATH=$PATH:/usr/local/go/bin + +RUN echo "PATH=${PATH}" >> /etc/environment && chown -R jenkins:jenkins "${JENKINS_AGENT_HOME}" && \ + go version diff --git a/updatecli/updatecli.d/debian.yaml b/updatecli/updatecli.d/debian.yaml new file mode 100644 index 00000000..09f6de82 --- /dev/null +++ b/updatecli/updatecli.d/debian.yaml @@ -0,0 +1,46 @@ +name: 'deps(dockerfile): bump image "debian" digest' + +scms: + default: + kind: github + spec: + user: "{{ .github.user }}" + email: "{{ .github.email }}" + owner: "{{ .github.owner }}" + repository: "{{ .github.repository }}" + token: "{{ requiredEnv .github.token }}" + username: "{{ .github.username }}" + branch: "{{ .github.branch }}" + +sources: + bookwormLatestVersion: + kind: dockerimage + name: "Get the latest Debian Bookworm Linux version" + spec: + image: "debian" + tagfilter: "bookworm-*" + versionfilter: + kind: regex + pattern: >- + bookworm-\d+$ + +targets: + debian: + name: 'deps(dockerfile): bump image "debian"' + kind: dockerfile + spec: + file: dockerfiles/sidekick/Dockerfile + instruction: + keyword: FROM + matcher: debian + sourceid: bookwormLatestVersion + +actions: + default: + kind: github/pullrequest + scmid: default + title: Bump Debian Bookworm Linux version to {{ source "bookwormLatestVersion" }} + spec: + labels: + - dependencies + - debian-bookworm diff --git a/updatecli/updatecli.d/gitpod.yaml b/updatecli/updatecli.d/gitpod.yaml new file mode 100644 index 00000000..060686e4 --- /dev/null +++ b/updatecli/updatecli.d/gitpod.yaml @@ -0,0 +1,43 @@ +--- +name: 'deps(dockerfile): bump image "gitpod/workspace-full" digest' + +scms: + default: + kind: github + spec: + user: "{{ .github.user }}" + email: "{{ .github.email }}" + owner: "{{ .github.owner }}" + repository: "{{ .github.repository }}" + token: "{{ requiredEnv .github.token }}" + username: "{{ .github.username }}" + branch: "{{ .github.branch }}" + +sources: + gitpod/workspace-full: + name: get latest image "gitpod/workspace-full" + kind: dockerimage + spec: + image: gitpod/workspace-full + tagfilter: '\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}' + +targets: + gitpod/workspace-full: + name: 'deps(dockerfile): bump image "gitpod/workspace-full"' + kind: dockerfile + spec: + file: .gitpod/Dockerfile + instruction: + keyword: FROM + matcher: gitpod/workspace-full + sourceid: gitpod/workspace-full + +actions: + default: + kind: github/pullrequest + scmid: default + title: Bump Gitpod version to {{ source "gitpod/workspace-full" }} + spec: + labels: + - dependencies + - debian-bookworm \ No newline at end of file diff --git a/updatecli/updatecli.d/ssh-agent.yaml b/updatecli/updatecli.d/ssh-agent.yaml index 85dd72eb..bef372b4 100644 --- a/updatecli/updatecli.d/ssh-agent.yaml +++ b/updatecli/updatecli.d/ssh-agent.yaml @@ -23,6 +23,7 @@ sources: versionfilter: kind: semver pattern: '>=5.20.0' + targets: jenkins/python-agent: name: '[jenkins/ssh-agent] Bump Docker image tag in "dockerfiles/python/Dockerfile"' @@ -74,6 +75,16 @@ targets: matcher: jenkins/ssh-agent sourceid: jenkins/ssh-agent scmid: default + jenkins/golang-agent: + name: '[jenkins/ssh-agent] Bump Docker image tag in "dockerfiles/golang/Dockerfile"' + kind: dockerfile + spec: + file: dockerfiles/golang/Dockerfile + instruction: + keyword: FROM + matcher: jenkins/ssh-agent + sourceid: jenkins/ssh-agent + scmid: default default-agent: name: '[jenkins/ssh-agent] Bump Docker image tag in "docker-compose.yaml"' kind: yaml @@ -94,3 +105,13 @@ targets: key: $.services.default_agent.image sourceid: jenkins/ssh-agent scmid: default + +actions: + default: + kind: github/pullrequest + scmid: default + title: Bump ssh-agent version to {{ source "jenkins/ssh-agent" }} + spec: + labels: + - dependencies + - debian-bookworm