Skip to content

Commit dcd40fa

Browse files
authored
Merge branch 'weekly' into fixes
2 parents a7324fa + 8ea4cc8 commit dcd40fa

File tree

8 files changed

+84
-56
lines changed

8 files changed

+84
-56
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
GHCR_USERNAME=jenkins-docs
22
IMAGE_PREFIX=ghcr.io
3-
BRANCH_SUFFIX=
3+
BRANCH_SUFFIX=weekly

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ updates:
6262
directory: "./dockerfiles/dotnet"
6363
schedule:
6464
interval: weekly
65-
open-pull-requests-limit: 10
65+
open-pull-requests-limit: 10

.github/workflows/updatecli.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
# It uses the "apply" command of updatecli with the specified config and values files
3838
# The GitHub token is passed as an environment variable
3939
- name: Run Updatecli in Apply mode
40-
if: github.ref == 'refs/heads/main'
40+
if: github.ref == 'refs/heads/weekly'
4141
run: updatecli apply --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml
4242
env:
4343
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

dockerfiles/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# This Dockerfile is used to create a Jenkins server with a specific version and pre-configured settings.
22

33
# We start by defining an ARG for the Jenkins version. This allows us to easily change the version of Jenkins we want to use.
4-
ARG JENKINS_VERSION=2.492.3
4+
ARG JENKINS_VERSION=2.505-jdk21
5+
56
# We then use the official Jenkins image with the specified version as our base image.
6-
FROM jenkins/jenkins:"${JENKINS_VERSION}"-lts-jdk21
7+
FROM jenkins/jenkins:"${JENKINS_VERSION}"-jdk21
78

89
# We switch to the root user to have the necessary permissions for the upcoming operations.
910
USER root

dockerfiles/plugins.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ant:513.vde9e7b_a_0da_0f
22
antisamy-markup-formatter:173.v680e3a_b_69ff3
33
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
4-
bootstrap5-api:5.3.3-2
4+
bootstrap5-api:5.3.3-3
55
bouncycastle-api:2.30.1.80-256.vf98926042a_9b_
66
branch-api:2.1217.v43d8b_b_d8b_2c7
77
build-timeout:1.38

updatecli/updatecli.d/jenkins-lts.yaml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
# This YAML configuration defines a pipeline for automatically updating the Jenkins Weekly version
3+
# in a Dockerfile. It utilizes various components such as sources, conditions, targets, and actions
4+
# to achieve this automation.
5+
6+
# Define the pipeline's name and the SCM (Source Control Management) configurations.
7+
name: Bump Jenkins' Weekly version in the controller Dockerfile
8+
9+
scms:
10+
default:
11+
kind: github
12+
spec:
13+
user: "{{ .github.user }}" # GitHub user for authentication
14+
email: "{{ .github.email }}" # Email associated with the GitHub user
15+
owner: "{{ .github.owner }}" # Owner of the GitHub repository
16+
repository: "{{ .github.repository }}" # Name of the GitHub repository
17+
token: "{{ requiredEnv .github.token }}" # GitHub token for authentication
18+
username: "{{ .github.username }}" # GitHub username
19+
branch: "{{ .github.branch }}" # Branch to apply changes
20+
21+
# Define the sources for the pipeline. These are the origins of data used in the pipeline.
22+
sources:
23+
JenkinsLatestWeekly:
24+
name: Get the latest Jenkins Weekly version
25+
kind: jenkins
26+
spec:
27+
release: weekly # Specifies that the weekly release of Jenkins is to be fetched
28+
JenkinsLatestWeeklyJDK17:
29+
name: Get the latest Jenkins Weekly version with JDK 17
30+
kind: jenkins
31+
spec:
32+
release: weekly # Specifies that the weekly release of Jenkins is to be fetched
33+
jdk: 17 # Specifies JDK 17 for the Jenkins version
34+
transformers:
35+
- addsuffix: "-jdk17" # Adds a suffix to the version to denote JDK 17
36+
37+
# Define conditions that must be met for the pipeline to proceed.
38+
conditions:
39+
# Test that the latest Weekly Jenkins version exists
40+
jenkinsWeekly:
41+
kind: jenkins
42+
sourceid: JenkinsLatestWeekly # Links this condition to the JenkinsLatestWeekly source
43+
spec:
44+
release: weekly
45+
# Test that the docker image exists
46+
dockerImage:
47+
kind: dockerimage
48+
sourceid: JenkinsLatestWeekly # Links this condition to the JenkinsLatestWeekly source
49+
spec:
50+
image: "jenkins/jenkins" # Specifies the Docker image to check
51+
transformers:
52+
- addsuffix: "-jdk17" # Adds a suffix to denote JDK 17
53+
54+
# Define the targets for the pipeline. These are the end goals the pipeline aims to achieve.
55+
targets:
56+
setJenkinsLatestWeekly:
57+
kind: dockerfile
58+
sourceid: JenkinsLatestWeeklyJDK17 # Links this target to the JenkinsLatestWeeklyJDK17 source
59+
spec:
60+
file: dockerfiles/Dockerfile # Specifies the Dockerfile to be updated
61+
instruction:
62+
keyword: "ARG" # Specifies the Dockerfile instruction to update
63+
matcher: "JENKINS_VERSION" # Specifies the argument to be updated
64+
name: "[jenkins-controller] Bump Jenkins Weekly version in dockerfiles/Dockerfile"
65+
scmid: default # Links this target to the default SCM configuration
66+
67+
# Define the actions to be taken once the conditions are met and targets are ready.
68+
actions:
69+
default:
70+
kind: github/pullrequest
71+
scmid: default # Links this action to the default SCM configuration
72+
title: Update Jenkins Weekly versions to {{ source "JenkinsLatestWeekly" }}-jdk17 in the controller Dockerfile
73+
spec:
74+
labels:
75+
- dependencies # Label for the pull request
76+
- chore # Label for the pull request

updatecli/values.github-action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ github:
33
email: "41898282+github-actions[bot]@users.noreply.github.com"
44
username: "github-actions"
55
token: "UPDATECLI_GITHUB_TOKEN"
6-
branch: "main"
6+
branch: "weekly"
77
owner: "jenkins-docs"
88
repository: "quickstart-tutorials"

0 commit comments

Comments
 (0)