-
Notifications
You must be signed in to change notification settings - Fork 34
/
Jenkinsfile
52 lines (47 loc) · 2.13 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
@Library('pipelinex@development') _
import com.iguazio.pipelinex.DockerRepo
workDir = '/home/jenkins'
podLabel = 'mlrun-ui-release'
gitProject = 'ui'
gitProjectUser = 'mlrun'
dockerTag = env.TAG_NAME.replaceFirst(/^v/, '')
podTemplate(
label: podLabel,
containers: [
containerTemplate(name: 'jnlp', image: 'jenkins/jnlp-slave:4.0.1-1', workingDir: workDir, resourceRequestCpu: '2000m', resourceLimitCpu: '2000m', resourceRequestMemory: '2048Mi', resourceLimitMemory: '2048Mi'),
containerTemplate(name: 'base-build', image: 'iguazioci/alpine-base-build:5540620c8c98efee4debfaa14e4c2a47d7110f22', workingDir: workDir, resourceRequestCpu: '2000m', resourceLimitCpu: '2000m', resourceRequestMemory: '2048Mi', resourceLimitMemory: '2048Mi', ttyEnabled: true, command: 'cat'),
],
volumes: [
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
],
) {
node(podLabel) {
common.notify_slack {
container('base-build') {
stage("git clone") {
checkout scm
}
common.reportStage('Build mlrun/ui') {
println(common.shellc("MLRUN_DOCKER_TAG=${dockerTag} npm run docker"))
dockerx.images_push_multi_registries(
["${gitProjectUser}/mlrun-ui:${dockerTag}"],
[
DockerRepo.ARTIFACTORY_IGUAZIO,
DockerRepo.MLRUN_DOCKER_HUB,
DockerRepo.MLRUN_QUAY_IO
]
)
}
common.reportStage('update release status') {
withCredentials([
string(credentialsId: "iguazio-prod-git-user-token", variable: 'GIT_TOKEN')
]) {
container('jnlp') {
github.update_release_status(gitProject, gitProjectUser, env.TAG_NAME, GIT_TOKEN)
}
}
}
}
}
}
}