-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhelm-pack.pipeline
29 lines (28 loc) · 1.28 KB
/
helm-pack.pipeline
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
def GITHUB_REPO = 'https://github.com/devopscorner/golang-adot'
node {
parameters {
string(name: 'HELM_ENV', defaultValue: 'lab', description: 'Enter Environment')
string(name: 'HELM_VERSION', defaultValue: '1.4.0-rc', description: 'Enter Version Number')
string(name: 'HELM_REPO_PATH', defaultValue: 's3://devopscorner-adot-chart/lab', description: 'Enter Helm Repo S3 Path')
string(name: 'HELM_REPO_NAME', defaultValue: 'devopscorner-lab', description: 'Enter Helm Repo Name')
}
stage('Clone'){
checkout([$class: 'GitSCM', branches: [[name: '*/develop']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', depth: 2, noTags: true, reference: '', shallow: true]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'github', url: GITHUB_REPO]]])
}
stage('Helm Pack'){
withEnv([
"env=$HELM_ENV",
"ver=$HELM_VERSION",
"repo_path=$HELM_REPO_PATH",
"repo_name=$HELM_REPO_NAME",
]) {
dir("template"){
sh '''
export TERM=xterm
export PATH_SCRIPT=`pwd`
sh $PATH_SCRIPT/helm-pack-jenkins.sh $env $ver $repo_path $repo_name
'''
}
}
}
}