Skip to content

Commit d61868e

Browse files
gounthardependabot[bot]actions-user
authored
Add cpp profile (#1005)
* chore(deps): bump debian in /dockerfiles/sidekick Bumps debian from bookworm-20231218 to bookworm-20240110. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(deps): bump updatecli/updatecli-action from 2.52.0 to 2.53.0 Bumps [updatecli/updatecli-action](https://github.com/updatecli/updatecli-action) from 2.52.0 to 2.53.0. - [Release notes](https://github.com/updatecli/updatecli-action/releases) - [Commits](updatecli/updatecli-action@v2.52.0...v2.53.0) --- updated-dependencies: - dependency-name: updatecli/updatecli-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump anchore/scan-action from 3.5.0 to 3.6.0 Bumps [anchore/scan-action](https://github.com/anchore/scan-action) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/anchore/scan-action/releases) - [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md) - [Commits](anchore/scan-action@1d59d90...0550541) --- updated-dependencies: - dependency-name: anchore/scan-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(jenkins): Update Jenkins plugins * chore(deps): bump updatecli/updatecli-action from 2.53.0 to 2.54.0 Bumps [updatecli/updatecli-action](https://github.com/updatecli/updatecli-action) from 2.53.0 to 2.54.0. - [Release notes](https://github.com/updatecli/updatecli-action/releases) - [Commits](updatecli/updatecli-action@v2.53.0...v2.54.0) --- updated-dependencies: - dependency-name: updatecli/updatecli-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump debian in /dockerfiles/sidekick Bumps debian from bookworm-20240110 to bookworm-20240130. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump jenkins/ssh-agent in /dockerfiles/python Bumps jenkins/ssh-agent from 5.22.0 to 5.24.0. --- updated-dependencies: - dependency-name: jenkins/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump jenkins/ssh-agent in /dockerfiles/android Bumps jenkins/ssh-agent from 5.22.0 to 5.24.0. --- updated-dependencies: - dependency-name: jenkins/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump jenkins/ssh-agent in /dockerfiles/maven Bumps jenkins/ssh-agent from 5.22.0 to 5.24.0. --- updated-dependencies: - dependency-name: jenkins/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump release-drafter/release-drafter from 5 to 6 Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5 to 6. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](release-drafter/release-drafter@v5...v6) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump anchore/scan-action from 3.6.0 to 3.6.4 Bumps [anchore/scan-action](https://github.com/anchore/scan-action) from 3.6.0 to 3.6.4. - [Release notes](https://github.com/anchore/scan-action/releases) - [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md) - [Commits](anchore/scan-action@0550541...3343887) --- updated-dependencies: - dependency-name: anchore/scan-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump jenkins/ssh-agent in /dockerfiles/multi Bumps jenkins/ssh-agent from 5.22.0 to 5.24.0. --- updated-dependencies: - dependency-name: jenkins/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump jenkins/ssh-agent in /dockerfiles/node Bumps jenkins/ssh-agent from 5.22.0 to 5.24.0. --- updated-dependencies: - dependency-name: jenkins/ssh-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump codacy/codacy-analysis-cli-action from 4.3.0 to 4.4.0 Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 4.3.0 to 4.4.0. - [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases) - [Commits](codacy/codacy-analysis-cli-action@5cc54a7...33d4559) --- updated-dependencies: - dependency-name: codacy/codacy-analysis-cli-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(deps): bump debian in /dockerfiles/sidekick Bumps debian from bookworm-20240130 to bookworm-20240211. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump updatecli/updatecli-action from 2.54.0 to 2.55.0 (#114) * chore(deps): bump jenkins/ssh-agent in /dockerfiles/multi (#115) * chore(deps): bump jenkins/ssh-agent in /dockerfiles/node (#116) * chore(deps): bump jenkins/ssh-agent in /dockerfiles/android (#117) * chore(deps): bump jenkins/ssh-agent in /dockerfiles/maven (#118) * chore(deps): bump jenkins/ssh-agent in /dockerfiles/python (#119) * chore(jenkins): Update Jenkins plugins * Multi controller is the same as simple controller * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(deps): Bump debian in /dockerfiles/sidekick Bumps debian from bookworm-20240311 to bookworm-20240408. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * chore(jenkins): Update Jenkins plugins * chore(deps): bump codacy/codacy-analysis-cli-action from 4.4.0 to 4.4.1 Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 4.4.0 to 4.4.1. - [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases) - [Commits](codacy/codacy-analysis-cli-action@33d4559...3ff8e64) --- updated-dependencies: - dependency-name: codacy/codacy-analysis-cli-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump updatecli/updatecli-action from 2.57.0 to 2.58.0 Bumps [updatecli/updatecli-action](https://github.com/updatecli/updatecli-action) from 2.57.0 to 2.58.0. - [Release notes](https://github.com/updatecli/updatecli-action/releases) - [Commits](updatecli/updatecli-action@v2.57.0...v2.58.0) --- updated-dependencies: - dependency-name: updatecli/updatecli-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(deps): bump updatecli/updatecli-action from 2.58.0 to 2.59.0 Bumps [updatecli/updatecli-action](https://github.com/updatecli/updatecli-action) from 2.58.0 to 2.59.0. - [Release notes](https://github.com/updatecli/updatecli-action/releases) - [Commits](updatecli/updatecli-action@v2.58.0...v2.59.0) --- updated-dependencies: - dependency-name: updatecli/updatecli-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update Docker versions * Not to be lost. * not to be lost * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * chore(jenkins): Update Jenkins plugins * Add C++ profile to Docker Compose and Updatecli Fixes #376 Add a new profile in the Docker Compose file for building C++ source code with Jenkins. * **Docker Compose Files:** * Add a `cpp` profile in `docker-compose.yaml` and `build-docker-compose.yaml`. * Include necessary service definitions, dependencies, healthcheck, and volume configurations. * **Dockerfile:** * Create `dockerfiles/cpp/Dockerfile` with necessary C++ build tools including `build-essential`, `cmake`, `gcc`, `g++`, `clang`, `make`, `libstdc++-dev`, and `pkg-config`. * Set environment variables and ensure ownership of the Jenkins agent home directory. * **Updatecli Manifest:** * Add `updatecli/updatecli.d/cpp.yaml` for managing the C++ Dockerfile. * Ensure the manifest includes the necessary dependencies for the C++ build environment. * **GitHub Actions:** * Modify `.github/workflows/github-docker-registry-push.yml` to add a new job for building and pushing the C++ Docker image to ghcr. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gounthar/quickstart-tutorials/issues/376?shareId=XXXX-XXXX-XXXX-XXXX). * fix(updatecli): Removed cpp manifest. * fix(docker): Update libstdc++ dependency to libstdc++-12-dev * feat(jenkins): Add cpp-agent configuration for Docker image in ssh-agent.yaml * fix(docker): Update healthcheck syntax and add cpp profile to Docker Compose * fix(github): Correct tag format for cpp agent in Docker registry push --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <[email protected]>
1 parent bd6b06e commit d61868e

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

.github/workflows/github-docker-registry-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,4 @@ jobs:
213213
context: ./dockerfiles/cpp
214214
platforms: linux/amd64, linux/aarch64
215215
push: true
216-
tags: ghcr.io/${{ env.REPO_NAME }}/jenkinsci-tutorials:cpp_agent_${{ env.BRANCH }}
216+
tags: ghcr.io/${{ env.REPO_NAME }}/jenkinsci-tutorials:cpp__${{ env.BRANCH }}

docker-compose.yaml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- agent-ssh-dir:/ssh-dir # Mounts the agent-ssh-dir volume to the /ssh-dir path inside the container
1616
# The healthcheck command checks if the conductor_ok file exists in the /ssh-dir directory.
1717
healthcheck:
18-
test: ["CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1"]
18+
test: [ "CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1" ]
1919
# Checks if the conductor_ok file exists in the /ssh-dir path
2020
interval: 5s
2121
timeout: 10s
@@ -42,7 +42,7 @@ services:
4242
condition: service_completed_successfully # Depends on the successful completion of the sidekick_service
4343
# The healthcheck command checks if the find-name.sh script can be executed successfully.
4444
healthcheck:
45-
test: ["CMD-SHELL", "/usr/local/bin/find-name.sh || exit 0"]
45+
test: [ "CMD-SHELL", "/usr/local/bin/find-name.sh || exit 0" ]
4646
interval: 5s
4747
timeout: 10s
4848
retries: 50
@@ -60,6 +60,7 @@ services:
6060
- node
6161
- android
6262
- golang
63+
- cpp
6364
- default
6465
# The CASC_RELOAD_TOKEN environment variable is used by the Jenkins controller to restart the Configuration as Code (JCasc) plugin configuration.
6566
environment:
@@ -77,7 +78,7 @@ services:
7778
sidekick_service:
7879
condition: service_completed_successfully # Depends on the successful completion of the sidekick_service
7980
healthcheck:
80-
test: ["CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1"]
81+
test: [ "CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1" ]
8182
# Checks if the conductor_ok file exists in the /ssh-dir path
8283
interval: 5s
8384
timeout: 10s
@@ -98,7 +99,7 @@ services:
9899
sidekick_service:
99100
condition: service_completed_successfully # Depends on the successful completion of the sidekick_service
100101
healthcheck:
101-
test: ["CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1"]
102+
test: [ "CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1" ]
102103
# Checks if the conductor_ok file exists in the /ssh-dir path
103104
interval: 5s
104105
timeout: 10s
@@ -118,7 +119,7 @@ services:
118119
jenkins_controller:
119120
condition: service_started
120121
healthcheck:
121-
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
122+
test: [ "CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1" ]
122123
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
123124
interval: 5s
124125
timeout: 10s
@@ -148,7 +149,7 @@ services:
148149
jenkins_controller:
149150
condition: service_started
150151
healthcheck:
151-
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
152+
test: [ "CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1" ]
152153
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
153154
interval: 5s
154155
timeout: 10s
@@ -166,7 +167,7 @@ services:
166167
jenkins_controller:
167168
condition: service_started
168169
healthcheck:
169-
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
170+
test: [ "CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1" ]
170171
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
171172
interval: 5s
172173
timeout: 10s
@@ -188,7 +189,7 @@ services:
188189
ports:
189190
- "3000:3000"
190191
healthcheck:
191-
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
192+
test: [ "CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1" ]
192193
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
193194
interval: 5s
194195
timeout: 10s
@@ -210,7 +211,7 @@ services:
210211
ports:
211212
- "3000:3000"
212213
healthcheck:
213-
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
214+
test: [ "CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1" ]
214215
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
215216
interval: 5s
216217
timeout: 10s
@@ -231,7 +232,7 @@ services:
231232
sidekick_service:
232233
condition: service_completed_successfully # Depends on the successful completion of the sidekick_service
233234
healthcheck:
234-
test: ["CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1"]
235+
test: [ "CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1" ]
235236
# Checks if the conductor_ok file exists in the /ssh-dir path
236237
interval: 5s
237238
timeout: 10s
@@ -252,7 +253,7 @@ services:
252253
- "3000:3000"
253254
- "5000:5000"
254255
healthcheck:
255-
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
256+
test: [ "CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1" ]
256257
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
257258
interval: 5s
258259
timeout: 10s
@@ -274,30 +275,36 @@ services:
274275
ports:
275276
- "3000:3000"
276277
healthcheck:
277-
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
278+
test: [ "CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1" ]
278279
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
279280
interval: 5s
280281
timeout: 10s
281282
retries: 5
282283
volumes:
283284
- agent-ssh-dir:/home/jenkins/.ssh:ro # Mounts the agent-ssh-dir volume to the /home/jenkins/.ssh path inside the container as read-only
284285
cpp:
285-
image: ${IMAGE_PREFIX}/${GHCR_USERNAME}/quickstart-tutorials/jenkinsci-tutorials:cpp_agent_${BRANCH_SUFFIX}
286+
image: ${IMAGE_PREFIX}/${GHCR_USERNAME}/quickstart-tutorials/jenkinsci-tutorials:cpp_{BRANCH_SUFFIX}
287+
environment:
288+
- GITPOD_WORKSPACE_URL=${GITPOD_WORKSPACE_URL}
286289
container_name: desktop-jenkins_agent-1-cpp
287290
profiles:
288291
- cpp
289292
depends_on:
290293
sidekick_service:
291-
condition: service_completed_successfully
294+
condition: service_completed_successfully # Depends on the successful completion of the sidekick_service
292295
jenkins_controller:
293296
condition: service_started
297+
ports:
298+
- "3000:3000"
294299
healthcheck:
295-
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
300+
test: [ "CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1" ]
301+
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
296302
interval: 5s
297303
timeout: 10s
298304
retries: 5
299305
volumes:
300-
- agent-ssh-dir:/home/jenkins/.ssh:ro
306+
- agent-ssh-dir:/home/jenkins/.ssh:ro # Mounts the agent-ssh-dir volume to the /home/jenkins/.ssh path inside the container as read-only
307+
301308
volumes:
302309
jenkins_home: null
303310
empty_jenkins_home: null

0 commit comments

Comments
 (0)