-
Notifications
You must be signed in to change notification settings - Fork 21
/
Jenkinsfile
40 lines (37 loc) · 2 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
label = "${UUID.randomUUID().toString()}"
git_project = "nuclio-templates"
git_project_user = "nuclio"
git_project_upstream_user = "nuclio"
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("upload ${git_project} zip to artifactory") {
container('jnlp') {
sh("wget https://github.com/${git_project_user}/${git_project}/archive/${github.TAG_VERSION}.zip")
zip_path = sh(
script: "pwd",
returnStdout: true
).trim()
withCredentials([
string(credentialsId: pipelinex.PackagesRepo.ARTIFACTORY_IGUAZIO[2], variable: 'PACKAGES_ARTIFACTORY_PASSWORD')
]) {
common.upload_file_to_artifactory(pipelinex.PackagesRepo.ARTIFACTORY_IGUAZIO[0], pipelinex.PackagesRepo.ARTIFACTORY_IGUAZIO[1], PACKAGES_ARTIFACTORY_PASSWORD, "iguazio-devops/nuclio-templates", "${github.TAG_VERSION}.zip", zip_path)
}
}
}
}
}
}
}
}