infralab/ansible/roles/jenkins/templates/jenkins-casc.yaml.j2

63 lines
1.4 KiB
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

jenkins:
systemMessage: "Managed by Ansible + JCasC. Do not edit via UI."
numExecutors: 2
mode: NORMAL
# ✅ Перенесено в jenkins.*
crumbIssuer:
standard:
excludeClientIPFromCrumb: false
# ✅ Перенесено в jenkins.*
securityRealm:
local:
allowsSignup: false
users:
- id: "${JENKINS_ADMIN_ID}"
password: "${JENKINS_ADMIN_PASSWORD}"
# ✅ Современный matrix-auth
authorizationStrategy:
globalMatrix:
grantedPermissions:
- "Overall/Administer:${JENKINS_ADMIN_ID}"
- "Overall/Read:authenticated"
unclassified:
# ✅ Разрешённый ключ
location:
url: "{{ jenkins_url }}"
# ✅ У плагина timestamper имя узла — 'timestamper'
timestamper:
systemTimeFormat: "yyyy-MM-dd HH:mm:ss"
elapsedTimeFormat: "'+'HH:mm:ss"
tool:
git:
installations:
- name: "Default"
home: "/usr/bin/git"
jobs:
- script: |
pipelineJob('hello-pipeline') {
definition {
cps {
script('''\
pipeline {
agent any
stages {
stage('Hello') {
steps {
echo "It works on ${env.NODE_NAME}"
}
}
}
}
'''.stripIndent())
sandbox(true)
}
}
}