-
Notifications
You must be signed in to change notification settings - Fork 32
/
Jenkinsfile
46 lines (37 loc) · 1.15 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
#!/usr/bin/groovy
@Library('github.com/fabric8io/fabric8-pipeline-library@master')
def test = 'dummy'
mavenNode {
dockerNode {
ws{
checkout scm
sh "git remote set-url origin [email protected]:funktionio/funktion-connectors.git"
// lets purge old releases
def purgeFolder = "/root/.mvnrepo/io/fabric8/funktion/connector"
sh """
echo file count in connectors mvn repo:
find ${purgeFolder} -print | wc -l
rm -rf ${purgeFolder}
echo file count after purge:
find ${purgeFolder} -print | wc -l
"""
def pipeline = load 'release.groovy'
def dockerImages = load 'releaseImages.groovy'
def promoteImages = dockerImages.imagesBuiltByPipeline()
echo "will create these docker images: ${promoteImages}"
stage 'Stage'
def stagedProject = pipeline.stage()
// stage 'Approve'
// pipeline.approveRelease(stagedProject)
stage 'Promote'
pipeline.release(stagedProject, promoteImages)
stage 'Push Update Dependencies'
def newVersion = stagedProject[1]
pipeline.pushDependencyUpdates(newVersion)
sh """
echo purging local maven repo:
rm -rf ${purgeFolder}
"""
}
}
}