Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions demos/docker-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Docker Plugin — SSH Connector JCasC Demo

This demo provides a working Jenkins Configuration as Code (JCasC) example for configuring
the Docker plugin with the SSH connector. The existing documentation does not show how to
set up SSH-based agents using the docker-plugin, so this example is added to fill that gap.

## SSH connector usage

The docker-plugin exposes the `sshConnector` field for configuring SSH-based cloud agents.
Using other keys such as `ssh:` does not match the expected structure and will cause a
configuration error.

A working configuration can be found in `docker-plugin-ssh.yaml`. The key part of the
connector configuration is:

```yaml
connector:
sshConnector:
sshKeyCredentialsId: "my-ssh-key-id"
javaPath: "/opt/java/openjdk/bin/java"
20 changes: 20 additions & 0 deletions demos/docker-plugin/docker-plugin.ssh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# demos/docker-plugin/docker-plugin-ssh.yaml
jenkins:
clouds:
- docker:
name: "my-docker-cloud"
dockerHost:
uri: "unix:///var/run/docker.sock"
templates:
- labelString: "worker1-agent"
dockerTemplateBase:
image: "jenkins/ssh-agent:latest-jdk17"
mounts:
- "type=tmpfs,destination=/run"
- "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock"

remoteFs: "/home/jenkins/agent"
connector:
sshConnector:
sshKeyCredentialsId: "my-ssh-key-id"
javaPath: "/opt/java/openjdk/bin/java"
6 changes: 4 additions & 2 deletions demos/jobs/multibranch-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
}
}
triggers {
periodic(5)
periodicFolderTrigger {
interval('5')
}
}
}
}
5 changes: 5 additions & 0 deletions demos/matrix-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# matrix-auth-plugin

> **Note:** Starting from **matrix-auth 3.2**, the older
> `grantedPermissions:` JCasC syntax is **deprecated**.
> The examples below already use the new **`entries:`** format, which should be used going forward.


Configuration of the [Matrix Authorization Strategy plugin](https://plugins.jenkins.io/matrix-auth)

There are a couple of built-in authorizations to consider.
Expand Down
Loading