-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
53 lines (48 loc) · 1.46 KB
/
Jenkinsfile
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
@Library('jenkins-devops@dev')_ // load jenkins-devops as a library
properties([
parameters([
choice( name: 'TYPE', choices: ['converge', 'dismiss'],
defaultValue: 'converge', description: 'TYPE of run Deploy or Dismis packages'),
string( name: 'SERVICE', defaultValue: 'infra-authz', description: 'Name of Service (also namespace too)'),
])
])
pipeline {
agent { label 'werf' }
environment {
// WERF_REPO = "cr.yandex/xxxxxxxx/${params.SERVICE}" // if necessary
// WERF_STAGES_STORAGE = "cr.yandex/xxxxxxxx/${params.SERVICE}/stages" // if necessary
WERF_TMP_DIR = '/home/jenkins/tmp/'
WERF_HOME = '/home/jenkins/tmp/.werf/'
KUBECONFIG = credentials('werf_devops_kube_config')
WERF_SECRET_KEY = credentials("werf_secret_key")
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage("Prerequisites") {
steps {
script {
sh 'export'
}
}
}
stage("PROD") {
when {
anyOf { branch 'master'; }
}
environment {
WERF_NAMESPACE = "${params.SERVICE}"
WERF_ENV = "prod"
WERF_KUBE_CONTEXT = "devops-prod" // change
}
steps {
script {
functions.runWerf("${params.TYPE}", "1.2 beta")
}
}
}
}
}