This repository has been archived by the owner on Oct 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
release.groovy
60 lines (53 loc) · 1.52 KB
/
release.groovy
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
57
58
59
60
#!/usr/bin/groovy
def stage(){
return stageProject{
project = 'fabric8-services/fabric8-tenant-che'
useGitTagForNextVersion = true
}
}
def approveRelease(project){
def releaseVersion = project[1]
approve{
room = null
version = releaseVersion
console = null
environment = 'fabric8'
}
}
def release(project){
releaseProject{
stagedProject = project
useGitTagForNextVersion = true
helmPush = false
groupId = 'io.fabric8.tenant'
githubOrganisation = 'fabric8io'
artifactIdToWatchInCentral = 'tenant-che'
artifactExtensionToWatchInCentral = 'pom'
promoteToDockerRegistry = 'docker.io'
dockerOrganisation = 'fabric8'
imagesToPromoteToDockerHub = []
extraImagesToTag = null
}
}
def updatefabric8Tenant(releaseVersion){
ws{
container(name: 'clients') {
def flow = new io.fabric8.Fabric8Commands()
flow.setupGitSSH()
def uid = UUID.randomUUID().toString()
def branch = "versionUpdate${uid}"
def message = "Update fabric8-tenant-che version to ${releaseVersion}"
sh """
git clone [email protected]:fabric8-services/fabric8-tenant.git --depth 1
cd fabric8-tenant
echo ${releaseVersion} > CHE_VERSION
git checkout -b ${branch}
git commit -a -m "${message}"
git push origin ${branch}
"""
def prId = flow.createPullRequest(message,'fabric8-services/fabric8-tenant',"versionUpdate${uid}")
flow.mergePR('fabric8-services/fabric8-tenant',prId)
}
}
}
return this;