-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjenkins-configuration.yaml
62 lines (58 loc) · 1.91 KB
/
jenkins-configuration.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apiVersion: v1
kind: ConfigMap
metadata:
name: jenkins-configuration
namespace: jenkins
data:
1-create-credentials-telegram-token.groovy: |
import jenkins.model.Jenkins
import com.cloudbees.plugins.credentials.domains.Domain
import org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl
import com.cloudbees.plugins.credentials.CredentialsScope
import hudson.util.Secret
instance = Jenkins.instance
domain = Domain.global()
store = instance.getExtensionList(
"com.cloudbees.plugins.credentials.SystemCredentialsProvider")[0].getStore()
secretTextTgBotToken = new StringCredentialsImpl(
CredentialsScope.GLOBAL,
"TELEGRAM_BOT_TOKEN",
"Telegram bot token",
Secret.fromString(secrets["TELEGRAM_BOT_TOKEN"])
)
secretTextTgBotChat = new StringCredentialsImpl(
CredentialsScope.GLOBAL,
"TELEGRAM_CHAT_ID",
"Telegram chat id",
Secret.fromString(secrets["TELEGRAM_CHAT_ID"])
)
store.addCredentials(domain, secretTextTgBotToken)
store.addCredentials(domain, secretTextTgBotChat)
1-casc-configuration.yaml: |
jenkins:
globalNodeProperties:
- envVars:
env:
- key: "TZ"
value: "Europe/Rome"
systemMessage: "CI as code"
unclassified:
ansiColorBuildWrapper:
globalColorMapName: "xterm"
prometheusConfiguration:
collectDiskUsage: false
collectingMetricsPeriodInSeconds: 600
countAbortedBuilds: true
countFailedBuilds: true
countNotBuiltBuilds: true
countSuccessfulBuilds: true
countUnstableBuilds: true
defaultNamespace: ""
fetchTestResults: true
jobAttributeName: "jenkins_job"
path: "prometheus"
throttleJobProperty:
categories:
- categoryName: "docker-images"
maxConcurrentPerNode: 1
maxConcurrentTotal: 1