-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathJenkinsfile
30 lines (26 loc) · 995 Bytes
/
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
#!/usr/bin/groovy
@Library('github.com/stakater/fabric8-pipeline-library@master')
String chartPackageName = ""
String chartName = "helloworld"
toolsNode(toolsImage: 'stakater/pipeline-tools:1.2.0') {
container(name: 'tools') {
def helm = new io.stakater.charts.Helm()
def common = new io.stakater.Common()
def chartManager = new io.stakater.charts.ChartManager()
stage('Checkout') {
checkout scm
}
stage('Init Helm') {
helm.init(true)
}
stage('Prepare Chart') {
helm.lint(WORKSPACE, chartName)
chartPackageName = helm.package(WORKSPACE, chartName)
}
stage('Upload Chart') {
String cmUsername = common.getEnvValue('CHARTMUSEUM_USERNAME')
String cmPassword = common.getEnvValue('CHARTMUSEUM_PASSWORD')
chartManager.uploadToChartMuseum(WORKSPACE, chartName, chartPackageName, cmUsername, cmPassword)
}
}
}