Skip to content

Commit bf13933

Browse files
committed
2 parents 96912e3 + 3793d15 commit bf13933

File tree

17 files changed

+62
-42
lines changed

17 files changed

+62
-42
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ updates:
4040
open-pull-requests-limit: 10
4141
- package-ecosystem: docker
4242
directory: "./dockerfiles/sidekick"
43+
schedule:
44+
interval: weekly
45+
open-pull-requests-limit: 10
46+
- package-ecosystem: docker
47+
directory: "./dockerfiles/agent-discovery"
4348
schedule:
4449
interval: weekly
4550
open-pull-requests-limit: 10
@@ -52,4 +57,4 @@ updates:
5257
directory: "./dockerfiles/golang"
5358
schedule:
5459
interval: weekly
55-
open-pull-requests-limit: 10
60+
open-pull-requests-limit: 10

.github/workflows/anchore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: cd ./dockerfiles/ && docker build . --file Dockerfile --tag localbuild/testimage:latest
3939

4040
- name: Run the Anchore Grype scan action
41-
uses: anchore/scan-action@f2ba85e044c8f5e5014c9a539328a9c78d3bfa49
41+
uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
4242
id: scan
4343
with:
4444
path: "."

.github/workflows/updatecli.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
# This step installs Updatecli in the runner using the updatecli-action
2525
- name: Install Updatecli in the runner
26-
uses: updatecli/updatecli-action@v2.70.0
26+
uses: updatecli/updatecli-action@v2.75.0
2727

2828
# This step runs Updatecli in Dry Run mode
2929
# It uses the "diff" command of updatecli with the specified config and values files

.gitpod/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This Dockerfile is used to create a Gitpod workspace with GitHub CLI installed.
22

33
# We start from the Gitpod full workspace image which includes a broad range of development tools.
4-
FROM gitpod/workspace-full:2024-11-20-08-19-55
4+
FROM gitpod/workspace-full:2025-01-08-07-57-03
55

66
# The RUN command executes a series of commands in the new layer of the image and commits the results.
77
# The following commands are executed:

build-docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ services:
6262
timeout: 10s
6363
retries: 5
6464
default_agent:
65-
image: jenkins/ssh-agent:6.2.0
65+
image: jenkins/ssh-agent:6.6.0
6666
container_name: desktop-jenkins_agent-1
6767
profiles:
6868
- default

docker-compose.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ services:
5959
- python
6060
- node
6161
- android
62-
- multi
6362
- golang
6463
- default
6564
# The CASC_RELOAD_TOKEN environment variable is used by the Jenkins controller to restart the Configuration as Code (JCasc) plugin configuration.
@@ -109,7 +108,7 @@ services:
109108
# The healthcheck command for each agent checks if the authorized_keys file exists in the /home/jenkins/.ssh directory.
110109
# The /home/jenkins/.ssh directory in each agent container is mapped to the agent-ssh-dir volume on the host.
111110
default_agent:
112-
image: jenkins/ssh-agent:6.2.0
111+
image: jenkins/ssh-agent:6.6.0
113112
container_name: desktop-jenkins_agent-1
114113
profiles:
115114
- default

dockerfiles/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.479.1
4+
ARG JENKINS_VERSION=2.479.3
55

66
# We then use the official Jenkins image with the specified version as our base image.
77
FROM jenkins/jenkins:"${JENKINS_VERSION}"

dockerfiles/agent-discovery/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This Dockerfile is used to prepare a Debian-based Docker image with several utilities installed.
22

33
# We start from the Debian 'bookworm' image dated 2023-11-20.
4-
FROM debian:bookworm-20240311-slim as prepare-stage
4+
FROM debian:bookworm-20241223-slim as prepare-stage
55

66
# Copy all shell scripts from the current directory to /usr/local/bin/ in the image.
77
COPY *sh /usr/local/bin/

dockerfiles/agent-discovery/find-name.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,31 @@ while true; do
7979
sleep 2 # Wait for 5 seconds before the next iteration of the loop.
8080
done
8181

82+
## Check if jenkins_controller is reachable, otherwise fall back to multi_jenkins_controller
83+
JENKINS_CONTROLLER="jenkins_controller"
84+
if ! curl -s -f --max-time 60 "http://${JENKINS_CONTROLLER}:8080/login" > /dev/null; then
85+
echo "Primary controller not reachable, falling back to multi controller..."
86+
JENKINS_CONTROLLER="multi_jenkins_controller"
87+
if ! curl -s -f --max-time 60 "http://${JENKINS_CONTROLLER}:8080/login" > /dev/null; then
88+
echo "Error: Neither primary nor multi controller is reachable"
89+
exit 1
90+
fi
91+
fi
92+
8293
# Check If Jenkins is running or not
8394
# If the message is found, awk exits with a non-zero status (1), and the loop continues.
8495
# If the message is not found, the loop exits, and the "Jenkins is running" message is displayed.
85-
timeout 60 bash -c 'until curl -s -f http://jenkins_controller:8080/login > /dev/null; do sleep 5; done' && echo "Jenkins is running" || echo "Jenkins is not running"
96+
timeout 60 bash -c "until curl -s -f http://${JENKINS_CONTROLLER}:8080/login > /dev/null; do sleep 5; done" && echo "Jenkins is running" || echo "Jenkins is not running"
97+
# The colon (:) is a no-op command in Bash, which means it does nothing and always returns a true exit status. It is often used as a placeholder or to evaluate expressions without executing any commands.
98+
# The ${JENKINS_STARTUP_TIMEOUT:=60} part is a parameter expansion. It checks if the JENKINS_STARTUP_TIMEOUT variable is set and not null. If it is not set, it assigns the value 60 to JENKINS_STARTUP_TIMEOUT
99+
: "${JENKINS_STARTUP_TIMEOUT:=60}" # Default to 60 seconds if not set
100+
timeout "${JENKINS_STARTUP_TIMEOUT}" bash -c "until curl -s -f http://${JENKINS_CONTROLLER}:8080/login > /dev/null; do sleep 5; done" && echo "Jenkins is running" || echo "Jenkins is not running"
101+
86102
echo "Jenkins is ready"
87103
# Get the Jenkins version
88-
JENKINS_VERSION=$(curl -s -I -k http://admin:admin@jenkins_controller:8080 | grep -i '^X-Jenkins:' | awk '{print $2}')
104+
JENKINS_VERSION=$(curl -s -I -k http://admin:admin@$JENKINS_CONTROLLER:8080 | grep -i '^X-Jenkins:' | awk '{print $2}')
89105
echo "Jenkins version is: $JENKINS_VERSION"
90106

91107
# Use the token in the curl command to reload the configuration
92-
# curl -X POST "http://admin:admin@jenkins_controller:8080/reload-configuration-as-code/?casc-reload-token=$JCASC_TOKEN"
93-
curl -X POST "http://admin:admin@jenkins_controller:8080/reload-configuration-as-code/?casc-reload-token=thisisnotsecure"
108+
# curl -X POST "http://admin:admin@$JENKINS_CONTROLLER:8080/reload-configuration-as-code/?casc-reload-token=$JCASC_TOKEN"
109+
curl -X POST "http://admin:admin@$JENKINS_CONTROLLER:8080/reload-configuration-as-code/?casc-reload-token=thisisnotsecure"

dockerfiles/android/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jenkins/ssh-agent:6.2.0 as ssh-agent
1+
FROM jenkins/ssh-agent:6.6.0 as ssh-agent
22

33
# ca-certificates because curl uses certificates from ca-certificates
44
RUN apt-get update && apt-get install -y --no-install-recommends adb build-essential ca-certificates curl file git python3 python3-pip unzip

0 commit comments

Comments
 (0)