forked from prometheus/prometheus
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Jenkinsfile
42 lines (34 loc) · 1.57 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
@Library('pipelinex@development') _
import com.iguazio.pipelinex.DockerRepo
label = "${UUID.randomUUID().toString()}"
BUILD_FOLDER = "/home/jenkins/go"
git_project = "prometheus"
git_project_user = "v3io"
git_deploy_user_token = "iguazio-prod-git-user-token"
git_deploy_user_private_key = "iguazio-prod-git-user-private-key"
podTemplate(label: "${git_project}-${label}", inheritFrom: "jnlp-docker") {
node("${git_project}-${label}") {
withCredentials([
string(credentialsId: git_deploy_user_token, variable: 'GIT_TOKEN')
]) {
multi_credentials = [DockerRepo.ARTIFACTORY_IGUAZIO, DockerRepo.DOCKER_HUB, DockerRepo.QUAY_IO, DockerRepo.GCR_IO]
def github_client = new Githubc(git_project_user, git_project, GIT_TOKEN, env.TAG_NAME, this)
github_client.releaseCi(true) {
common.notify_slack {
stage("build ${git_project} in dood") {
container('docker-cmd') {
dir("${BUILD_FOLDER}/src/github.com/${git_project_user}/${git_project}") {
sh("docker build . -f Dockerfile.multi --tag v3io-prom:${github_client.tag.docker}")
}
}
}
stage('push') {
container('docker-cmd') {
dockerx.images_push_multi_registries(["v3io-prom:${github_client.tag.docker}"], multi_credentials)
}
}
}
}
}
}
}