The top of the Jenkinsfile moves the pipeline to the Docker-capable agent and names what later stages share. The library is now pinned to v1.2.0, which adds the notifyTeam step of Build Notifications:
@Library('booknest-lib@v1.2.0') _
pipeline {
agent { label 'docker' }
...
environment {
REGISTRY = 'localhost:32550'
IMAGE = "${REGISTRY}/booknest-api"
DB_PORT = '0' // Compose picks a free host port
CHAT_WEBHOOK_URL = 'http://l2-hook:8080/booknest'
}There is still no checkout step. The multibranch job clones the exact commit it read the Jenkinsfile from, with the github-booknest credential, before the first stage:
curl -s -u "admin:$JENKINS_TOKEN" http://localhost:32080/job/booknest/job/main/5/consoleText \
| grep -E '^Running on|^Checking out Revision .*\(main\)|^Building main'Output
Running on agent-ssh in /var/lib/l2-agent-ssh/workspace/booknest_main Checking out Revision e2d7a8a2f4a1a36b41528ccd7b3c75eeff98bb90 (main) Building main at e2d7a8a
The workspace keeps its clone, so later builds only fetch. For large repositories, the Advanced clone behaviours trait (shallow clone, no tags) shortens the first clone.