-
Notifications
You must be signed in to change notification settings - Fork 15
/
Jenkinsfile
55 lines (52 loc) · 2.87 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
53
54
55
label = "${UUID.randomUUID().toString()}"
git_project = "tsdb-nuclio"
git_project_user = "v3io"
git_project_upstream_user = "iguazio"
git_deploy_user = "iguazio-prod-git-user"
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}") {
pipelinex = library(identifier: 'pipelinex@development', retriever: modernSCM(
[$class : 'GitSCMSource',
credentialsId: git_deploy_user_private_key,
remote : "[email protected]:iguazio/pipelinex.git"])).com.iguazio.pipelinex
common.notify_slack {
withCredentials([
string(credentialsId: git_deploy_user_token, variable: 'GIT_TOKEN')
]) {
github.release(git_deploy_user, git_project, git_project_user, git_project_upstream_user, true, GIT_TOKEN) {
stage('prepare sources') {
container('jnlp') {
dir("${github.BUILD_FOLDER}/src/github.com/v3io/${git_project}") {
git(changelog: false, credentialsId: git_deploy_user_private_key, poll: false, url: "[email protected]:${git_project_user}/${git_project}.git")
common.shellc("git checkout ${github.TAG_VERSION}")
}
}
}
parallel(
'build tsdb-ingest in dood': {
container('docker-cmd') {
dir("${github.BUILD_FOLDER}/src/github.com/v3io/${git_project}") {
common.shellc("TSDB_DOCKER_REPO= TSDB_TAG=${github.DOCKER_TAG_VERSION} make ingest")
}
}
},
'build tsdb-query in dood': {
container('docker-cmd') {
dir("${github.BUILD_FOLDER}/src/github.com/v3io/${git_project}") {
common.shellc("TSDB_DOCKER_REPO= TSDB_TAG=${github.DOCKER_TAG_VERSION} make query")
}
}
}
)
stage('push') {
container('docker-cmd') {
dockerx.images_push_multi_registries(["tsdb-ingest:${github.DOCKER_TAG_VERSION}","tsdb-query:${github.DOCKER_TAG_VERSION}"], [pipelinex.DockerRepo.ARTIFACTORY_IGUAZIO, pipelinex.DockerRepo.DOCKER_HUB, pipelinex.DockerRepo.QUAY_IO, pipelinex.DockerRepo.GCR_IO])
}
}
}
}
}
}
}