forked from Cray-HPE/cray-dhcp-kea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.github
56 lines (50 loc) · 1.65 KB
/
Jenkinsfile.github
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
@Library('csm-shared-library') _
pipeline {
agent {
label "metal-gcp-builder"
}
options {
buildDiscarder(logRotator(numToKeepStr: "10"))
timestamps()
}
environment {
NAME = "cray-dhcp-kea"
DESCRIPTION = "Kea is the DHCP server for Shasta"
IS_STABLE = getBuildIsStable()
VERSION = getDockerBuildVersion(isStable: env.IS_STABLE)
DOCKER_ARGS = getDockerBuildArgs(name: env.NAME, description: env.DESCRIPTION)
CHART_VERSION = getChartVersion(version: env.VERSION)
}
stages {
stage("Build") {
parallel {
stage('Image') {
steps {
script {
sh "printenv"
sh "make image"
}
}
}
stage('Chart') {
steps {
script {
env.IMAGE = "artifactory.algol60.net/csm-docker/${env.IS_STABLE == "true" ? "stable" : "unstable"}/${env.NAME}"
sh "printenv"
sh "docker version"
sh "make chart"
}
}
}
}
}
stage('Publish ') {
steps {
script {
publishCsmDockerImage(image: env.NAME, tag: env.VERSION, isStable: env.IS_STABLE)
publishCsmHelmCharts(component: env.NAME, chartsPath: "${WORKSPACE}/kubernetes/.packaged", isStable: env.IS_STABLE)
}
}
}
}
}