forked from jenkins-infra/docker-openvpn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_k8s
43 lines (43 loc) · 1.08 KB
/
Jenkinsfile_k8s
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
parallel(
failFast: true,
'Build Easyvpn': {
podTemplate(
containers: [
containerTemplate(
name: 'golang',
image: 'golang:1.17.5',
command: 'cat',
ttyEnabled: true,
resourceRequestCpu: '2',
resourceLimitCpu: '2',
resourceRequestMemory: '2Gi',
resourceLimitMemory: '2Gi',
),
]
) {
node(POD_LABEL) {
container('golang') {
checkout scm
dir('utils/easyvpn') {
sh 'make build_linux'
}
}
}
}
},
'docker-image': {
buildDockerAndPublishImage('openvpn', [
mainBranch: 'main',
automaticSemanticVersioning: true,
gitCredentials: 'github-app-infra'
])
},
'updatecli': {
withCredentials([string(credentialsId: 'updatecli-github-token', variable: 'UPDATECLI_GITHUB_TOKEN')]) {
updatecli(action: 'diff', containerMemory: '1024Mi')
if (env.BRANCH_NAME == 'main') {
updatecli(action: 'apply', cronTriggerExpression: '@weekly', containerMemory: '1024Mi')
}
}
},
)